okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
1306424be
main
1import type { ToolCall } from './types' ; 2 3/** The actions of one chat that wait for an answer, oldest first (the approval dock above the message box shows them, #4725). */ 4export function pendingApprovals ( session :{ messages :{ id :string ; tools ?:ToolCall [] }[] } | null | undefined ) :{ messageId :string ; tool :ToolCall }[] { 5const out :{ messageId :string ; tool :ToolCall }[] = []; 6for ( const m of session ?. messages ?? []) 7for ( const tool of m . tools ?? []) 8if ( tool . state === 'proposed' ) 9out . push ({ messageId :m . id , tool}); 10return out ; 11}