Skip to content

Commit

Permalink
PR review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
elie222 committed Dec 21, 2024
1 parent 236c232 commit 25490c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion apps/web/utils/condition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function getEmptyConditions(): ZodCondition[] {
}

export function getEmptyCondition(
type: string,
type: RuleType,
groupId?: string,
): ZodCondition {
switch (type) {
Expand Down Expand Up @@ -180,6 +180,11 @@ export const flattenConditions = (
acc.categoryFilterType = condition.categoryFilterType;
acc.categoryFilters = condition.categoryFilters;
break;
default:
console.log(`Unhandled condition type: ${condition.type}`);
// biome-ignore lint/correctness/noSwitchDeclarations: intentional exhaustive check
const exhaustiveCheck: never = condition.type;
return exhaustiveCheck;
}
return acc;
}, {} as FlattenedConditions);
Expand Down
4 changes: 3 additions & 1 deletion apps/web/utils/llms/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export const Model = {
export const providerOptions: { label: string; value: string }[] = [
{ label: "OpenAI", value: Provider.OPEN_AI },
{ label: "Anthropic", value: Provider.ANTHROPIC },
...(supportsOllama ? [{ label: "Ollama", value: Provider.OLLAMA! }] : []),
...(supportsOllama && Provider.OLLAMA
? [{ label: "Ollama", value: Provider.OLLAMA }]
: []),
];

export const modelOptions: Record<string, { label: string; value: string }[]> =
Expand Down

0 comments on commit 25490c4

Please sign in to comment.