This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd/tui/component/prompt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,15 +115,11 @@ export function Prompt(props: PromptProps) {
115115 {
116116 title : "Clear prompt" ,
117117 value : "prompt.clear" ,
118- disabled : true ,
119118 category : "Prompt" ,
119+ disabled : true ,
120120 onSelect : ( dialog ) => {
121121 input . extmarks . clear ( )
122- setStore ( "prompt" , {
123- input : "" ,
124- parts : [ ] ,
125- } )
126- setStore ( "extmarkToPartIndex" , new Map ( ) )
122+ input . clear ( )
127123 dialog . clear ( )
128124 } ,
129125 } ,
@@ -156,16 +152,27 @@ export function Prompt(props: PromptProps) {
156152 }
157153 } ,
158154 } ,
155+ {
156+ title : "Interrupt session" ,
157+ value : "session.interrupt" ,
158+ keybind : "session_interrupt" ,
159+ category : "Session" ,
160+ disabled : true ,
161+ onSelect : ( dialog ) => {
162+ if ( ! props . sessionID ) return
163+ sdk . client . session . abort ( {
164+ path : {
165+ id : props . sessionID ,
166+ } ,
167+ } )
168+ dialog . clear ( )
169+ } ,
170+ } ,
159171 ]
160172 } )
161173
162174 sdk . event . on ( TuiEvent . PromptAppend . type , ( evt ) => {
163- setStore (
164- "prompt" ,
165- produce ( ( draft ) => {
166- draft . input += evt . properties . text
167- } ) ,
168- )
175+ input . insertText ( evt . properties . text )
169176 } )
170177
171178 createEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments