Add ollama models polling

This commit is contained in:
Saoud Rizwan
2024-09-06 04:51:17 -04:00
parent 470357c32d
commit 9eaf753000
7 changed files with 111 additions and 12 deletions

View File

@@ -5,11 +5,12 @@ import { HistoryItem } from "./HistoryItem"
// webview will hold state
export interface ExtensionMessage {
type: "action" | "state" | "selectedImages"
type: "action" | "state" | "selectedImages" | "ollamaModels"
text?: string
action?: "chatButtonTapped" | "settingsButtonTapped" | "historyButtonTapped" | "didBecomeVisible"
state?: ExtensionState
images?: string[]
models?: string[]
}
export interface ExtensionState {

View File

@@ -16,6 +16,7 @@ export interface WebviewMessage {
| "deleteTaskWithId"
| "exportTaskWithId"
| "resetState"
| "requestOllamaModels"
text?: string
askResponse?: ClaudeAskResponse
apiConfiguration?: ApiConfiguration

View File

@@ -14,6 +14,7 @@ export interface ApiHandlerOptions {
openAiApiKey?: string
openAiModelId?: string
ollamaModelId?: string
ollamaBaseUrl?: string
}
export type ApiConfiguration = ApiHandlerOptions & {