openpencil/packages
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
..
cli feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
codegen feat(design-jsx): export every property the renderer accepts (#814) 2026-10-03 15:40:21 +04:00
core feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
demos
design-jsx feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
docs feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
dom-css refactor: print OpenPencil JSX export as syntax trees (#799) 2026-10-01 21:22:43 +04:00
fig feat(design-jsx): export every property the renderer accepts (#814) 2026-10-03 15:40:21 +04:00
harness docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
kiwi refactor(kiwi)!: drop the colorVariableBinding paint field 2026-10-01 23:47:51 +04:00
mcp refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
pen fix(figma-api): validate effects like Figma (#794) 2026-09-30 21:18:20 +04:00
scene-graph feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
vue feat(ai): render tool calls as summarized, highlighted cards (#811) 2026-10-03 22:04:31 +04:00