Repository navigation
feat(rc-gateway): open a tool call to read its call and result (#64) - #41
Merged
Merged
Conversation
A tool row showed a label and a status and nothing else: the arguments it
went out with and whatever came back were dropped on the floor by the model,
so a call that failed could not be read without leaving the viewer.
The model now keeps rawInput and the result on the item, and a status-only
frame leaves both alone. An empty content is deliberately not a result:
reading it as one would leave every pending call showing an empty output.
The row renders the pair as one bounded text block when opened, and only a
row whose frames actually carried something gets a chevron, so a call with
nothing behind it does not look like it is hiding something.
Two things the virtualizer makes non-free:
- estimate() has to count the expanded height, or the row jumps when it
opens while still unmeasured (the #58 class of bug).
- the tap has to hold the tapped line, or opening a call at the end pulls
it up by the height of the detail. keepHeld() looks the line up as
m.head, which tool rows never had, so the hold was inert until that was
wired up; V5c taps the tail row to pin both.
The detail carries no display rule on purpose: naming one would outrank the
UA [hidden] rule and leave a closed call on screen, which P16 checks on the
real page (the view section builds its own container, so index.html CSS does
not reach it).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes InfiniteInsight/Qwen-Code-Remote#64
A tool row showed a label and a status and nothing else. The arguments the call went out with and whatever came back were dropped by the model, so a call that failed could not be read without leaving the viewer.
What changes
upsertToolkeepsrawInputand the result on the item.toolResult()readscontentwhen it is non-empty, elserawOutput. A status-only frame carries neither and must not clear what is already there. An emptycontentis deliberately not a result: reading it as one would leave every pending call showing an empty output.call/result, clipped at 4000 chars). Only a row whose frames actually carried something gets a chevron, so a call with nothing behind it does not look like it is hiding something. The text is memoised per item becauseestimate()re-runs over every unmeasured row on each layout rebuild.displayrule on.tool-detail, on purpose (see the second probe below).Two things the virtualizer makes non-free
estimate()has to count the expanded height, or the row jumps when it opens while still unmeasured - the rc-gateway: the to-do strip takes the bottom of the conversation window #58 class of bug.Point 2 is worth calling out:
keepHeld()looks the clicked line up ashold.row ? m.row : m.head, and tool rows never setm.head, so the hold I first wrote was inert - the mutation probe caught it (tapping at the end moved the head 512 -> 214).m.headis now wired to the head span.Evidence
Each claim watched red with its guard removed, then green with it in:
holdremovedtapping at the end moved the head 512 -> 214a call with no detail got an affordance: "🔧 Bare [pending] ▸"if (x !== undefined)guards removed in the modeldisplay: blockon.tool-detaildetail after closing: display "block", height 145The last one is why the CSS carries no display rule. A
displayon the class outranks the UA[hidden]rule, so a closed call stays on screen; adivis block by default, so the rule was only ever a liability. Note theviewsection builds its own container, soindex.htmlCSS does not reach it - the first version of that assertion passed with the rule deleted, which is why the real-page check lives inpage.V5c tool expand(new): collapsed by default, no affordance on a payload-less call, opens without moving the head, survives unmount/remount, closes on the second tap.P16 tool detail on the real page(new): drives/ui/and reads computeddisplayand pixel height.viewsection 15/15, non-heavypagescenarios 15/15,transcriptModel35/35, rc-gateway suite 2816 passed / 2 skipped, prettier + eslint +tsc --noEmitclean.Deliberately not done
resetTurn()on every tool frame is kept as is: it is what keeps text after a tool row in its own bubble. rc-gateway: loopback-only second front for a same-host browser #63 pinned that.webRootservespublic/straight from the tree.