update apply diff

This commit is contained in:
duanfuxiang
2025-03-23 09:34:44 +08:00
parent 570e8d9564
commit 635db9babd
34 changed files with 3161 additions and 410 deletions

View File

@@ -34,7 +34,7 @@ export type LLMContextType = {
options?: LLMOptions,
) => Promise<AsyncIterable<LLMResponseStreaming>>
chatModel: LLMModel
applyModel: LLMModel
// applyModel: LLMModel
}
const LLMContext = createContext<LLMContextType | null>(null)
@@ -50,12 +50,12 @@ export function LLMProvider({ children }: PropsWithChildren) {
}
}, [settings])
const applyModel = useMemo((): LLMModel => {
return {
provider: settings.applyModelProvider,
modelId: settings.applyModelId,
}
}, [settings])
// const applyModel = useMemo((): LLMModel => {
// return {
// provider: settings.applyModelProvider,
// modelId: settings.applyModelId,
// }
// }, [settings])
useEffect(() => {
const manager = new LLMManager(settings)
@@ -92,7 +92,7 @@ export function LLMProvider({ children }: PropsWithChildren) {
return (
<LLMContext.Provider
value={{ generateResponse, streamResponse, chatModel, applyModel }}
value={{ generateResponse, streamResponse, chatModel }}
>
{children}
</LLMContext.Provider>