centaurus-cli 2.9.6 → 2.9.7
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/cli-adapter.d.ts.map +1 -1
- package/dist/cli-adapter.js +4 -2
- package/dist/cli-adapter.js.map +1 -1
- package/dist/services/fast-context-agent.d.ts +12 -0
- package/dist/services/fast-context-agent.d.ts.map +1 -0
- package/dist/services/fast-context-agent.js +253 -0
- package/dist/services/fast-context-agent.js.map +1 -0
- package/dist/tools/fast-context.d.ts +3 -0
- package/dist/tools/fast-context.d.ts.map +1 -0
- package/dist/tools/fast-context.js +72 -0
- package/dist/tools/fast-context.js.map +1 -0
- package/dist/tools/find-files.d.ts +2 -1
- package/dist/tools/find-files.d.ts.map +1 -1
- package/dist/tools/find-files.js +62 -2
- package/dist/tools/find-files.js.map +1 -1
- package/dist/tools/types.d.ts +1 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/components/App.d.ts.map +1 -1
- package/dist/ui/components/App.js +52 -23
- package/dist/ui/components/App.js.map +1 -1
- package/dist/ui/components/InteractiveShell.js +3 -3
- package/dist/ui/components/InteractiveShell.js.map +1 -1
- package/dist/ui/components/MessageDisplay.d.ts.map +1 -1
- package/dist/ui/components/MessageDisplay.js +2 -2
- package/dist/ui/components/MessageDisplay.js.map +1 -1
- package/dist/ui/components/ToolExecutionMessage.d.ts.map +1 -1
- package/dist/ui/components/ToolExecutionMessage.js +179 -4
- package/dist/ui/components/ToolExecutionMessage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1797,19 +1797,43 @@ export const App = ({ onMessage, onCancelRequest, initialModel, initialPlanMode,
|
|
|
1797
1797
|
}
|
|
1798
1798
|
};
|
|
1799
1799
|
}
|
|
1800
|
-
// Update
|
|
1800
|
+
// Update tool in currentMessage if it matches
|
|
1801
|
+
let updatedCurrentMessage = prev.currentMessage;
|
|
1801
1802
|
if (prev.currentMessage?.role === 'tool' &&
|
|
1802
|
-
prev.currentMessage.toolExecution?.toolName === update.toolName
|
|
1803
|
+
prev.currentMessage.toolExecution?.toolName === update.toolName &&
|
|
1804
|
+
prev.currentMessage.toolExecution?.status === 'executing') {
|
|
1803
1805
|
const existingOutput = prev.currentMessage.toolExecution.streamingOutput || '';
|
|
1804
|
-
|
|
1805
|
-
...prev,
|
|
1806
|
-
|
|
1807
|
-
...prev.currentMessage,
|
|
1806
|
+
updatedCurrentMessage = {
|
|
1807
|
+
...prev.currentMessage,
|
|
1808
|
+
toolExecution: {
|
|
1809
|
+
...prev.currentMessage.toolExecution,
|
|
1810
|
+
streamingOutput: existingOutput + update.chunk
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
}
|
|
1814
|
+
// Also update any matching executing tool in messageHistory
|
|
1815
|
+
let messageHistoryChanged = false;
|
|
1816
|
+
const updatedHistory = prev.messageHistory.map(msg => {
|
|
1817
|
+
if (msg.role === 'tool' &&
|
|
1818
|
+
msg.toolExecution?.toolName === update.toolName &&
|
|
1819
|
+
msg.toolExecution?.status === 'executing') {
|
|
1820
|
+
messageHistoryChanged = true;
|
|
1821
|
+
const existingOutput = msg.toolExecution.streamingOutput || '';
|
|
1822
|
+
return {
|
|
1823
|
+
...msg,
|
|
1808
1824
|
toolExecution: {
|
|
1809
|
-
...
|
|
1825
|
+
...msg.toolExecution,
|
|
1810
1826
|
streamingOutput: existingOutput + update.chunk
|
|
1811
1827
|
}
|
|
1812
|
-
}
|
|
1828
|
+
};
|
|
1829
|
+
}
|
|
1830
|
+
return msg;
|
|
1831
|
+
});
|
|
1832
|
+
if (updatedCurrentMessage !== prev.currentMessage || messageHistoryChanged) {
|
|
1833
|
+
return {
|
|
1834
|
+
...prev,
|
|
1835
|
+
currentMessage: updatedCurrentMessage,
|
|
1836
|
+
messageHistory: updatedHistory
|
|
1813
1837
|
};
|
|
1814
1838
|
}
|
|
1815
1839
|
return prev;
|
|
@@ -2251,24 +2275,29 @@ export const App = ({ onMessage, onCancelRequest, initialModel, initialPlanMode,
|
|
|
2251
2275
|
return; // Don't submit empty values
|
|
2252
2276
|
// Check if this is a slash command
|
|
2253
2277
|
const isSlashCommand = trimmedValue.startsWith('/');
|
|
2254
|
-
// Check if this is the
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2278
|
+
// Check if this is the clear command (slash or no slash)
|
|
2279
|
+
const lowerValue = trimmedValue.toLowerCase();
|
|
2280
|
+
if (lowerValue === '/clear' || lowerValue === 'clear' || lowerValue === '/cls' || lowerValue === 'cls' || lowerValue === '/reset') {
|
|
2281
|
+
// Soft Clear: Push history up by creating a blank space
|
|
2282
|
+
// We do NOT use clearScreen() here because that wipes the scrollback buffer (\x1b[3J)
|
|
2283
|
+
// Instead, we add a "spacer" message that pushes previous content up out of the viewport
|
|
2284
|
+
const height = process.stdout.rows || 24;
|
|
2285
|
+
// Use \u200B (Zero Width Space) to prevent trim() from emptying the string
|
|
2286
|
+
// in MessageDisplay.tsx, which would cause it to not render.
|
|
2287
|
+
const spacer = Array(height).fill('\u200B\n').join('');
|
|
2288
|
+
const clearMessage = {
|
|
2289
|
+
id: `clear-${Date.now()}`,
|
|
2290
|
+
role: 'system',
|
|
2291
|
+
content: spacer,
|
|
2292
|
+
timestamp: new Date(),
|
|
2293
|
+
isSpacer: true
|
|
2294
|
+
};
|
|
2258
2295
|
setState(prev => ({
|
|
2259
2296
|
...prev,
|
|
2260
|
-
messageHistory: [],
|
|
2297
|
+
messageHistory: [...prev.messageHistory, clearMessage],
|
|
2261
2298
|
currentMessage: null,
|
|
2262
|
-
|
|
2263
|
-
currentTokens: 0
|
|
2299
|
+
// We don't reset other state (tokens, loading) to preserve context
|
|
2264
2300
|
}));
|
|
2265
|
-
// Still call onMessage to clear backend history
|
|
2266
|
-
try {
|
|
2267
|
-
await onMessage(trimmedValue);
|
|
2268
|
-
}
|
|
2269
|
-
catch (error) {
|
|
2270
|
-
// Ignore errors for clear command
|
|
2271
|
-
}
|
|
2272
2301
|
return;
|
|
2273
2302
|
}
|
|
2274
2303
|
// Check if this is the /clean-ui command (refresh UI without clearing history)
|
|
@@ -2640,7 +2669,7 @@ export const App = ({ onMessage, onCancelRequest, initialModel, initialPlanMode,
|
|
|
2640
2669
|
ShellInputAgent.terminateSession(shellId);
|
|
2641
2670
|
quickLog(`[${new Date().toISOString()}] [AgentControl] Terminated ShellInputAgent session for ${shellId}\n`);
|
|
2642
2671
|
}
|
|
2643
|
-
}, onWarpifySession: async () => {
|
|
2672
|
+
}, onWarpifySession: state.shellState?.isBackgroundTask ? undefined : async () => {
|
|
2644
2673
|
// Warpify: Detect if there's an active remote session and establish ssh2 connection
|
|
2645
2674
|
const shellCommand = state.shellState?.command || '';
|
|
2646
2675
|
const currentOutput = state.shellState?.output || '';
|