openpencil/tests/engine/app
Danila Poyarkov 249f0cca87
feat(ai): render tool calls as summarized, highlighted cards (#811)
* feat(ai): render tool calls as summarized, highlighted cards

Every tool call showed only a status and its output as a JSON string,
so render calls hid their JSX, export_image dumped base64, and long
runs filled the transcript with identical rows.

A call now shows a one-line summary read from its input and chips that
select and zoom to the layers it touched, switching to the run's page
when needed. Expanded, it shows the JSX or script it wrote and its
JSON input and output in a read-only CodeMirror view, and exported
images inline. Render calls can be expanded while their input streams,
so the JSX appears alongside the canvas preview. Consecutive calls
beyond three fold into one row that keeps the latest call visible.

CodeMirror loads with the first expanded call. The code theme gains a
monospace fallback because the editor font variable is not always
emitted.

* refactor(ai): drop the unused tool JSON slot and place the JSX summary comment

* fix(ai): keep an opened tool call in place instead of following the output

Opening reasoning already stopped the transcript from following new output; tool calls and tool groups did not, so expanding one near the bottom re-pinned the bottom on every animation frame and slid the card away as it opened. Any disclosure in the transcript now stops following.

* fix(ai): show a pointer over chat tool calls, tool groups, and reasoning

* refactor(app): share CodeMirror setup between the code editor and viewer

CodeViewer repeated CodeEditor's view lifecycle: mounting the EditorView, label, theme, and language compartments, the app-theme watcher, and teardown. useCodeMirror owns that once; each component passes its own fixed and reactive extensions.

* refactor(ai): move tool node lookup and focusing into useToolNodes

ToolNodeChips looked nodes up in the active document and ran the show-on-canvas flow, with its superseded-switch and error handling, inside the component. The composable owns both; the component renders the chips.

* refactor(ai): derive tool call state and input once

ToolCallCard and ToolCallGroup each rebuilt classifyToolState's input from the part, and the card decided inline whether a call had input to show. toolCallState and toolHasInput own those rules beside the other per-call helpers.

* fix(app): use the thin app scrollbar in code editors and viewers

CodeMirror scrolls its own .cm-scroller, which fell back to the platform scrollbar, thick and light in the dark chat. The hosts now give it the shared scrollbar-thin utility.
2026-10-03 22:04:31 +04:00
..
ai feat(ai): choose a thinking level per message (#809) 2026-10-03 13:30:05 +04:00
automation feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
chat feat(ai): render tool calls as summarized, highlighted cards (#811) 2026-10-03 22:04:31 +04:00
clipboard fix(clipboard): preserve component dependency references 2026-09-13 12:46:31 +03:00
code feat(code): add live JSX and HTML/CSS editing (#525) 2026-08-15 09:48:42 +03:00
demo feat: assemble an editable demo document 2026-09-14 00:36:53 +03:00
diagnostics feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
document feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
editor feat(ai): render tool calls as summarized, highlighted cards (#811) 2026-10-03 22:04:31 +04:00
integrations fix: restore engine test coverage and isolation (#653) 2026-09-06 23:29:45 +03:00
recent-files refactor(app): polish files workspace and New tabs 2026-08-20 17:20:33 +03:00
runtime perf(canvas): rebuild navigation rendering (#591) 2026-08-31 13:39:40 +03:00
settings feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
shell feat(updater): show download progress while installing an update 2026-09-25 23:15:14 +04:00
storage fix(storage): harden workspace previews 2026-08-10 20:02:58 +03:00
tabs feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
tauri fix(tauri): preserve request and abort semantics 2026-07-18 05:02:51 +03:00
usage feat(diagnostics): add local usage and diagnostics foundation 2026-08-24 16:56:40 +03:00
cache.test.ts refactor(app): polish files workspace and New tabs 2026-08-20 17:20:33 +03:00
demo.test.ts feat(demo): rebuild the first page as a component library with staged loading (#717) 2026-09-18 08:18:21 +03:00
external-link.test.ts
font-loading.test.ts fix(tauri): prevent Windows font loading crashes (#497) 2026-08-12 20:09:04 +03:00
vector-edit-transforms.test.ts fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00