File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -555,6 +555,31 @@ export default function Page() {
555555 setActiveMessage ( priorMsg )
556556 } ,
557557 } ,
558+ {
559+ id : "session.compact" ,
560+ title : "Compact session" ,
561+ description : "Summarize the session to reduce context size" ,
562+ category : "Session" ,
563+ slash : "compact" ,
564+ disabled : ! params . id || visibleUserMessages ( ) . length === 0 ,
565+ onSelect : async ( ) => {
566+ const sessionID = params . id
567+ if ( ! sessionID ) return
568+ const model = local . model . current ( )
569+ if ( ! model ) {
570+ showToast ( {
571+ title : "No model selected" ,
572+ description : "Connect a provider to summarize this session" ,
573+ } )
574+ return
575+ }
576+ await sdk . client . session . summarize ( {
577+ sessionID,
578+ modelID : model . id ,
579+ providerID : model . provider . id ,
580+ } )
581+ } ,
582+ } ,
558583 ] )
559584
560585 const handleKeyDown = ( event : KeyboardEvent ) => {
You can’t perform that action at this time.
0 commit comments