mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(coding-agent): replace facet attributes with services
Make facets non-generic and resolve host-local dependencies through service bindings. Rename local assembly to createFacetHost and consolidate TUI host mechanics behind one service.
This commit is contained in:
parent
f0bfae2a96
commit
97f7472f4e
17 changed files with 308 additions and 204 deletions
|
|
@ -187,11 +187,12 @@ A server presentation facet renders and selects Sessions:
|
|||
setup(env) {
|
||||
const directory = env.use(SessionDirectory);
|
||||
const management = env.use(SessionManagement);
|
||||
const tui = env.use(Tui);
|
||||
|
||||
env.commands.register("sessions.switch", async (operation) => {
|
||||
tui.commands.register("sessions.switch", async (operation) => {
|
||||
const snapshot = directory.state.value;
|
||||
if (snapshot === undefined) return;
|
||||
const sessionId = await env.ui.select(
|
||||
const sessionId = await tui.select(
|
||||
"Sessions",
|
||||
snapshot.sessions.map((session) => ({ label: session.title, value: session.sessionId })),
|
||||
{ signal: operation.abortSignal },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue