feat: add terminal input hook for extensions
This commit is contained in:
@@ -1368,6 +1368,7 @@ export class InteractiveMode {
|
||||
confirm: (title, message, opts) => this.showExtensionConfirm(title, message, opts),
|
||||
input: (title, placeholder, opts) => this.showExtensionInput(title, placeholder, opts),
|
||||
notify: (message, type) => this.showExtensionNotify(message, type),
|
||||
onTerminalInput: (handler) => this.ui.addInputListener(handler),
|
||||
setStatus: (key, text) => this.setExtensionStatus(key, text),
|
||||
setWorkingMessage: (message) => {
|
||||
if (this.loadingAnimation) {
|
||||
|
||||
@@ -144,6 +144,11 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
||||
} as RpcExtensionUIRequest);
|
||||
},
|
||||
|
||||
onTerminalInput(): () => void {
|
||||
// Raw terminal input not supported in RPC mode
|
||||
return () => {};
|
||||
},
|
||||
|
||||
setStatus(key: string, text: string | undefined): void {
|
||||
// Fire and forget - no response needed
|
||||
output({
|
||||
|
||||
Reference in New Issue
Block a user