11/** @jsxImportSource @opentui /solid */
2- import type { JSX } from "@opentui/solid" ;
2+
33import { RGBA } from "@opentui/core" ;
4- import { Show , createSignal , onCleanup } from "solid-js" ;
4+ import type { JSX } from "@opentui/solid" ;
5+ import { createSignal , onCleanup , Show } from "solid-js" ;
56
67import { sanitizeDisplayText } from "./lib/display-sanitize.js" ;
78import { formatQuotaRows } from "./lib/format.js" ;
@@ -10,13 +11,13 @@ import {
1011 QUOTA_DIALOG_COMMANDS ,
1112 type QuotaDialogCommandId ,
1213} from "./lib/quota-dialog-commands.js" ;
14+ import { resolveQuotaFormatStyle } from "./lib/quota-format-style.js" ;
1315import { collectQuotaRenderData } from "./lib/quota-render-data.js" ;
1416import {
1517 createQuotaRuntimeRequestContext ,
16- resolveQuotaRuntimeContext ,
1718 type QuotaSessionModelContext ,
19+ resolveQuotaRuntimeContext ,
1820} from "./lib/quota-runtime-context.js" ;
19- import { resolveQuotaFormatStyle } from "./lib/quota-format-style.js" ;
2021import { buildSidebarQuotaPanelLines } from "./lib/tui-sidebar-format.js" ;
2122
2223const terminalForeground = RGBA . defaultForeground ( ) ;
@@ -32,22 +33,25 @@ type TuiContext = {
3233 client : unknown ;
3334 data : { on : ( event : string , handler : ( event : TuiEvent ) => void ) => ( ) => void } ;
3435 keymap : {
35- layer : ( build : ( ) => {
36- mode : "global" ;
37- commands : Array < {
38- id : string ;
39- title : string ;
40- group : string ;
41- palette : true ;
42- slash : { name : string } ;
43- run : ( input ?: unknown ) => void ;
44- } > ;
45- } ) => void ;
36+ layer : (
37+ build : ( ) => {
38+ mode : "global" ;
39+ commands : Array < {
40+ id : string ;
41+ title : string ;
42+ group : string ;
43+ palette : true ;
44+ slash : { name : string } ;
45+ run : ( input ?: unknown ) => void ;
46+ } > ;
47+ } ,
48+ ) => void ;
4649 } ;
4750 ui : {
48- slot : ( claim :
49- | { append : "app" ; render : ( ) => null }
50- | { append : "sidebar.content" ; render : ( props : { sessionID : string } ) => JSX . Element }
51+ slot : (
52+ claim :
53+ | { append : "app" ; render : ( ) => null }
54+ | { append : "sidebar.content" ; render : ( props : { sessionID : string } ) => JSX . Element } ,
5155 ) => ( ) => void ;
5256 toast : { show : ( toast : Toast ) => void } ;
5357 dialog : {
@@ -244,7 +248,11 @@ function SidebarQuotaView(props: {
244248
245249 return (
246250 < box flexDirection = "column" >
247- < box flexDirection = "row" gap = { 1 } onMouseDown = { ( ) => expandable ( ) && setOpen ( ( value ) => ! value ) } >
251+ < box
252+ flexDirection = "row"
253+ gap = { 1 }
254+ onMouseDown = { ( ) => expandable ( ) && setOpen ( ( value ) => ! value ) }
255+ >
248256 < Show when = { expandable ( ) } >
249257 < text fg = { terminalForeground } > { open ( ) ? "▼" : "▶" } </ text >
250258 </ Show >
@@ -295,7 +303,9 @@ const plugin = {
295303 } )
296304 . catch ( reportFailure ) ;
297305 } ;
298- const onStepEnded = context . data . on ( "session.step.ended" , ( event ) => trigger ( event , "idle" ) ) ;
306+ const onStepEnded = context . data . on ( "session.step.ended" , ( event ) =>
307+ trigger ( event , "idle" ) ,
308+ ) ;
299309 const onCompacted = context . data . on ( "session.compaction.ended" , ( event ) =>
300310 trigger ( event , "compacted" ) ,
301311 ) ;
0 commit comments