ctx.ui.setFooter no-op silencieux et ctx.ui.setWidget ignore widgetPlacement sur le pont RPC d'extension (v0.8.1) #1802
yohand-byte
started this conversation in
Bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Affected area
TUI
What happened?
Two ctx.ui methods behave differently from their documented signature in v0.8.1,
both in createRpcExtensionUiBridge — which appears to be the bridge actually used
in a standard interactive session (no explicit --rpc flag):
A) ctx.ui.setFooter(factory) is a silent no-op: the call succeeds, nothing is ever
registered or rendered, no error is raised. The installed bundle has an empty
implementation (chunk-ZRIBV47F.js:65391) — compare with the working in-process
bridge (line 44293-44307) which actually invokes the factory and attaches it to
footerSlot.
B) ctx.ui.setWidget(key, lines, {placement: "belowEditor"}) always renders above the
editor. The RPC sender does forward widgetPlacement (line 65381-65389) and the
receiver reads it via getPayloadWidgetPlacement (line 42017-42020, falling back
silently to "aboveEditor" for any other value), yet "belowEditor" never takes
effect. widgetLines travels the same call chain correctly (multi-line coloured
text renders fine), so only the placement field seems lost. I could not instrument
the daemon/relay side to pinpoint where.
Impact: no reliable custom footer/widget in v0.8.1. setStatus and setWidget in its
default aboveEditor position are the only extension UI mechanisms confirmed working
in this environment.
Steps to reproduce
export default function ext(pi) {
pi.on("turn_end", (event, ctx) => {
ctx.ui?.setFooter?.((_tui, _theme, _fd) => ({ render: () => ["test"] }));
ctx.ui?.setWidget?.("test", ["single line"], { placement: "belowEditor" });
});
}
prime-agent(standard interactive session, no --rpc), ask any question.instead of below it (bug B). No errors anywhere.
Expected behavior
A) setFooter replaces the native footer with the custom component, as described in
types.ts (l.159-167).
B) placement: "belowEditor" renders the widget after the editor, just above the
native footer — matching mainContainer.addChild order (line 42562-42573).
Prime Agent version
0.8.1
Environment
macOS 15, iTerm2, Node v22.21.1, standard interactive session (no --rpc)
Additional context
Both bugs point to the same implementation (createRpcExtensionUiBridge), which appears to be used in standard interactive sessions, not only under an explicit --rpc flag — worth checking whether that routing is intended.
All reactions