Sujal Shah
commited on
Commit
·
f94165a
1
Parent(s):
1cb836a
fix: silent eslint issues
Browse files
app/components/chat/BaseChat.tsx
CHANGED
|
@@ -29,9 +29,6 @@ const EXAMPLE_PROMPTS = [
|
|
| 29 |
{ text: 'How do I center a div?' },
|
| 30 |
];
|
| 31 |
|
| 32 |
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 33 |
-
const providerList = PROVIDER_LIST;
|
| 34 |
-
|
| 35 |
// @ts-ignore TODO: Introduce proper types
|
| 36 |
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 37 |
const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => {
|
|
|
|
| 29 |
{ text: 'How do I center a div?' },
|
| 30 |
];
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
// @ts-ignore TODO: Introduce proper types
|
| 33 |
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 34 |
const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => {
|
app/lib/runtime/action-runner.ts
CHANGED
|
@@ -93,14 +93,13 @@ export class ActionRunner {
|
|
| 93 |
|
| 94 |
this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming });
|
| 95 |
|
| 96 |
-
|
| 97 |
-
return (this.#currentExecutionPromise = this.#currentExecutionPromise
|
| 98 |
.then(() => {
|
| 99 |
this.#executeAction(actionId, isStreaming);
|
| 100 |
})
|
| 101 |
.catch((error) => {
|
| 102 |
console.error('Action failed:', error);
|
| 103 |
-
})
|
| 104 |
}
|
| 105 |
|
| 106 |
async #executeAction(actionId: string, isStreaming: boolean = false) {
|
|
|
|
| 93 |
|
| 94 |
this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming });
|
| 95 |
|
| 96 |
+
this.#currentExecutionPromise = this.#currentExecutionPromise
|
|
|
|
| 97 |
.then(() => {
|
| 98 |
this.#executeAction(actionId, isStreaming);
|
| 99 |
})
|
| 100 |
.catch((error) => {
|
| 101 |
console.error('Action failed:', error);
|
| 102 |
+
});
|
| 103 |
}
|
| 104 |
|
| 105 |
async #executeAction(actionId: string, isStreaming: boolean = false) {
|
app/utils/constants.ts
CHANGED
|
@@ -294,8 +294,8 @@ async function getOllamaModels(): Promise<ModelInfo[]> {
|
|
| 294 |
provider: 'Ollama',
|
| 295 |
maxTokenAllowed: 8000,
|
| 296 |
}));
|
| 297 |
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 298 |
} catch (e) {
|
|
|
|
| 299 |
return [];
|
| 300 |
}
|
| 301 |
}
|
|
@@ -321,8 +321,8 @@ async function getOpenAILikeModels(): Promise<ModelInfo[]> {
|
|
| 321 |
label: model.id,
|
| 322 |
provider: 'OpenAILike',
|
| 323 |
}));
|
| 324 |
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 325 |
} catch (e) {
|
|
|
|
| 326 |
return [];
|
| 327 |
}
|
| 328 |
}
|
|
@@ -371,8 +371,8 @@ async function getLMStudioModels(): Promise<ModelInfo[]> {
|
|
| 371 |
label: model.id,
|
| 372 |
provider: 'LMStudio',
|
| 373 |
}));
|
| 374 |
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 375 |
} catch (e) {
|
|
|
|
| 376 |
return [];
|
| 377 |
}
|
| 378 |
}
|
|
|
|
| 294 |
provider: 'Ollama',
|
| 295 |
maxTokenAllowed: 8000,
|
| 296 |
}));
|
|
|
|
| 297 |
} catch (e) {
|
| 298 |
+
console.error('Error getting Ollama models:', e);
|
| 299 |
return [];
|
| 300 |
}
|
| 301 |
}
|
|
|
|
| 321 |
label: model.id,
|
| 322 |
provider: 'OpenAILike',
|
| 323 |
}));
|
|
|
|
| 324 |
} catch (e) {
|
| 325 |
+
console.error('Error getting OpenAILike models:', e);
|
| 326 |
return [];
|
| 327 |
}
|
| 328 |
}
|
|
|
|
| 371 |
label: model.id,
|
| 372 |
provider: 'LMStudio',
|
| 373 |
}));
|
|
|
|
| 374 |
} catch (e) {
|
| 375 |
+
console.error('Error getting LMStudio models:', e);
|
| 376 |
return [];
|
| 377 |
}
|
| 378 |
}
|