@zds-ai/cli 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/grok-agent.d.ts +13 -1
- package/dist/agent/grok-agent.js +374 -64
- package/dist/agent/grok-agent.js.map +1 -1
- package/dist/agent/llm-agent.d.ts +276 -0
- package/dist/agent/llm-agent.js +2839 -0
- package/dist/agent/llm-agent.js.map +1 -0
- package/dist/agent/prompt-variables.d.ts +127 -0
- package/dist/agent/prompt-variables.js +325 -0
- package/dist/agent/prompt-variables.js.map +1 -0
- package/dist/bin/fastcaption.sh +56 -0
- package/dist/bin/generate_image_sd.sh +2 -2
- package/dist/grok/client.d.ts +10 -9
- package/dist/grok/client.js +26 -10
- package/dist/grok/client.js.map +1 -1
- package/dist/grok/tools.d.ts +5 -5
- package/dist/grok/tools.js +16 -15
- package/dist/grok/tools.js.map +1 -1
- package/dist/hooks/use-input-handler.d.ts +3 -3
- package/dist/hooks/use-input-handler.js +47 -6
- package/dist/hooks/use-input-handler.js.map +1 -1
- package/dist/index.js +17 -10
- package/dist/index.js.map +1 -1
- package/dist/mcp/client.js +10 -2
- package/dist/mcp/client.js.map +1 -1
- package/dist/tools/character-tool.js +1 -1
- package/dist/tools/character-tool.js.map +1 -1
- package/dist/tools/clear-cache-tool.js +1 -1
- package/dist/tools/clear-cache-tool.js.map +1 -1
- package/dist/tools/file-conversion-tool.js +1 -1
- package/dist/tools/file-conversion-tool.js.map +1 -1
- package/dist/tools/image-tool.d.ts +4 -4
- package/dist/tools/image-tool.js +11 -19
- package/dist/tools/image-tool.js.map +1 -1
- package/dist/tools/internet-tool.js +1 -1
- package/dist/tools/internet-tool.js.map +1 -1
- package/dist/tools/introspect-tool.js +7 -12
- package/dist/tools/introspect-tool.js.map +1 -1
- package/dist/tools/task-tool.js +1 -1
- package/dist/tools/task-tool.js.map +1 -1
- package/dist/tools/text-editor.js +1 -1
- package/dist/tools/text-editor.js.map +1 -1
- package/dist/tools/zsh.js +1 -1
- package/dist/tools/zsh.js.map +1 -1
- package/dist/ui/components/active-task-status.d.ts +2 -2
- package/dist/ui/components/api-key-input.d.ts +2 -2
- package/dist/ui/components/api-key-input.js +2 -2
- package/dist/ui/components/api-key-input.js.map +1 -1
- package/dist/ui/components/backend-status.d.ts +2 -2
- package/dist/ui/components/chat-history.d.ts +1 -1
- package/dist/ui/components/chat-history.js +1 -1
- package/dist/ui/components/chat-history.js.map +1 -1
- package/dist/ui/components/chat-interface.d.ts +2 -2
- package/dist/ui/components/chat-interface.js +4 -0
- package/dist/ui/components/chat-interface.js.map +1 -1
- package/dist/ui/components/context-status.d.ts +2 -2
- package/dist/ui/components/model-selection.js +1 -1
- package/dist/ui/components/model-selection.js.map +1 -1
- package/dist/ui/components/mood-status.d.ts +2 -2
- package/dist/ui/components/persona-status.d.ts +2 -2
- package/dist/utils/chat-history-manager.d.ts +2 -1
- package/dist/utils/chat-history-manager.js.map +1 -1
- package/dist/utils/hook-executor.d.ts +8 -2
- package/dist/utils/hook-executor.js +138 -13
- package/dist/utils/hook-executor.js.map +1 -1
- package/dist/utils/image-encoder.js +4 -3
- package/dist/utils/image-encoder.js.map +1 -1
- package/dist/utils/rephrase-handler.d.ts +2 -2
- package/dist/utils/rephrase-handler.js.map +1 -1
- package/dist/utils/settings-manager.d.ts +5 -0
- package/dist/utils/settings-manager.js +6 -0
- package/dist/utils/settings-manager.js.map +1 -1
- package/dist/utils/slash-commands.d.ts +7 -3
- package/dist/utils/slash-commands.js +42 -11
- package/dist/utils/slash-commands.js.map +1 -1
- package/dist/utils/startup-hook.d.ts +3 -3
- package/dist/utils/startup-hook.js +30 -16
- package/dist/utils/startup-hook.js.map +1 -1
- package/package.json +2 -1
|
@@ -5,6 +5,7 @@ import { EventEmitter } from "events";
|
|
|
5
5
|
export interface ChatEntry {
|
|
6
6
|
type: "user" | "assistant" | "tool_result" | "tool_call" | "system";
|
|
7
7
|
content?: string | ChatCompletionContentPart[];
|
|
8
|
+
originalContent?: string | ChatCompletionContentPart[];
|
|
8
9
|
timestamp: Date;
|
|
9
10
|
tool_calls?: GrokToolCall[];
|
|
10
11
|
toolCall?: GrokToolCall;
|
|
@@ -68,9 +69,11 @@ export declare class GrokAgent extends EventEmitter {
|
|
|
68
69
|
private apiKeyEnvVar;
|
|
69
70
|
private pendingContextEditSession;
|
|
70
71
|
private rephraseState;
|
|
72
|
+
private hookPrefillText;
|
|
71
73
|
constructor(apiKey: string, baseURL?: string, model?: string, maxToolRounds?: number, debugLogFile?: string, startupHookOutput?: string, temperature?: number, maxTokens?: number);
|
|
72
74
|
private startupHookOutput?;
|
|
73
75
|
private systemPrompt;
|
|
76
|
+
private hasRunInstanceHook;
|
|
74
77
|
/**
|
|
75
78
|
* Initialize the agent with dynamic system prompt
|
|
76
79
|
* Must be called after construction
|
|
@@ -131,12 +134,13 @@ export declare class GrokAgent extends EventEmitter {
|
|
|
131
134
|
contextFilePath: string;
|
|
132
135
|
} | null;
|
|
133
136
|
clearPendingContextEditSession(): void;
|
|
134
|
-
setRephraseState(originalAssistantMessageIndex: number, rephraseRequestIndex: number, newResponseIndex: number, messageType: "user" | "system"): void;
|
|
137
|
+
setRephraseState(originalAssistantMessageIndex: number, rephraseRequestIndex: number, newResponseIndex: number, messageType: "user" | "system", prefillText?: string): void;
|
|
135
138
|
getRephraseState(): {
|
|
136
139
|
originalAssistantMessageIndex: number;
|
|
137
140
|
rephraseRequestIndex: number;
|
|
138
141
|
newResponseIndex: number;
|
|
139
142
|
messageType: "user" | "system";
|
|
143
|
+
prefillText?: string;
|
|
140
144
|
} | null;
|
|
141
145
|
clearRephraseState(): void;
|
|
142
146
|
setPersona(persona: string, color?: string): Promise<{
|
|
@@ -229,6 +233,7 @@ export declare class GrokAgent extends EventEmitter {
|
|
|
229
233
|
baseUrl: string;
|
|
230
234
|
apiKeyEnvVar: string;
|
|
231
235
|
model: string;
|
|
236
|
+
supportsVision: boolean;
|
|
232
237
|
};
|
|
233
238
|
/**
|
|
234
239
|
* Restore session state from persistence
|
|
@@ -249,7 +254,14 @@ export declare class GrokAgent extends EventEmitter {
|
|
|
249
254
|
baseUrl?: string;
|
|
250
255
|
apiKeyEnvVar?: string;
|
|
251
256
|
model?: string;
|
|
257
|
+
supportsVision?: boolean;
|
|
252
258
|
}): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Compact conversation context by keeping system prompt and last N messages
|
|
261
|
+
* Reduces context size when it grows too large for backend to handle
|
|
262
|
+
* @returns Number of messages removed
|
|
263
|
+
*/
|
|
264
|
+
compactContext(keepLastMessages?: number): number;
|
|
253
265
|
/**
|
|
254
266
|
* Get all tool instances and their class names for display purposes
|
|
255
267
|
*/
|