MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / extractTaskHistory

Function extractTaskHistory

apps/cli/src/ui/hooks/useExtensionHost.ts:14–24  ·  view source on GitHub ↗
(message: ExtensionMessage)

Source from the content-addressed store, hash-verified

12const TASK_HISTORY_WAIT_TIMEOUT_MS = 2_000
13
14function extractTaskHistory(message: ExtensionMessage): HistoryItem[] | undefined {
15 if (message.type === "state" && Array.isArray(message.state?.taskHistory)) {
16 return message.state.taskHistory as HistoryItem[]
17 }
18
19 if (message.type === "taskHistoryUpdated" && Array.isArray(message.taskHistory)) {
20 return message.taskHistory as HistoryItem[]
21 }
22
23 return undefined
24}
25
26function getMostRecentTaskId(taskHistory: HistoryItem[], workspacePath: string): string | undefined {
27 const workspaceTasks = taskHistory.filter(

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected