Add task history

This commit is contained in:
Saoud Rizwan
2024-08-17 08:29:30 -04:00
parent 38f98951d0
commit d1437e6d2d
18 changed files with 1211 additions and 137 deletions

View File

@@ -1,12 +1,13 @@
// type that represents json data that is sent from extension to webview, called ExtensionMessage and has 'type' enum which can be 'plusButtonTapped' or 'settingsButtonTapped' or 'hello'
import { ApiConfiguration } from "./api"
import { HistoryItem } from "./HistoryItem"
// webview will hold state
export interface ExtensionMessage {
type: "action" | "state" | "selectedImages"
text?: string
action?: "plusButtonTapped" | "settingsButtonTapped" | "didBecomeVisible"
action?: "chatButtonTapped" | "settingsButtonTapped" | "historyButtonTapped" | "didBecomeVisible"
state?: ExtensionState
images?: string[]
}
@@ -18,6 +19,7 @@ export interface ExtensionState {
customInstructions?: string
themeName?: string
claudeMessages: ClaudeMessage[]
taskHistory: HistoryItem[]
shouldShowAnnouncement: boolean
}
@@ -38,6 +40,7 @@ export type ClaudeAsk =
| "completion_result"
| "tool"
| "api_req_failed"
| "resume_task"
export type ClaudeSay =
| "task"