File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,8 @@ export async function routeUserPrompt(
256256 // Handle bash commands from queue (starts with '!')
257257 if ( trimmed . startsWith ( '!' ) && trimmed . length > 1 ) {
258258 const command = trimmed . slice ( 1 )
259+ saveToHistory ( trimmed )
260+ setInputValue ( { text : '' , cursorPosition : 0 , lastEditDueToNav : false } )
259261 runBashCommand ( command )
260262 return
261263 }
Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ export const useInputHistory = (
5050 } , [ ] )
5151
5252 const saveToHistory = useCallback ( ( message : string ) => {
53- const newHistory = [ ...messageHistoryRef . current , message ]
53+ // Re-read from disk to pick up messages from other terminals
54+ const diskHistory = loadMessageHistory ( )
55+ const newHistory = [ ...diskHistory , message ]
5456 messageHistoryRef . current = newHistory
5557 historyIndexRef . current = - 1
5658 currentDraftRef . current = ''
You can’t perform that action at this time.
0 commit comments