mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Sync upstream Gemini-CLI v0.8.2 (#838)
This commit is contained in:
31
packages/cli/src/ui/noninteractive/nonInteractiveUi.ts
Normal file
31
packages/cli/src/ui/noninteractive/nonInteractiveUi.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import type { CommandContext } from '../commands/types.js';
|
||||
import type { ExtensionUpdateAction } from '../state/extensions.js';
|
||||
|
||||
/**
|
||||
* 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: () => {},
|
||||
toggleVimEnabled: async () => false,
|
||||
setGeminiMdFileCount: (_count) => {},
|
||||
reloadCommands: () => {},
|
||||
extensionsUpdateState: new Map(),
|
||||
dispatchExtensionStateUpdate: (_action: ExtensionUpdateAction) => {},
|
||||
addConfirmUpdateExtensionRequest: (_request) => {},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user