Skip to content

Commit

Permalink
fix: silent eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujal Shah committed Nov 25, 2024
1 parent 1cb836a commit f94165a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ const EXAMPLE_PROMPTS = [
{ text: 'How do I center a div?' },
];

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const providerList = PROVIDER_LIST;

// @ts-ignore TODO: Introduce proper types
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => {
Expand Down
5 changes: 2 additions & 3 deletions app/lib/runtime/action-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@ export class ActionRunner {

this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming });

// eslint-disable-next-line consistent-return
return (this.#currentExecutionPromise = this.#currentExecutionPromise
this.#currentExecutionPromise = this.#currentExecutionPromise
.then(() => {
this.#executeAction(actionId, isStreaming);
})
.catch((error) => {
console.error('Action failed:', error);
}));
});
}

async #executeAction(actionId: string, isStreaming: boolean = false) {
Expand Down
6 changes: 3 additions & 3 deletions app/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ async function getOllamaModels(): Promise<ModelInfo[]> {
provider: 'Ollama',
maxTokenAllowed: 8000,
}));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
console.error('Error getting Ollama models:', e);
return [];
}
}
Expand All @@ -321,8 +321,8 @@ async function getOpenAILikeModels(): Promise<ModelInfo[]> {
label: model.id,
provider: 'OpenAILike',
}));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
console.error('Error getting OpenAILike models:', e);
return [];
}
}
Expand Down Expand Up @@ -371,8 +371,8 @@ async function getLMStudioModels(): Promise<ModelInfo[]> {
label: model.id,
provider: 'LMStudio',
}));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
console.error('Error getting LMStudio models:', e);
return [];
}
}
Expand Down

0 comments on commit f94165a

Please sign in to comment.