2025-09-19 13:49:35 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import type { CommandContext } from '../commands/types.js';
|
2025-10-01 14:53:15 -07:00
|
|
|
import type { ExtensionUpdateAction } from '../state/extensions.js';
|
2025-09-19 13:49:35 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a UI context object with no-op functions.
|
|
|
|
|
* Useful for non-interactive environments where UI operations
|
|
|
|
|
* are not applicable.
|
|
|
|
|
*/
|
|
|
|
|
export function createNonInteractiveUI(): CommandContext['ui'] {
|
|
|
|
|
return {
|
|
|
|
|
addItem: (_item, _timestamp) => 0,
|
|
|
|
|
clear: () => {},
|
|
|
|
|
setDebugMessage: (_message) => {},
|
|
|
|
|
loadHistory: (_newHistory) => {},
|
|
|
|
|
pendingItem: null,
|
|
|
|
|
setPendingItem: (_item) => {},
|
|
|
|
|
toggleCorgiMode: () => {},
|
2025-10-07 10:28:35 -07:00
|
|
|
toggleDebugProfiler: () => {},
|
2025-09-19 13:49:35 +00:00
|
|
|
toggleVimEnabled: async () => false,
|
|
|
|
|
reloadCommands: () => {},
|
2026-01-22 10:30:44 -08:00
|
|
|
openAgentConfigDialog: () => {},
|
2025-09-19 13:49:35 +00:00
|
|
|
extensionsUpdateState: new Map(),
|
2025-10-01 14:53:15 -07:00
|
|
|
dispatchExtensionStateUpdate: (_action: ExtensionUpdateAction) => {},
|
2025-09-29 14:19:19 -07:00
|
|
|
addConfirmUpdateExtensionRequest: (_request) => {},
|
2025-11-14 19:06:30 -08:00
|
|
|
removeComponent: () => {},
|
2026-01-30 09:53:09 -08:00
|
|
|
toggleBackgroundShell: () => {},
|
2025-09-19 13:49:35 +00:00
|
|
|
};
|
|
|
|
|
}
|