agentgui 1.0.670 → 1.0.672
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/lib/claude-runner.js
CHANGED
|
@@ -95,6 +95,8 @@ class AgentRunner {
|
|
|
95
95
|
if (v === undefined) delete spawnOpts.env[k];
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
+
// Tell hooks the actual project dir (used by mcp-thorns/codebasesearch)
|
|
99
|
+
if (cwd) spawnOpts.env.CLAUDE_PROJECT_DIR = cwd;
|
|
98
100
|
if (this.closeStdin) {
|
|
99
101
|
spawnOpts.stdio = ['ignore', 'pipe', 'pipe'];
|
|
100
102
|
}
|
|
@@ -623,7 +625,7 @@ registry.register({
|
|
|
623
625
|
closeStdin: true, // close stdin so claude doesn't wait for input in --print mode
|
|
624
626
|
useJsonRpcStdin: false,
|
|
625
627
|
supportedFeatures: ['streaming', 'resume', 'system-prompt', 'permissions-skip', 'steering'],
|
|
626
|
-
spawnEnv: { MAX_THINKING_TOKENS: '0', AGENTGUI_SUBPROCESS: '1'
|
|
628
|
+
spawnEnv: { MAX_THINKING_TOKENS: '0', AGENTGUI_SUBPROCESS: '1' },
|
|
627
629
|
|
|
628
630
|
buildArgs(prompt, config) {
|
|
629
631
|
const {
|
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -1156,6 +1156,8 @@ class AgentGUIClient {
|
|
|
1156
1156
|
if (indicator) {
|
|
1157
1157
|
indicator.innerHTML = `<span style="color:var(--color-error);">Error: ${this.escapeHtml(data.error || 'Unknown error')}</span>`;
|
|
1158
1158
|
}
|
|
1159
|
+
// Remove all thinking blocks on error
|
|
1160
|
+
streamingEl.querySelectorAll('.block-thinking').forEach(block => block.remove());
|
|
1159
1161
|
} else {
|
|
1160
1162
|
const outputEl3 = document.getElementById('output');
|
|
1161
1163
|
const messagesEl3 = outputEl3 && outputEl3.querySelector('.conversation-messages');
|
|
@@ -1219,6 +1221,9 @@ class AgentGUIClient {
|
|
|
1219
1221
|
const prevTextEl = streamingEl.querySelector('.streaming-text-current');
|
|
1220
1222
|
if (prevTextEl) prevTextEl.classList.remove('streaming-text-current');
|
|
1221
1223
|
|
|
1224
|
+
// Remove all thinking blocks (block-thinking elements)
|
|
1225
|
+
streamingEl.querySelectorAll('.block-thinking').forEach(block => block.remove());
|
|
1226
|
+
|
|
1222
1227
|
const ts = document.createElement('div');
|
|
1223
1228
|
ts.className = 'message-timestamp';
|
|
1224
1229
|
ts.textContent = new Date().toLocaleString();
|
|
@@ -1232,7 +1232,9 @@ class StreamingRenderer {
|
|
|
1232
1232
|
const details = document.createElement('details');
|
|
1233
1233
|
details.className = 'folded-tool' + (isError ? ' folded-tool-error' : ' folded-tool-success');
|
|
1234
1234
|
details.dataset.eventType = 'tool_result';
|
|
1235
|
-
|
|
1235
|
+
// Only open by default if the content is an image
|
|
1236
|
+
const isImageContent = contentStr.includes('data:image/') || (block.content && block.content.type === 'base64');
|
|
1237
|
+
if (!isError && isImageContent) details.open = true;
|
|
1236
1238
|
if (block.tool_use_id) details.dataset.toolUseId = block.tool_use_id;
|
|
1237
1239
|
details.classList.add(this._getBlockTypeClass('tool_result'));
|
|
1238
1240
|
|