Skip to content

Commit

Permalink
fix: import ChainManager class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emt-lin committed Nov 15, 2024
1 parent 3f0bab1 commit 6bde22e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/settings/components/QASettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
TextAreaComponent,
ToggleComponent,
} from "./SettingBlocks";
import ChainManager from "@/LLMProviders/chainManager";

interface QASettingsProps {
huggingfaceApiKey: string;
Expand All @@ -19,6 +20,7 @@ interface QASettingsProps {
setMaxSourceChunks: (value: number) => void;
disableIndexOnMobile: boolean;
setDisableIndexOnMobile: (value: boolean) => void;
chainManager: ChainManager;
}

const QASettings: React.FC<QASettingsProps> = ({
Expand All @@ -28,6 +30,7 @@ const QASettings: React.FC<QASettingsProps> = ({
setMaxSourceChunks,
disableIndexOnMobile,
setDisableIndexOnMobile,
chainManager,
}) => {
const { settings, updateSettings } = useSettingsContext();

Expand Down Expand Up @@ -74,6 +77,7 @@ const QASettings: React.FC<QASettingsProps> = ({
defaultModelKey={settings.embeddingModelKey}
onSetDefaultModelKey={handleSetEmbeddingModelKey}
isEmbeddingModel={true}
chainManager={chainManager}
/>
<h1>Auto-Index Strategy</h1>
<div className="warning-message">
Expand Down
1 change: 1 addition & 0 deletions src/settings/components/SettingsMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const SettingsMain: React.FC<{ plugin: CopilotPlugin; reloadPlugin: () => Promis
setMaxSourceChunks={(value) => updateSettings({ maxSourceChunks: value })}
disableIndexOnMobile={settings.disableIndexOnMobile}
setDisableIndexOnMobile={(value) => updateSettings({ disableIndexOnMobile: value })}
chainManager={plugin.chainManager}
/>
<AdvancedSettings
{...settings}
Expand Down

0 comments on commit 6bde22e

Please sign in to comment.