Add ClaudeDev and related packages; refactor sidebar utils

This commit is contained in:
Saoud Rizwan
2024-07-08 08:56:32 -04:00
parent 62e6ad0a78
commit 9e74123064
9 changed files with 1208 additions and 86 deletions

View File

@@ -0,0 +1,5 @@
interface ClaudeRequestResult {
didCompleteTask: boolean
inputTokens: number
outputTokens: number
}

1
src/shared/Constants.ts Normal file
View File

@@ -0,0 +1 @@
export const DEFAULT_MAX_REQUESTS_PER_TASK = 20

13
src/shared/Tool.ts Normal file
View File

@@ -0,0 +1,13 @@
import { Anthropic } from "@anthropic-ai/sdk"
export type ToolName =
| "write_to_file"
| "read_file"
| "list_files"
| "execute_command"
| "ask_followup_question"
| "attempt_completion"
export type Tool = Omit<Anthropic.Tool, "name"> & {
name: ToolName
}