Skip to content

Commit

Permalink
🐛 fix: Fix setting type
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Aug 3, 2023
1 parent 88debc4 commit 57e415e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/features/AgentSetting/AgentConfig/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import { FORM_STYLE } from '@/const/layoutTokens';
import { AgentAction } from '@/store/session/slices/agentConfig';
import { LanguageModel } from '@/types/llm';
import type { LobeAgentConfig } from '@/types/session';
import { LobeAgentConfigKeys } from '@/types/session';

type SettingItemGroup = ItemGroup & {
children: {
name?: keyof LobeAgentConfig | string[];
name?: LobeAgentConfigKeys | string | string[];
}[];
};

Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Settings/Common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { ThemeSwatchesNeutral, ThemeSwatchesPrimary } from '../ThemeSwatches';

type SettingItemGroup = ItemGroup & {
children: {
name?: ConfigKeys;
name?: ConfigKeys | string;
}[];
};

Expand Down
4 changes: 4 additions & 0 deletions src/types/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@ export interface LobeAgentSession extends LobeSessionBase {
}

export type LobeSessions = Record<string, LobeAgentSession>;

export type LobeAgentConfigKeys =
| keyof LobeAgentConfig
| ['params', keyof LobeAgentConfig['params']];

0 comments on commit 57e415e

Please sign in to comment.