@defai.digital/ax-cli 2.8.0 → 3.0.0
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/README.md +85 -9
- package/dist/agent/context-manager.js +9 -0
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/dependency-resolver.js +13 -5
- package/dist/agent/dependency-resolver.js.map +1 -1
- package/dist/agent/llm-agent.d.ts +48 -0
- package/dist/agent/llm-agent.js +375 -3
- package/dist/agent/llm-agent.js.map +1 -1
- package/dist/agent/subagent-orchestrator.d.ts +4 -0
- package/dist/agent/subagent-orchestrator.js +54 -11
- package/dist/agent/subagent-orchestrator.js.map +1 -1
- package/dist/agent/subagent.js +35 -11
- package/dist/agent/subagent.js.map +1 -1
- package/dist/commands/cache.js +5 -3
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/memory.js +21 -16
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/plan.d.ts +43 -0
- package/dist/commands/plan.js +385 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/constants.d.ts +28 -0
- package/dist/constants.js +29 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/use-enhanced-input.d.ts +5 -1
- package/dist/hooks/use-enhanced-input.js +23 -10
- package/dist/hooks/use-enhanced-input.js.map +1 -1
- package/dist/hooks/use-input-handler.d.ts +11 -1
- package/dist/hooks/use-input-handler.js +270 -2
- package/dist/hooks/use-input-handler.js.map +1 -1
- package/dist/llm/tools.d.ts +5 -0
- package/dist/llm/tools.js +57 -6
- package/dist/llm/tools.js.map +1 -1
- package/dist/mcp/client.js +19 -12
- package/dist/mcp/client.js.map +1 -1
- package/dist/planner/dependency-resolver.d.ts +72 -0
- package/dist/planner/dependency-resolver.js +272 -0
- package/dist/planner/dependency-resolver.js.map +1 -0
- package/dist/planner/index.d.ts +12 -0
- package/dist/planner/index.js +26 -0
- package/dist/planner/index.js.map +1 -0
- package/dist/planner/plan-generator.d.ts +74 -0
- package/dist/planner/plan-generator.js +244 -0
- package/dist/planner/plan-generator.js.map +1 -0
- package/dist/planner/plan-storage.d.ts +98 -0
- package/dist/planner/plan-storage.js +325 -0
- package/dist/planner/plan-storage.js.map +1 -0
- package/dist/planner/prompts/planning-prompt.d.ts +41 -0
- package/dist/planner/prompts/planning-prompt.js +289 -0
- package/dist/planner/prompts/planning-prompt.js.map +1 -0
- package/dist/planner/task-planner.d.ts +135 -0
- package/dist/planner/task-planner.js +493 -0
- package/dist/planner/task-planner.js.map +1 -0
- package/dist/planner/token-estimator.d.ts +63 -0
- package/dist/planner/token-estimator.js +295 -0
- package/dist/planner/token-estimator.js.map +1 -0
- package/dist/planner/types.d.ts +669 -0
- package/dist/planner/types.js +213 -0
- package/dist/planner/types.js.map +1 -0
- package/dist/schemas/confirmation-schemas.d.ts +5 -0
- package/dist/schemas/confirmation-schemas.js +7 -0
- package/dist/schemas/confirmation-schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +4 -4
- package/dist/tools/bash-output.d.ts +25 -0
- package/dist/tools/bash-output.js +145 -0
- package/dist/tools/bash-output.js.map +1 -0
- package/dist/tools/bash.d.ts +46 -2
- package/dist/tools/bash.js +241 -67
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/search.js +15 -2
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/text-editor.js +4 -2
- package/dist/tools/text-editor.js.map +1 -1
- package/dist/ui/components/chat-history.d.ts +1 -0
- package/dist/ui/components/chat-history.js +125 -41
- package/dist/ui/components/chat-history.js.map +1 -1
- package/dist/ui/components/chat-input.js +10 -3
- package/dist/ui/components/chat-input.js.map +1 -1
- package/dist/ui/components/chat-interface.js +152 -44
- package/dist/ui/components/chat-interface.js.map +1 -1
- package/dist/ui/components/collapsible-tool-result.d.ts +26 -0
- package/dist/ui/components/collapsible-tool-result.js +172 -0
- package/dist/ui/components/collapsible-tool-result.js.map +1 -0
- package/dist/ui/components/command-suggestions.js +2 -1
- package/dist/ui/components/command-suggestions.js.map +1 -1
- package/dist/ui/components/confirmation-dialog.js +25 -36
- package/dist/ui/components/confirmation-dialog.js.map +1 -1
- package/dist/ui/components/index.d.ts +8 -0
- package/dist/ui/components/index.js +9 -0
- package/dist/ui/components/index.js.map +1 -1
- package/dist/ui/components/keyboard-hints.d.ts +35 -0
- package/dist/ui/components/keyboard-hints.js +134 -0
- package/dist/ui/components/keyboard-hints.js.map +1 -0
- package/dist/ui/components/loading-spinner.d.ts +2 -1
- package/dist/ui/components/loading-spinner.js +86 -34
- package/dist/ui/components/loading-spinner.js.map +1 -1
- package/dist/ui/components/phase-progress.d.ts +21 -0
- package/dist/ui/components/phase-progress.js +228 -0
- package/dist/ui/components/phase-progress.js.map +1 -0
- package/dist/ui/components/quick-actions.d.ts +12 -0
- package/dist/ui/components/quick-actions.js +122 -0
- package/dist/ui/components/quick-actions.js.map +1 -0
- package/dist/ui/components/reasoning-display.d.ts +0 -80
- package/dist/ui/components/reasoning-display.js +0 -83
- package/dist/ui/components/reasoning-display.js.map +1 -1
- package/dist/ui/components/status-bar.d.ts +25 -0
- package/dist/ui/components/status-bar.js +125 -0
- package/dist/ui/components/status-bar.js.map +1 -0
- package/dist/ui/components/toast-notification.d.ts +123 -0
- package/dist/ui/components/toast-notification.js +143 -0
- package/dist/ui/components/toast-notification.js.map +1 -0
- package/dist/ui/components/welcome-panel.d.ts +10 -0
- package/dist/ui/components/welcome-panel.js +107 -0
- package/dist/ui/components/welcome-panel.js.map +1 -0
- package/dist/utils/background-task-manager.d.ts +95 -0
- package/dist/utils/background-task-manager.js +330 -0
- package/dist/utils/background-task-manager.js.map +1 -0
- package/dist/utils/confirmation-service.js +8 -3
- package/dist/utils/confirmation-service.js.map +1 -1
- package/dist/utils/message-optimizer.d.ts +1 -0
- package/dist/utils/message-optimizer.js +7 -1
- package/dist/utils/message-optimizer.js.map +1 -1
- package/dist/utils/project-analyzer.js +5 -2
- package/dist/utils/project-analyzer.js.map +1 -1
- package/package.json +2 -1
|
@@ -4,7 +4,7 @@ import { DiffRenderer } from "./diff-renderer.js";
|
|
|
4
4
|
import { MarkdownRenderer } from "../utils/markdown-renderer.js";
|
|
5
5
|
import { ReasoningDisplay } from "./reasoning-display.js";
|
|
6
6
|
// Memoized ChatEntry component to prevent unnecessary re-renders
|
|
7
|
-
const MemoizedChatEntry = React.memo(({ entry, index }) => {
|
|
7
|
+
const MemoizedChatEntry = React.memo(({ entry, index, verboseMode = false }) => {
|
|
8
8
|
const renderDiff = (diffContent, filename) => {
|
|
9
9
|
return (React.createElement(DiffRenderer, { diffContent: diffContent, filename: filename, terminalWidth: 80 }));
|
|
10
10
|
};
|
|
@@ -46,7 +46,12 @@ const MemoizedChatEntry = React.memo(({ entry, index }) => {
|
|
|
46
46
|
React.createElement(Text, { color: "white" }, entry.content.trim())) : (
|
|
47
47
|
// If no tool calls, render as markdown
|
|
48
48
|
React.createElement(MarkdownRenderer, { content: entry.content.trim() })),
|
|
49
|
-
entry.isStreaming && React.createElement(Text, { color: "cyan" }, "\u2588")
|
|
49
|
+
entry.isStreaming && React.createElement(Text, { color: "cyan" }, "\u2588"),
|
|
50
|
+
!entry.isStreaming && entry.durationMs && (React.createElement(Text, { color: "gray", dimColor: true },
|
|
51
|
+
"\u23F1 ",
|
|
52
|
+
entry.durationMs >= 1000
|
|
53
|
+
? `${(entry.durationMs / 1000).toFixed(1)}s`
|
|
54
|
+
: `${entry.durationMs}ms`))))));
|
|
50
55
|
case "tool_call":
|
|
51
56
|
case "tool_result":
|
|
52
57
|
const getToolActionName = (toolName) => {
|
|
@@ -68,14 +73,16 @@ const MemoizedChatEntry = React.memo(({ entry, index }) => {
|
|
|
68
73
|
return "Create";
|
|
69
74
|
case "bash":
|
|
70
75
|
return "Bash";
|
|
76
|
+
case "bash_output":
|
|
77
|
+
return "TaskOutput";
|
|
71
78
|
case "search":
|
|
72
79
|
return "Search";
|
|
73
80
|
case "create_todo_list":
|
|
74
|
-
return "
|
|
81
|
+
return "Todo";
|
|
75
82
|
case "update_todo_list":
|
|
76
|
-
return "
|
|
83
|
+
return "Todo";
|
|
77
84
|
default:
|
|
78
|
-
return
|
|
85
|
+
return toolName;
|
|
79
86
|
}
|
|
80
87
|
};
|
|
81
88
|
const toolName = entry.toolCall?.function?.name || "unknown";
|
|
@@ -95,75 +102,152 @@ const MemoizedChatEntry = React.memo(({ entry, index }) => {
|
|
|
95
102
|
}
|
|
96
103
|
return "";
|
|
97
104
|
};
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
const formatToolContent = (content, toolName) => {
|
|
102
|
-
if (toolName.startsWith("mcp__")) {
|
|
105
|
+
// Get full tool arguments for verbose mode
|
|
106
|
+
const getToolArguments = (toolCall) => {
|
|
107
|
+
if (toolCall?.function?.arguments) {
|
|
103
108
|
try {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (Array.isArray(parsed)) {
|
|
107
|
-
// For arrays, show a summary instead of full JSON
|
|
108
|
-
return `Found ${parsed.length} items`;
|
|
109
|
-
}
|
|
110
|
-
else if (typeof parsed === 'object') {
|
|
111
|
-
// For objects, show a formatted version
|
|
112
|
-
return JSON.stringify(parsed, null, 2);
|
|
113
|
-
}
|
|
109
|
+
const args = JSON.parse(toolCall.function.arguments);
|
|
110
|
+
return JSON.stringify(args, null, 2);
|
|
114
111
|
}
|
|
115
112
|
catch {
|
|
116
|
-
|
|
117
|
-
return content;
|
|
113
|
+
return toolCall.function.arguments || "";
|
|
118
114
|
}
|
|
119
115
|
}
|
|
120
|
-
return
|
|
116
|
+
return "";
|
|
117
|
+
};
|
|
118
|
+
// Get a brief summary of the result for concise mode
|
|
119
|
+
const getBriefSummary = (content, toolName) => {
|
|
120
|
+
if (!content)
|
|
121
|
+
return "";
|
|
122
|
+
// Count lines for file content
|
|
123
|
+
const lineCount = content.split("\n").length;
|
|
124
|
+
switch (toolName) {
|
|
125
|
+
case "view_file":
|
|
126
|
+
return `${lineCount} lines`;
|
|
127
|
+
case "create_file":
|
|
128
|
+
return `${lineCount} lines written`;
|
|
129
|
+
case "str_replace_editor":
|
|
130
|
+
// Extract just the first line which usually has the summary
|
|
131
|
+
const firstLine = content.split("\n")[0];
|
|
132
|
+
if (firstLine.includes("Updated")) {
|
|
133
|
+
return firstLine.replace(/^Updated\s+/, "").trim();
|
|
134
|
+
}
|
|
135
|
+
return "updated";
|
|
136
|
+
case "bash":
|
|
137
|
+
if (content.includes("Background task started")) {
|
|
138
|
+
return "→ background";
|
|
139
|
+
}
|
|
140
|
+
if (lineCount <= 1) {
|
|
141
|
+
// Short output, show it
|
|
142
|
+
return content.trim().slice(0, 50) + (content.length > 50 ? "..." : "");
|
|
143
|
+
}
|
|
144
|
+
return `${lineCount} lines output`;
|
|
145
|
+
case "search":
|
|
146
|
+
// Try to count matches
|
|
147
|
+
const matches = content.match(/Found \d+ match/);
|
|
148
|
+
if (matches)
|
|
149
|
+
return matches[0];
|
|
150
|
+
return `${lineCount} lines`;
|
|
151
|
+
default:
|
|
152
|
+
if (lineCount <= 1 && content.length < 60) {
|
|
153
|
+
return content.trim();
|
|
154
|
+
}
|
|
155
|
+
return `${lineCount} lines`;
|
|
156
|
+
}
|
|
121
157
|
};
|
|
122
|
-
const
|
|
158
|
+
const filePath = getFilePath(entry.toolCall);
|
|
159
|
+
const toolArgs = getToolArguments(entry.toolCall);
|
|
160
|
+
const isExecuting = entry.type === "tool_call" || !entry.toolResult;
|
|
161
|
+
const isSuccess = entry.toolResult?.success ?? true;
|
|
162
|
+
const briefSummary = !isExecuting ? getBriefSummary(entry.content, toolName) : "";
|
|
163
|
+
const shouldShowDiff = verboseMode &&
|
|
164
|
+
entry.toolCall?.function?.name === "str_replace_editor" &&
|
|
123
165
|
entry.toolResult?.success &&
|
|
124
|
-
entry.content.includes("Updated") &&
|
|
125
166
|
entry.content.includes("---") &&
|
|
126
167
|
entry.content.includes("+++");
|
|
127
|
-
const shouldShowFileContent =
|
|
128
|
-
entry.toolCall?.function?.name === "
|
|
129
|
-
|
|
130
|
-
|
|
168
|
+
const shouldShowFileContent = verboseMode &&
|
|
169
|
+
(entry.toolCall?.function?.name === "view_file" ||
|
|
170
|
+
entry.toolCall?.function?.name === "create_file") &&
|
|
171
|
+
entry.toolResult?.success;
|
|
172
|
+
const shouldShowFullOutput = verboseMode &&
|
|
173
|
+
!shouldShowDiff &&
|
|
174
|
+
!shouldShowFileContent;
|
|
175
|
+
// CONCISE MODE (default): Single line summary
|
|
176
|
+
if (!verboseMode) {
|
|
177
|
+
return (React.createElement(Box, { key: index, flexDirection: "row", marginTop: 0 },
|
|
178
|
+
React.createElement(Text, { color: "magenta" }, "\u23FA"),
|
|
179
|
+
React.createElement(Text, { color: "white" },
|
|
180
|
+
" ",
|
|
181
|
+
filePath ? `${actionName}(${filePath})` : actionName),
|
|
182
|
+
isExecuting ? (React.createElement(Text, { color: "cyan" }, " ...")) : (React.createElement(React.Fragment, null,
|
|
183
|
+
React.createElement(Text, { color: isSuccess ? "green" : "red" },
|
|
184
|
+
" ",
|
|
185
|
+
isSuccess ? "✓" : "✗"),
|
|
186
|
+
briefSummary && (React.createElement(Text, { color: "gray", dimColor: true },
|
|
187
|
+
" ",
|
|
188
|
+
briefSummary))))));
|
|
189
|
+
}
|
|
190
|
+
// VERBOSE MODE: Full details
|
|
131
191
|
return (React.createElement(Box, { key: index, flexDirection: "column", marginTop: 1 },
|
|
132
192
|
React.createElement(Box, null,
|
|
133
193
|
React.createElement(Text, { color: "magenta" }, "\u23FA"),
|
|
134
194
|
React.createElement(Text, { color: "white" },
|
|
135
195
|
" ",
|
|
136
|
-
filePath ? `${actionName}(${filePath})` : actionName)
|
|
196
|
+
filePath ? `${actionName}(${filePath})` : actionName),
|
|
197
|
+
entry.toolCall?.id && (React.createElement(Text, { color: "gray", dimColor: true },
|
|
198
|
+
" [",
|
|
199
|
+
entry.toolCall.id.slice(0, 8),
|
|
200
|
+
"]")),
|
|
201
|
+
!isExecuting && (React.createElement(Text, { color: isSuccess ? "green" : "red" },
|
|
202
|
+
" ",
|
|
203
|
+
isSuccess ? "✓" : "✗"))),
|
|
204
|
+
toolArgs && (React.createElement(Box, { marginLeft: 2, flexDirection: "column" },
|
|
205
|
+
React.createElement(Text, { color: "blue", dimColor: true },
|
|
206
|
+
"Args: ",
|
|
207
|
+
toolArgs.length > 100 ? toolArgs.slice(0, 100) + "..." : toolArgs))),
|
|
137
208
|
React.createElement(Box, { marginLeft: 2, flexDirection: "column" }, isExecuting ? (React.createElement(Text, { color: "cyan" }, "\u23BF Executing...")) : shouldShowFileContent ? (React.createElement(Box, { flexDirection: "column" },
|
|
138
|
-
React.createElement(Text, { color: "gray" },
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
|
|
209
|
+
React.createElement(Text, { color: "gray" },
|
|
210
|
+
"\u23BF File contents (",
|
|
211
|
+
entry.content.split("\n").length,
|
|
212
|
+
" lines):"),
|
|
213
|
+
React.createElement(Box, { marginLeft: 2, flexDirection: "column" }, renderFileContent(entry.content)))) : shouldShowDiff ? (React.createElement(Box, { flexDirection: "column" },
|
|
214
|
+
React.createElement(Text, { color: "gray" },
|
|
215
|
+
"\u23BF ",
|
|
216
|
+
entry.content.split("\n")[0]),
|
|
217
|
+
React.createElement(Box, { marginLeft: 2, flexDirection: "column" }, renderDiff(entry.content, filePath)))) : shouldShowFullOutput ? (React.createElement(Text, { color: "gray" },
|
|
144
218
|
"\u23BF ",
|
|
145
|
-
|
|
146
|
-
shouldShowDiff && !isExecuting && (React.createElement(Box, { marginLeft: 4, flexDirection: "column" }, renderDiff(entry.content, filePath)))));
|
|
219
|
+
entry.content)) : null)));
|
|
147
220
|
default:
|
|
148
221
|
return null;
|
|
149
222
|
}
|
|
150
223
|
});
|
|
151
224
|
MemoizedChatEntry.displayName = "MemoizedChatEntry";
|
|
152
|
-
export const ChatHistory = React.memo(function ChatHistory({ entries, isConfirmationActive = false, }) {
|
|
225
|
+
export const ChatHistory = React.memo(function ChatHistory({ entries, isConfirmationActive = false, verboseMode = false, }) {
|
|
153
226
|
// Filter out tool_call entries with "Executing..." when confirmation is active
|
|
154
227
|
const filteredEntries = isConfirmationActive
|
|
155
228
|
? entries.filter((entry) => !(entry.type === "tool_call" && entry.content === "Executing..."))
|
|
156
229
|
: entries;
|
|
157
230
|
// Show ALL entries - removed the .slice(-20) limitation
|
|
158
231
|
// Scrolling will be handled by the terminal's native scroll capability
|
|
159
|
-
return (React.createElement(Box, { flexDirection: "column" }, filteredEntries.map((entry, index) =>
|
|
232
|
+
return (React.createElement(Box, { flexDirection: "column" }, filteredEntries.map((entry, index) => {
|
|
233
|
+
// Safely get timestamp - handle both Date objects and serialized strings
|
|
234
|
+
const timestamp = entry.timestamp instanceof Date
|
|
235
|
+
? entry.timestamp.getTime()
|
|
236
|
+
: new Date(entry.timestamp).getTime() || index;
|
|
237
|
+
return (React.createElement(MemoizedChatEntry, { key: `${timestamp}-${index}`, entry: entry, index: index, verboseMode: verboseMode }));
|
|
238
|
+
})));
|
|
160
239
|
}, (prevProps, nextProps) => {
|
|
161
240
|
// Only re-render if entries array reference changed AND last entry is different
|
|
162
241
|
// This prevents re-renders when unrelated state updates happen
|
|
163
242
|
if (prevProps.entries === nextProps.entries &&
|
|
164
|
-
prevProps.isConfirmationActive === nextProps.isConfirmationActive
|
|
243
|
+
prevProps.isConfirmationActive === nextProps.isConfirmationActive &&
|
|
244
|
+
prevProps.verboseMode === nextProps.verboseMode) {
|
|
165
245
|
return true; // Props are equal, skip re-render
|
|
166
246
|
}
|
|
247
|
+
// Always re-render if verbose mode changed
|
|
248
|
+
if (prevProps.verboseMode !== nextProps.verboseMode) {
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
167
251
|
// If array length is same and last entry is identical, skip re-render
|
|
168
252
|
// (handles case where array is recreated but content is same)
|
|
169
253
|
const prevLast = prevProps.entries[prevProps.entries.length - 1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-history.js","sourceRoot":"","sources":["../../../src/ui/components/chat-history.tsx"],"names":[],"mapp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QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEjE,OAAO,CACL,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,OAAO,CAAC,MAAM;QACrD,QAAQ,KAAK,QAAQ;QACrB,SAAS,CAAC,oBAAoB,KAAK,SAAS,CAAC,oBAAoB,CAClE,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -53,8 +53,10 @@ export function ChatInput({ input, cursorPosition, isProcessing, isStreaming, })
|
|
|
53
53
|
// Single line input box
|
|
54
54
|
const cursorChar = input.slice(cursorPosition, cursorPosition + 1) || " ";
|
|
55
55
|
const afterCursorText = input.slice(cursorPosition + 1);
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// Show character count when input has content (subtle indicator)
|
|
57
|
+
const showCharCount = input.length > 0;
|
|
58
|
+
return (React.createElement(Box, { borderStyle: "round", borderColor: borderColor, paddingX: 1, paddingY: 0, marginTop: 1, justifyContent: "space-between" },
|
|
59
|
+
React.createElement(Box, { flexGrow: 1 },
|
|
58
60
|
React.createElement(Text, { color: promptColor }, "\u276F "),
|
|
59
61
|
isPlaceholder ? (React.createElement(React.Fragment, null,
|
|
60
62
|
React.createElement(Text, { color: "gray", dimColor: true }, placeholderText),
|
|
@@ -62,6 +64,11 @@ export function ChatInput({ input, cursorPosition, isProcessing, isStreaming, })
|
|
|
62
64
|
beforeCursor,
|
|
63
65
|
showCursor && (React.createElement(Text, { backgroundColor: "white", color: "black" }, cursorChar)),
|
|
64
66
|
!showCursor && cursorChar !== " " && cursorChar,
|
|
65
|
-
afterCursorText)))
|
|
67
|
+
afterCursorText))),
|
|
68
|
+
showCharCount && !isProcessing && !isStreaming && (React.createElement(Box, { marginLeft: 1 },
|
|
69
|
+
React.createElement(Text, { color: "gray", dimColor: true },
|
|
70
|
+
"[",
|
|
71
|
+
input.length,
|
|
72
|
+
"]")))));
|
|
66
73
|
}
|
|
67
74
|
//# sourceMappingURL=chat-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input.js","sourceRoot":"","sources":["../../../src/ui/components/chat-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,GACI;IACf,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;IAEpD,iCAAiC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAErC,yCAAyC;IACzC,IAAI,gBAAgB,GAAG,CAAC,CAAC;IACzB,IAAI,gBAAgB,GAAG,CAAC,CAAC;IACzB,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,IAAI,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,cAAc,EAAE,CAAC;YACnD,gBAAgB,GAAG,CAAC,CAAC;YACrB,gBAAgB,GAAG,cAAc,GAAG,UAAU,CAAC;YAC/C,MAAM;QACR,CAAC;QACD,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,iBAAiB;IACtD,CAAC;IAED,MAAM,UAAU,GAAG,CAAC,YAAY,IAAI,CAAC,WAAW,CAAC;IACjD,MAAM,WAAW,GAAG,YAAY,IAAI,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACpE,MAAM,WAAW,GAA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,EAAC,MAAM,EAAC,QAAQ,UACxB,eAAe,CACX;gBACN,UAAU,IAAI,CACb,oBAAC,IAAI,IAAC,eAAe,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,IACxC,GAAG,CACC,CACR,CACA,CACJ,CAAC,CAAC,CAAC,CACF,oBAAC,IAAI;gBACF,YAAY;gBACZ,UAAU,IAAI,CACb,oBAAC,IAAI,IAAC,eAAe,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,IACxC,UAAU,CACN,CACR;gBACA,CAAC,UAAU,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU;gBAC/C,eAAe,CACX,CACR,CACG;QAEL,aAAa,IAAI,CAAC,YAAY,IAAI,CAAC,WAAW,IAAI,CACjD,oBAAC,GAAG,IAAC,UAAU,EAAE,CAAC;YAChB,oBAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ;;gBACvB,KAAK,CAAC,MAAM;oBACT,CACH,CACP,CACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef, useMemo } from "react";
|
|
2
|
-
import { Box
|
|
1
|
+
import React, { useState, useEffect, useRef, useMemo, useCallback } from "react";
|
|
2
|
+
import { Box } from "ink";
|
|
3
3
|
import { useInputHandler } from "../../hooks/use-input-handler.js";
|
|
4
4
|
import { LoadingSpinner } from "./loading-spinner.js";
|
|
5
5
|
import { CommandSuggestions } from "./command-suggestions.js";
|
|
6
6
|
import { ChatHistory } from "./chat-history.js";
|
|
7
7
|
import { ChatInput } from "./chat-input.js";
|
|
8
|
-
import {
|
|
8
|
+
import { StatusBar } from "./status-bar.js";
|
|
9
|
+
import { QuickActions } from "./quick-actions.js";
|
|
10
|
+
import { WelcomePanel } from "./welcome-panel.js";
|
|
9
11
|
import ConfirmationDialog from "./confirmation-dialog.js";
|
|
12
|
+
import { ToastContainer, useToasts, TOAST_MESSAGES } from "./toast-notification.js";
|
|
10
13
|
import { ConfirmationService, } from "../../utils/confirmation-service.js";
|
|
11
14
|
import ApiKeyInput from "./api-key-input.js";
|
|
12
15
|
import cfonts from "cfonts";
|
|
13
16
|
import { getVersion } from "../../utils/version.js";
|
|
14
17
|
import { getHistoryManager } from "../../utils/history-manager.js";
|
|
18
|
+
import { getMcpConnectionCount } from "../../llm/tools.js";
|
|
19
|
+
import { BackgroundTaskManager } from "../../utils/background-task-manager.js";
|
|
20
|
+
import clipboardy from "clipboardy";
|
|
15
21
|
import path from "path";
|
|
16
22
|
// Get current project folder name
|
|
17
23
|
function getCurrentProjectName() {
|
|
@@ -33,12 +39,65 @@ function ChatInterfaceWithAgent({ agent, initialMessage, loadPreviousHistory = f
|
|
|
33
39
|
const [contextPercentage, setContextPercentage] = useState(0);
|
|
34
40
|
const [showAutoPrune, setShowAutoPrune] = useState(false);
|
|
35
41
|
const [confirmationOptions, setConfirmationOptions] = useState(null);
|
|
42
|
+
const [showQuickActions, setShowQuickActions] = useState(false);
|
|
43
|
+
// Flash states for mode toggle visual feedback
|
|
44
|
+
const [flashAutoEdit, setFlashAutoEdit] = useState(false);
|
|
45
|
+
const [flashVerbose, setFlashVerbose] = useState(false);
|
|
46
|
+
const [flashBackground, setFlashBackground] = useState(false);
|
|
36
47
|
const scrollRef = useRef();
|
|
37
48
|
const processingStartTime = useRef(0);
|
|
38
49
|
const lastPercentageRef = useRef(0); // Store last percentage value
|
|
39
50
|
const lastPercentageUpdateTime = useRef(0); // Store last update timestamp
|
|
51
|
+
const contextLowWarningShown = useRef(false); // Track if low context warning was shown
|
|
52
|
+
// Toast notification system
|
|
53
|
+
const { toasts, removeToast, addToast } = useToasts();
|
|
40
54
|
const confirmationService = ConfirmationService.getInstance();
|
|
41
|
-
const
|
|
55
|
+
const projectName = getCurrentProjectName();
|
|
56
|
+
const version = getVersion();
|
|
57
|
+
// Flash effect helper - triggers a brief highlight then clears
|
|
58
|
+
const triggerFlash = useCallback((setter) => {
|
|
59
|
+
setter(true);
|
|
60
|
+
setTimeout(() => setter(false), 300);
|
|
61
|
+
}, []);
|
|
62
|
+
// Mode toggle handlers with toast feedback
|
|
63
|
+
const handleVerboseModeChange = useCallback((enabled) => {
|
|
64
|
+
triggerFlash(setFlashVerbose);
|
|
65
|
+
addToast(enabled ? TOAST_MESSAGES.verboseOn : TOAST_MESSAGES.verboseOff);
|
|
66
|
+
}, [triggerFlash, addToast]);
|
|
67
|
+
const handleBackgroundModeChange = useCallback((enabled) => {
|
|
68
|
+
triggerFlash(setFlashBackground);
|
|
69
|
+
addToast(enabled ? TOAST_MESSAGES.backgroundOn : TOAST_MESSAGES.backgroundOff);
|
|
70
|
+
}, [triggerFlash, addToast]);
|
|
71
|
+
const handleAutoEditModeChange = useCallback((enabled) => {
|
|
72
|
+
triggerFlash(setFlashAutoEdit);
|
|
73
|
+
addToast(enabled ? TOAST_MESSAGES.autoEditOn : TOAST_MESSAGES.autoEditOff);
|
|
74
|
+
}, [triggerFlash, addToast]);
|
|
75
|
+
const handleTaskMovedToBackground = useCallback((taskId) => {
|
|
76
|
+
addToast(TOAST_MESSAGES.taskMoved(taskId));
|
|
77
|
+
}, [addToast]);
|
|
78
|
+
const handleOperationInterrupted = useCallback(() => {
|
|
79
|
+
addToast(TOAST_MESSAGES.interrupted);
|
|
80
|
+
}, [addToast]);
|
|
81
|
+
const handleChatCleared = useCallback(() => {
|
|
82
|
+
addToast(TOAST_MESSAGES.cleared);
|
|
83
|
+
}, [addToast]);
|
|
84
|
+
const handleCopyLastResponse = useCallback(() => {
|
|
85
|
+
// Find the last assistant message
|
|
86
|
+
const lastAssistantEntry = [...chatHistory].reverse().find(entry => entry.type === "assistant");
|
|
87
|
+
if (lastAssistantEntry && lastAssistantEntry.content) {
|
|
88
|
+
try {
|
|
89
|
+
clipboardy.writeSync(lastAssistantEntry.content);
|
|
90
|
+
addToast(TOAST_MESSAGES.copied);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
addToast({ message: "Failed to copy to clipboard", type: "error", icon: "❌" });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
addToast({ message: "No response to copy", type: "info", icon: "ℹ" });
|
|
98
|
+
}
|
|
99
|
+
}, [chatHistory, addToast]);
|
|
100
|
+
const { input, cursorPosition, showCommandSuggestions, selectedCommandIndex, commandSuggestions, autoEditEnabled, verboseMode, backgroundMode, } = useInputHandler({
|
|
42
101
|
agent,
|
|
43
102
|
chatHistory,
|
|
44
103
|
setChatHistory,
|
|
@@ -50,6 +109,14 @@ function ChatInterfaceWithAgent({ agent, initialMessage, loadPreviousHistory = f
|
|
|
50
109
|
isProcessing,
|
|
51
110
|
isStreaming,
|
|
52
111
|
isConfirmationActive: !!confirmationOptions,
|
|
112
|
+
onQuickActionsToggle: () => setShowQuickActions((prev) => !prev),
|
|
113
|
+
onVerboseModeChange: handleVerboseModeChange,
|
|
114
|
+
onBackgroundModeChange: handleBackgroundModeChange,
|
|
115
|
+
onAutoEditModeChange: handleAutoEditModeChange,
|
|
116
|
+
onTaskMovedToBackground: handleTaskMovedToBackground,
|
|
117
|
+
onOperationInterrupted: handleOperationInterrupted,
|
|
118
|
+
onChatCleared: handleChatCleared,
|
|
119
|
+
onCopyLastResponse: handleCopyLastResponse,
|
|
53
120
|
});
|
|
54
121
|
useEffect(() => {
|
|
55
122
|
// Only clear console on non-Windows platforms or if not PowerShell
|
|
@@ -269,6 +336,8 @@ function ChatInterfaceWithAgent({ agent, initialMessage, loadPreviousHistory = f
|
|
|
269
336
|
return; // Skip if updated less than 500ms ago
|
|
270
337
|
}
|
|
271
338
|
// Use setImmediate for non-blocking, async UI updates (Node.js equivalent of RAF)
|
|
339
|
+
// Track setTimeout for proper cleanup to prevent memory leaks
|
|
340
|
+
let autoPruneTimeoutId = null;
|
|
272
341
|
const immediateId = setImmediate(() => {
|
|
273
342
|
const percentage = agent.getContextPercentage();
|
|
274
343
|
// Detect auto-prune: if percentage increases by more than 10%, pruning happened
|
|
@@ -277,14 +346,26 @@ function ChatInterfaceWithAgent({ agent, initialMessage, loadPreviousHistory = f
|
|
|
277
346
|
percentage > lastPercentageRef.current + 10) {
|
|
278
347
|
setShowAutoPrune(true);
|
|
279
348
|
// Hide "auto-prune" after 3 seconds
|
|
280
|
-
setTimeout(() => setShowAutoPrune(false), 3000);
|
|
349
|
+
autoPruneTimeoutId = setTimeout(() => setShowAutoPrune(false), 3000);
|
|
350
|
+
// Reset low warning flag after prune (context recovered)
|
|
351
|
+
contextLowWarningShown.current = false;
|
|
352
|
+
}
|
|
353
|
+
// Show one-time warning when context drops below 20%
|
|
354
|
+
if (percentage <= 20 && !contextLowWarningShown.current && lastPercentageRef.current > 20) {
|
|
355
|
+
addToast(TOAST_MESSAGES.contextLow);
|
|
356
|
+
contextLowWarningShown.current = true;
|
|
281
357
|
}
|
|
282
358
|
lastPercentageRef.current = percentage; // Store percentage value
|
|
283
359
|
lastPercentageUpdateTime.current = now; // Store timestamp
|
|
284
360
|
setContextPercentage(percentage);
|
|
285
361
|
});
|
|
286
|
-
return () =>
|
|
287
|
-
|
|
362
|
+
return () => {
|
|
363
|
+
clearImmediate(immediateId);
|
|
364
|
+
// Clean up auto-prune timeout to prevent memory leaks on unmount
|
|
365
|
+
if (autoPruneTimeoutId)
|
|
366
|
+
clearTimeout(autoPruneTimeoutId);
|
|
367
|
+
};
|
|
368
|
+
}, [agent, chatHistory.length, isStreaming, addToast]); // Only when length changes and not streaming
|
|
288
369
|
// Save history whenever it changes (debounced)
|
|
289
370
|
// Only save when NOT streaming to avoid constant disk I/O during active conversation
|
|
290
371
|
useEffect(() => {
|
|
@@ -310,48 +391,75 @@ function ChatInterfaceWithAgent({ agent, initialMessage, loadPreviousHistory = f
|
|
|
310
391
|
setProcessingTime(0);
|
|
311
392
|
processingStartTime.current = 0;
|
|
312
393
|
};
|
|
394
|
+
// Get MCP server count safely
|
|
395
|
+
const mcpServerCount = useMemo(() => {
|
|
396
|
+
try {
|
|
397
|
+
return getMcpConnectionCount();
|
|
398
|
+
}
|
|
399
|
+
catch {
|
|
400
|
+
return 0;
|
|
401
|
+
}
|
|
402
|
+
}, [chatHistory.length]); // Recalculate when chat changes (MCP servers might connect)
|
|
403
|
+
// Get background task count (running tasks)
|
|
404
|
+
const [backgroundTaskCount, setBackgroundTaskCount] = useState(0);
|
|
405
|
+
// Listen for background task events
|
|
406
|
+
useEffect(() => {
|
|
407
|
+
const manager = BackgroundTaskManager.getInstance();
|
|
408
|
+
// Initial count
|
|
409
|
+
setBackgroundTaskCount(manager.listTasks().filter(t => t.status === 'running').length);
|
|
410
|
+
// Task completed handler
|
|
411
|
+
const handleTaskComplete = ({ taskId, status }) => {
|
|
412
|
+
const taskInfo = manager.getTaskInfo(taskId);
|
|
413
|
+
const command = taskInfo?.command || taskId;
|
|
414
|
+
if (status === 'completed') {
|
|
415
|
+
addToast(TOAST_MESSAGES.taskCompleted(taskId, command));
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
addToast(TOAST_MESSAGES.taskFailed(taskId, command));
|
|
419
|
+
}
|
|
420
|
+
// Update running count
|
|
421
|
+
setBackgroundTaskCount(manager.listTasks().filter(t => t.status === 'running').length);
|
|
422
|
+
};
|
|
423
|
+
// Task started handler
|
|
424
|
+
const handleTaskStarted = () => {
|
|
425
|
+
setBackgroundTaskCount(manager.listTasks().filter(t => t.status === 'running').length);
|
|
426
|
+
};
|
|
427
|
+
// Task killed handler
|
|
428
|
+
const handleTaskKilled = () => {
|
|
429
|
+
setBackgroundTaskCount(manager.listTasks().filter(t => t.status === 'running').length);
|
|
430
|
+
};
|
|
431
|
+
manager.on('taskComplete', handleTaskComplete);
|
|
432
|
+
manager.on('taskStarted', handleTaskStarted);
|
|
433
|
+
manager.on('taskAdopted', handleTaskStarted);
|
|
434
|
+
manager.on('taskKilled', handleTaskKilled);
|
|
435
|
+
return () => {
|
|
436
|
+
manager.off('taskComplete', handleTaskComplete);
|
|
437
|
+
manager.off('taskStarted', handleTaskStarted);
|
|
438
|
+
manager.off('taskAdopted', handleTaskStarted);
|
|
439
|
+
manager.off('taskKilled', handleTaskKilled);
|
|
440
|
+
};
|
|
441
|
+
}, [addToast]);
|
|
442
|
+
// Handler for quick action selection
|
|
443
|
+
const handleQuickActionSelect = (command) => {
|
|
444
|
+
setShowQuickActions(false);
|
|
445
|
+
// Process the command by simulating user input
|
|
446
|
+
if (command === "exit") {
|
|
447
|
+
process.exit(0);
|
|
448
|
+
}
|
|
449
|
+
// For slash commands, we'll need to trigger processing
|
|
450
|
+
// This can be done by directly calling the input handler or agent
|
|
451
|
+
};
|
|
313
452
|
return (React.createElement(Box, { flexDirection: "column", paddingX: 2 },
|
|
314
|
-
chatHistory.length === 0 && !confirmationOptions && (React.createElement(
|
|
315
|
-
React.createElement(Text, { color: "cyan", bold: true }, "Tips for getting started:"),
|
|
316
|
-
React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
317
|
-
React.createElement(Text, { color: "gray" }, "1. Ask questions, edit files, or run commands."),
|
|
318
|
-
React.createElement(Text, { color: "gray" }, "2. Be specific for the best results."),
|
|
319
|
-
React.createElement(Text, { color: "gray" }, "3. use /init and CUSTOM.md to improve your ax-cli."),
|
|
320
|
-
React.createElement(Text, { color: "gray" }, "4. Press Shift+Tab to toggle auto-edit mode."),
|
|
321
|
-
React.createElement(Text, { color: "gray" }, "5. /help for more information.")))),
|
|
322
|
-
React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
323
|
-
React.createElement(Text, { color: "gray" }, "Type your request in natural language. Ctrl+C to clear, 'exit' to quit.")),
|
|
453
|
+
chatHistory.length === 0 && !confirmationOptions && !showQuickActions && (React.createElement(WelcomePanel, { projectName: projectName })),
|
|
324
454
|
React.createElement(Box, { flexDirection: "column", ref: scrollRef },
|
|
325
|
-
React.createElement(ChatHistory, { entries: chatHistory, isConfirmationActive: !!confirmationOptions })),
|
|
455
|
+
React.createElement(ChatHistory, { entries: chatHistory, isConfirmationActive: !!confirmationOptions, verboseMode: verboseMode })),
|
|
456
|
+
showQuickActions && (React.createElement(QuickActions, { isVisible: showQuickActions, onSelect: handleQuickActionSelect, onClose: () => setShowQuickActions(false) })),
|
|
326
457
|
confirmationOptions && (React.createElement(ConfirmationDialog, { operation: confirmationOptions.operation, filename: confirmationOptions.filename, showVSCodeOpen: confirmationOptions.showVSCodeOpen, content: confirmationOptions.content, onConfirm: handleConfirmation, onReject: handleRejection })),
|
|
327
|
-
!confirmationOptions && (React.createElement(React.Fragment, null,
|
|
458
|
+
!confirmationOptions && !showQuickActions && (React.createElement(React.Fragment, null,
|
|
328
459
|
React.createElement(LoadingSpinner, { isActive: isProcessing || isStreaming, processingTime: processingTime, tokenCount: tokenCount }),
|
|
329
460
|
React.createElement(ChatInput, { input: input, cursorPosition: cursorPosition, isProcessing: isProcessing, isStreaming: isStreaming }),
|
|
330
|
-
React.createElement(
|
|
331
|
-
|
|
332
|
-
React.createElement(Text, { color: "cyan" },
|
|
333
|
-
autoEditEnabled ? "▶" : "⏸",
|
|
334
|
-
" auto-edit:",
|
|
335
|
-
" ",
|
|
336
|
-
autoEditEnabled ? "on" : "off"),
|
|
337
|
-
React.createElement(Text, { color: "gray", dimColor: true },
|
|
338
|
-
" ",
|
|
339
|
-
"(shift + tab)")),
|
|
340
|
-
React.createElement(Box, { marginRight: 2 },
|
|
341
|
-
React.createElement(Text, { color: "gray", dimColor: true }, "project: "),
|
|
342
|
-
React.createElement(Text, { color: "magenta" }, getCurrentProjectName()),
|
|
343
|
-
React.createElement(Text, { color: "gray", dimColor: true }, " | ax-cli: "),
|
|
344
|
-
React.createElement(Text, { color: "cyan" },
|
|
345
|
-
"v",
|
|
346
|
-
getVersion()),
|
|
347
|
-
React.createElement(Text, { color: "gray", dimColor: true }, " by DEFAI"),
|
|
348
|
-
React.createElement(Text, { color: "gray", dimColor: true }, " | model: "),
|
|
349
|
-
React.createElement(Text, { color: "yellow" }, agent.getCurrentModel()),
|
|
350
|
-
React.createElement(Text, { color: "gray", dimColor: true }, " | context: "),
|
|
351
|
-
showAutoPrune ? (React.createElement(Text, { color: "cyan" }, "auto-prune")) : (React.createElement(Text, { color: contextPercentage < 25 ? "red" : contextPercentage < 50 ? "yellow" : "green" },
|
|
352
|
-
contextPercentage.toFixed(1),
|
|
353
|
-
"%"))),
|
|
354
|
-
React.createElement(MCPStatus, null)),
|
|
461
|
+
toasts.length > 0 && (React.createElement(ToastContainer, { toasts: toasts, onDismiss: removeToast, maxVisible: 2 })),
|
|
462
|
+
React.createElement(StatusBar, { projectName: projectName, version: version, model: agent.getCurrentModel(), contextPercentage: contextPercentage, showAutoPrune: showAutoPrune, autoEditEnabled: autoEditEnabled, verboseMode: verboseMode, backgroundMode: backgroundMode, mcpServerCount: mcpServerCount, backgroundTaskCount: backgroundTaskCount, isProcessing: isProcessing || isStreaming, processingTime: processingTime, tokenCount: tokenCount, flashAutoEdit: flashAutoEdit, flashVerbose: flashVerbose, flashBackground: flashBackground }),
|
|
355
463
|
React.createElement(CommandSuggestions, { suggestions: commandSuggestions, input: input, selectedIndex: selectedCommandIndex, isVisible: showCommandSuggestions })))));
|
|
356
464
|
}
|
|
357
465
|
// Main component that handles API key input or chat interface
|