hdsp-jupyter-extension 2.0.18__py3-none-any.whl → 2.0.20__py3-none-any.whl
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.
- agent_server/langchain/agent_prompts/planner_prompt.py +22 -11
- agent_server/langchain/custom_middleware.py +97 -65
- agent_server/langchain/llm_factory.py +37 -5
- agent_server/langchain/logging_utils.py +41 -16
- agent_server/langchain/models/__init__.py +5 -0
- agent_server/langchain/models/gpt_oss_chat.py +351 -0
- agent_server/langchain/prompts.py +12 -7
- agent_server/routers/langchain_agent.py +10 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/build_log.json +1 -1
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/package.json +2 -2
- hdsp_jupyter_extension-2.0.18.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.037b3c8e5d6a92b63b16.js → hdsp_jupyter_extension-2.0.20.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.96745acc14125453fba8.js +36 -2
- hdsp_jupyter_extension-2.0.20.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.96745acc14125453fba8.js.map +1 -0
- jupyter_ext/labextension/static/lib_index_js.8f72c63cdf542389aa9d.js → hdsp_jupyter_extension-2.0.20.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.90f80cb80187de8c5ae5.js +91 -8
- hdsp_jupyter_extension-2.0.20.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.90f80cb80187de8c5ae5.js.map +1 -0
- hdsp_jupyter_extension-2.0.18.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.5099145cc2b28312d170.js → hdsp_jupyter_extension-2.0.20.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.586bf5521d043cdd37b8.js +3 -3
- jupyter_ext/labextension/static/remoteEntry.5099145cc2b28312d170.js.map → hdsp_jupyter_extension-2.0.20.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.586bf5521d043cdd37b8.js.map +1 -1
- {hdsp_jupyter_extension-2.0.18.dist-info → hdsp_jupyter_extension-2.0.20.dist-info}/METADATA +1 -1
- {hdsp_jupyter_extension-2.0.18.dist-info → hdsp_jupyter_extension-2.0.20.dist-info}/RECORD +48 -46
- jupyter_ext/_version.py +1 -1
- jupyter_ext/labextension/build_log.json +1 -1
- jupyter_ext/labextension/package.json +2 -2
- jupyter_ext/labextension/static/{frontend_styles_index_js.037b3c8e5d6a92b63b16.js → frontend_styles_index_js.96745acc14125453fba8.js} +36 -2
- jupyter_ext/labextension/static/frontend_styles_index_js.96745acc14125453fba8.js.map +1 -0
- hdsp_jupyter_extension-2.0.18.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.8f72c63cdf542389aa9d.js → jupyter_ext/labextension/static/lib_index_js.90f80cb80187de8c5ae5.js +91 -8
- jupyter_ext/labextension/static/lib_index_js.90f80cb80187de8c5ae5.js.map +1 -0
- jupyter_ext/labextension/static/{remoteEntry.5099145cc2b28312d170.js → remoteEntry.586bf5521d043cdd37b8.js} +3 -3
- hdsp_jupyter_extension-2.0.18.data/data/share/jupyter/labextensions/hdsp-agent/static/remoteEntry.5099145cc2b28312d170.js.map → jupyter_ext/labextension/static/remoteEntry.586bf5521d043cdd37b8.js.map +1 -1
- hdsp_jupyter_extension-2.0.18.data/data/share/jupyter/labextensions/hdsp-agent/static/frontend_styles_index_js.037b3c8e5d6a92b63b16.js.map +0 -1
- hdsp_jupyter_extension-2.0.18.data/data/share/jupyter/labextensions/hdsp-agent/static/lib_index_js.8f72c63cdf542389aa9d.js.map +0 -1
- jupyter_ext/labextension/static/frontend_styles_index_js.037b3c8e5d6a92b63b16.js.map +0 -1
- jupyter_ext/labextension/static/lib_index_js.8f72c63cdf542389aa9d.js.map +0 -1
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/etc/jupyter/jupyter_server_config.d/hdsp_jupyter_extension.json +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/install.json +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b80.c095373419d05e6f141a.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b80.c095373419d05e6f141a.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b81.61e75fb98ecff46cf836.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/node_modules_emotion_use-insertion-effect-with-fallbacks_dist_emotion-use-insertion-effect-wi-3ba6b81.61e75fb98ecff46cf836.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/style.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_babel_runtime_helpers_esm_extends_js-node_modules_emotion_serialize_dist-051195.e2553aab0c3963b83dd7.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_babel_runtime_helpers_esm_extends_js-node_modules_emotion_serialize_dist-051195.e2553aab0c3963b83dd7.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_cache_dist_emotion-cache_browser_development_esm_js.24edcc52a1c014a8a5f0.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_cache_dist_emotion-cache_browser_development_esm_js.24edcc52a1c014a8a5f0.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_react_dist_emotion-react_browser_development_esm_js.19ecf6babe00caff6b8a.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_react_dist_emotion-react_browser_development_esm_js.19ecf6babe00caff6b8a.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_styled_dist_emotion-styled_browser_development_esm_js.661fb5836f4978a7c6e1.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_emotion_styled_dist_emotion-styled_browser_development_esm_js.661fb5836f4978a7c6e1.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_index_js.985697e0162d8d088ca2.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_index_js.985697e0162d8d088ca2.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_utils_createSvgIcon_js.1f5038488cdfd8b3a85d.js +0 -0
- {hdsp_jupyter_extension-2.0.18.data → hdsp_jupyter_extension-2.0.20.data}/data/share/jupyter/labextensions/hdsp-agent/static/vendors-node_modules_mui_material_utils_createSvgIcon_js.1f5038488cdfd8b3a85d.js.map +0 -0
- {hdsp_jupyter_extension-2.0.18.dist-info → hdsp_jupyter_extension-2.0.20.dist-info}/WHEEL +0 -0
- {hdsp_jupyter_extension-2.0.18.dist-info → hdsp_jupyter_extension-2.0.20.dist-info}/licenses/LICENSE +0 -0
|
@@ -2295,7 +2295,7 @@ const ChatPanel = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ apiServic
|
|
|
2295
2295
|
}
|
|
2296
2296
|
}
|
|
2297
2297
|
const formatted = files.map((file) => {
|
|
2298
|
-
const icon = file.isDir ?
|
|
2298
|
+
const icon = file.isDir ? '[DIR]' : '[FILE]';
|
|
2299
2299
|
const sizeInfo = file.isDir ? '' : ` (${file.size} bytes)`;
|
|
2300
2300
|
return `${icon} ${file.path}${file.isDir ? '/' : sizeInfo}`;
|
|
2301
2301
|
}).join('\n');
|
|
@@ -3455,6 +3455,7 @@ SyntaxError: '(' was never closed
|
|
|
3455
3455
|
const isWriteFile = interruptAction === 'write_file_tool';
|
|
3456
3456
|
const isEditFile = interruptAction === 'edit_file_tool';
|
|
3457
3457
|
const isMultiEditFile = interruptAction === 'multiedit_file_tool';
|
|
3458
|
+
const isMarkdownTool = interruptAction === 'markdown_tool' || interruptAction === 'markdown';
|
|
3458
3459
|
const writePath = (isWriteFile
|
|
3459
3460
|
&& typeof msg.metadata?.interrupt?.args?.path === 'string') ? msg.metadata?.interrupt?.args?.path : '';
|
|
3460
3461
|
const editPath = ((isEditFile || isMultiEditFile)
|
|
@@ -3508,6 +3509,11 @@ SyntaxError: '(' was never closed
|
|
|
3508
3509
|
(replaceAll ? '\n\n(replace_all: true)' : '');
|
|
3509
3510
|
language = 'diff';
|
|
3510
3511
|
}
|
|
3512
|
+
else if (isMarkdownTool) {
|
|
3513
|
+
// markdown_tool: render as HTML, not as code block
|
|
3514
|
+
snippet = code || '';
|
|
3515
|
+
language = 'markdown';
|
|
3516
|
+
}
|
|
3511
3517
|
else {
|
|
3512
3518
|
snippet = (command || code || '(no details)');
|
|
3513
3519
|
language = command ? 'bash' : 'python';
|
|
@@ -3531,7 +3537,10 @@ SyntaxError: '(' was never closed
|
|
|
3531
3537
|
// Get tool description from args (for jupyter_cell_tool)
|
|
3532
3538
|
const toolDescription = msg.metadata?.interrupt?.args?.description;
|
|
3533
3539
|
const renderedHtml = (() => {
|
|
3534
|
-
|
|
3540
|
+
// markdown_tool: render content as HTML directly, not as code block
|
|
3541
|
+
let html = isMarkdownTool
|
|
3542
|
+
? (0,_utils_markdownRenderer__WEBPACK_IMPORTED_MODULE_5__.formatMarkdownToHtml)(snippet)
|
|
3543
|
+
: (0,_utils_markdownRenderer__WEBPACK_IMPORTED_MODULE_5__.formatMarkdownToHtml)(`\n\`\`\`${language}\n${snippet}\n\`\`\``);
|
|
3535
3544
|
if (isWriteFile && writePath) {
|
|
3536
3545
|
const safePath = escapeHtml(writePath);
|
|
3537
3546
|
html = html.replace(/<span class="code-block-language">[^<]*<\/span>/, `<span class="code-block-language jp-agent-interrupt-path">${safePath}</span>`);
|
|
@@ -3542,7 +3551,16 @@ SyntaxError: '(' was never closed
|
|
|
3542
3551
|
html = html.replace(/<span class="code-block-language">[^<]*<\/span>/, `<span class="code-block-language jp-agent-interrupt-path">${editIcon} ${safePath}</span>`);
|
|
3543
3552
|
}
|
|
3544
3553
|
// actionHtml이 비어있지 않을 때만 추가
|
|
3545
|
-
|
|
3554
|
+
let codeHtml;
|
|
3555
|
+
if (isMarkdownTool) {
|
|
3556
|
+
// markdown_tool: wrap in container with action buttons
|
|
3557
|
+
codeHtml = actionHtml
|
|
3558
|
+
? `<div class="jp-agent-markdown-preview">${html}${actionHtml}</div>`
|
|
3559
|
+
: `<div class="jp-agent-markdown-preview">${html}</div>`;
|
|
3560
|
+
}
|
|
3561
|
+
else {
|
|
3562
|
+
codeHtml = actionHtml ? html.replace('</div>', `${actionHtml}</div>`) : html;
|
|
3563
|
+
}
|
|
3546
3564
|
// Build the final HTML with proper ordering:
|
|
3547
3565
|
// 1. jp-agent-code-description (detailed description) - top
|
|
3548
3566
|
// 2. jp-agent-interrupt-description (approval message) - right above code
|
|
@@ -4222,6 +4240,8 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
4222
4240
|
const [vllmEndpoint, setVllmEndpoint] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.vllm?.endpoint || 'http://localhost:8000/v1');
|
|
4223
4241
|
const [vllmApiKey, setVllmApiKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.vllm?.apiKey || '');
|
|
4224
4242
|
const [vllmModel, setVllmModel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.vllm?.model || 'meta-llama/Llama-2-7b-chat-hf');
|
|
4243
|
+
const [vllmUseResponsesApi, setVllmUseResponsesApi] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(Boolean(initConfig.vllm?.useResponsesApi));
|
|
4244
|
+
const [vllmTemperature, setVllmTemperature] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.vllm?.temperature ?? 0.0);
|
|
4225
4245
|
// OpenAI settings
|
|
4226
4246
|
const [openaiApiKey, setOpenaiApiKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.openai?.apiKey || '');
|
|
4227
4247
|
const [openaiModel, setOpenaiModel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initConfig.openai?.model || 'gpt-4');
|
|
@@ -4264,6 +4284,8 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
4264
4284
|
setVllmEndpoint(currentConfig.vllm?.endpoint || 'http://localhost:8000/v1');
|
|
4265
4285
|
setVllmApiKey(currentConfig.vllm?.apiKey || '');
|
|
4266
4286
|
setVllmModel(currentConfig.vllm?.model || 'meta-llama/Llama-2-7b-chat-hf');
|
|
4287
|
+
setVllmUseResponsesApi(Boolean(currentConfig.vllm?.useResponsesApi));
|
|
4288
|
+
setVllmTemperature(currentConfig.vllm?.temperature ?? 0.0);
|
|
4267
4289
|
setOpenaiApiKey(currentConfig.openai?.apiKey || '');
|
|
4268
4290
|
setOpenaiModel(currentConfig.openai?.model || 'gpt-4');
|
|
4269
4291
|
setSystemPrompt(currentConfig.systemPrompt || (0,_services_ApiKeyManager__WEBPACK_IMPORTED_MODULE_10__.getDefaultLLMConfig)().systemPrompt || '');
|
|
@@ -4292,7 +4314,9 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
4292
4314
|
vllm: {
|
|
4293
4315
|
endpoint: vllmEndpoint,
|
|
4294
4316
|
apiKey: vllmApiKey,
|
|
4295
|
-
model: vllmModel
|
|
4317
|
+
model: vllmModel,
|
|
4318
|
+
useResponsesApi: vllmUseResponsesApi,
|
|
4319
|
+
temperature: vllmTemperature
|
|
4296
4320
|
},
|
|
4297
4321
|
openai: {
|
|
4298
4322
|
apiKey: openaiApiKey,
|
|
@@ -4454,7 +4478,16 @@ const SettingsPanel = ({ onClose, onSave, currentConfig }) => {
|
|
|
4454
4478
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "password", className: "jp-agent-settings-input", value: vllmApiKey, onChange: (e) => setVllmApiKey(e.target.value), placeholder: "API \uD0A4\uAC00 \uD544\uC694\uD55C \uACBD\uC6B0 \uC785\uB825" })),
|
|
4455
4479
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-group" },
|
|
4456
4480
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "jp-agent-settings-label" }, "\uBAA8\uB378 \uC774\uB984"),
|
|
4457
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", className: "jp-agent-settings-input", value: vllmModel, onChange: (e) => setVllmModel(e.target.value), placeholder: "meta-llama/Llama-2-7b-chat-hf" }))
|
|
4481
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", className: "jp-agent-settings-input", value: vllmModel, onChange: (e) => setVllmModel(e.target.value), placeholder: "meta-llama/Llama-2-7b-chat-hf" })),
|
|
4482
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-group" },
|
|
4483
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "jp-agent-settings-label" }, "Temperature"),
|
|
4484
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "number", className: "jp-agent-settings-input", value: vllmTemperature, onChange: (e) => setVllmTemperature(Math.max(0, Math.min(2, parseFloat(e.target.value) || 0))), min: 0, max: 2, step: 0.1, style: { width: '100px' } }),
|
|
4485
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("small", { style: { color: '#666', marginLeft: '8px' } }, "0.0 = \uACB0\uC815\uC801, 1.0+ = \uCC3D\uC758\uC801")),
|
|
4486
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-group" },
|
|
4487
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "jp-agent-settings-checkbox" },
|
|
4488
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "checkbox", checked: vllmUseResponsesApi, onChange: (e) => setVllmUseResponsesApi(e.target.checked) }),
|
|
4489
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "Use Responses API (/v1/responses)")),
|
|
4490
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("small", { style: { color: '#666', display: 'block', marginTop: '4px' } }, "OpenAI Responses API\uB97C \uC9C0\uC6D0\uD558\uB294 \uC5D4\uB4DC\uD3EC\uC778\uD2B8\uC5D0\uC11C \uC0AC\uC6A9")))),
|
|
4458
4491
|
provider === 'openai' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-provider" },
|
|
4459
4492
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, "OpenAI \uC124\uC815"),
|
|
4460
4493
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "jp-agent-settings-group" },
|
|
@@ -9320,7 +9353,34 @@ class ApiService {
|
|
|
9320
9353
|
}
|
|
9321
9354
|
// Handle token events (streaming LLM response)
|
|
9322
9355
|
if (data.content) {
|
|
9323
|
-
|
|
9356
|
+
// Filter out raw todos JSON that shouldn't be displayed to users
|
|
9357
|
+
// Pattern: {"todos": [{"content": "...", "status": "..."}, ...]}
|
|
9358
|
+
const contentStr = String(data.content).trim();
|
|
9359
|
+
const isSummaryJson = contentStr.includes('"summary"') && contentStr.includes('"next_items"');
|
|
9360
|
+
// Check if this is a raw todos JSON object (not summary JSON)
|
|
9361
|
+
let isRawTodosJson = false;
|
|
9362
|
+
if (!isSummaryJson && contentStr.includes('"todos"')) {
|
|
9363
|
+
try {
|
|
9364
|
+
const parsed = JSON.parse(contentStr);
|
|
9365
|
+
// Check structure: {todos: [{content, status}, ...]}
|
|
9366
|
+
if (parsed && Array.isArray(parsed.todos) && parsed.todos.length > 0) {
|
|
9367
|
+
const firstTodo = parsed.todos[0];
|
|
9368
|
+
if (firstTodo && 'content' in firstTodo && 'status' in firstTodo) {
|
|
9369
|
+
isRawTodosJson = true;
|
|
9370
|
+
}
|
|
9371
|
+
}
|
|
9372
|
+
}
|
|
9373
|
+
catch {
|
|
9374
|
+
// Not valid JSON, check for partial pattern
|
|
9375
|
+
isRawTodosJson = /"todos"\s*:\s*\[\s*\{[^}]*"content"\s*:/.test(contentStr);
|
|
9376
|
+
}
|
|
9377
|
+
}
|
|
9378
|
+
if (isRawTodosJson) {
|
|
9379
|
+
console.log('[ApiService] Filtered raw todos JSON from display');
|
|
9380
|
+
}
|
|
9381
|
+
else {
|
|
9382
|
+
onChunk(data.content);
|
|
9383
|
+
}
|
|
9324
9384
|
}
|
|
9325
9385
|
// Handle tool_call events - pass to handler for cell creation
|
|
9326
9386
|
if (currentEventType === 'tool_call' && data.tool && onToolCall) {
|
|
@@ -9490,7 +9550,30 @@ class ApiService {
|
|
|
9490
9550
|
}
|
|
9491
9551
|
// Content chunks
|
|
9492
9552
|
if (data.content && onChunk) {
|
|
9493
|
-
|
|
9553
|
+
// Filter out raw todos JSON that shouldn't be displayed to users
|
|
9554
|
+
const contentStr = String(data.content).trim();
|
|
9555
|
+
const isSummaryJson = contentStr.includes('"summary"') && contentStr.includes('"next_items"');
|
|
9556
|
+
let isRawTodosJson = false;
|
|
9557
|
+
if (!isSummaryJson && contentStr.includes('"todos"')) {
|
|
9558
|
+
try {
|
|
9559
|
+
const parsed = JSON.parse(contentStr);
|
|
9560
|
+
if (parsed && Array.isArray(parsed.todos) && parsed.todos.length > 0) {
|
|
9561
|
+
const firstTodo = parsed.todos[0];
|
|
9562
|
+
if (firstTodo && 'content' in firstTodo && 'status' in firstTodo) {
|
|
9563
|
+
isRawTodosJson = true;
|
|
9564
|
+
}
|
|
9565
|
+
}
|
|
9566
|
+
}
|
|
9567
|
+
catch {
|
|
9568
|
+
isRawTodosJson = /"todos"\s*:\s*\[\s*\{[^}]*"content"\s*:/.test(contentStr);
|
|
9569
|
+
}
|
|
9570
|
+
}
|
|
9571
|
+
if (isRawTodosJson) {
|
|
9572
|
+
console.log('[ApiService] Filtered raw todos JSON from display');
|
|
9573
|
+
}
|
|
9574
|
+
else {
|
|
9575
|
+
onChunk(data.content);
|
|
9576
|
+
}
|
|
9494
9577
|
}
|
|
9495
9578
|
// Tool call events during resume
|
|
9496
9579
|
if (currentEventType === 'tool_call' && data.tool && onToolCall) {
|
|
@@ -11795,4 +11878,4 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11795
11878
|
/***/ }
|
|
11796
11879
|
|
|
11797
11880
|
}]);
|
|
11798
|
-
//# sourceMappingURL=lib_index_js.
|
|
11881
|
+
//# sourceMappingURL=lib_index_js.90f80cb80187de8c5ae5.js.map
|