mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Add a command-line cline powered by deno
This commit is contained in:
43
cli/types.d.ts
vendored
Normal file
43
cli/types.d.ts
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
export interface ApiHandler {
|
||||
sendMessage(message: string): Promise<string>;
|
||||
createMessage(systemPrompt: string, history: Message[]): AsyncIterable<MessageChunk>;
|
||||
}
|
||||
|
||||
export interface AgentConfig {
|
||||
api: ApiHandler;
|
||||
systemPrompt: string;
|
||||
workingDir: string;
|
||||
debug?: boolean;
|
||||
}
|
||||
|
||||
export type ToolResponse = string;
|
||||
|
||||
export interface Message {
|
||||
role: "user" | "assistant";
|
||||
content: TextBlock[];
|
||||
}
|
||||
|
||||
export interface TextBlock {
|
||||
type: "text";
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface ToolResult {
|
||||
tool: string;
|
||||
params: Record<string, string>;
|
||||
output: string;
|
||||
}
|
||||
|
||||
export interface MessageChunk {
|
||||
type: "text";
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface UsageBlock {
|
||||
type: "usage";
|
||||
usage: {
|
||||
prompt_tokens: number;
|
||||
completion_tokens: number;
|
||||
total_tokens: number;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user