mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 21:32:56 -07:00
feat(cli): remove output verbosity settings and logic
This commit is contained in:
@@ -32,10 +32,9 @@ they appear in the UI.
|
|||||||
|
|
||||||
### Output
|
### Output
|
||||||
|
|
||||||
| UI Label | Setting | Description | Default |
|
| UI Label | Setting | Description | Default |
|
||||||
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------- | ----------- |
|
| ------------- | --------------- | ------------------------------------------------------ | -------- |
|
||||||
| Output Format | `output.format` | The format of the CLI output. Can be `text` or `json`. | `"text"` |
|
| Output Format | `output.format` | The format of the CLI output. Can be `text` or `json`. | `"text"` |
|
||||||
| Verbose Output History | `output.verbosity` | Show verbose output history. When enabled, output history will include autonomous tool calls, additional logs, etc. | `"verbose"` |
|
|
||||||
|
|
||||||
### UI
|
### UI
|
||||||
|
|
||||||
|
|||||||
@@ -163,12 +163,6 @@ their corresponding top-level category object in your `settings.json` file.
|
|||||||
- **Default:** `"text"`
|
- **Default:** `"text"`
|
||||||
- **Values:** `"text"`, `"json"`
|
- **Values:** `"text"`, `"json"`
|
||||||
|
|
||||||
- **`output.verbosity`** (enum):
|
|
||||||
- **Description:** Show verbose output history. When enabled, output history
|
|
||||||
will include autonomous tool calls, additional logs, etc.
|
|
||||||
- **Default:** `"verbose"`
|
|
||||||
- **Values:** `"info"`, `"verbose"`
|
|
||||||
|
|
||||||
#### `ui`
|
#### `ui`
|
||||||
|
|
||||||
- **`ui.theme`** (string):
|
- **`ui.theme`** (string):
|
||||||
|
|||||||
@@ -328,21 +328,6 @@ const SETTINGS_SCHEMA = {
|
|||||||
{ value: 'json', label: 'JSON' },
|
{ value: 'json', label: 'JSON' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// Defined as enum type to support the addition of more verbosity levels
|
|
||||||
verbosity: {
|
|
||||||
type: 'enum',
|
|
||||||
label: 'Verbose Output History',
|
|
||||||
category: 'General',
|
|
||||||
requiresRestart: false,
|
|
||||||
default: 'verbose',
|
|
||||||
description:
|
|
||||||
'Show verbose output history. When enabled, output history will include autonomous tool calls, additional logs, etc.',
|
|
||||||
showInDialog: true,
|
|
||||||
options: [
|
|
||||||
{ value: 'info', label: 'false' },
|
|
||||||
{ value: 'verbose', label: 'true' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|||||||
const performMemoryRefresh = useCallback(async () => {
|
const performMemoryRefresh = useCallback(async () => {
|
||||||
historyManager.addItem(
|
historyManager.addItem(
|
||||||
{
|
{
|
||||||
type: MessageType.VERBOSE,
|
type: MessageType.INFO,
|
||||||
text: 'Refreshing hierarchical memory (GEMINI.md or other context files)...',
|
text: 'Refreshing hierarchical memory (GEMINI.md or other context files)...',
|
||||||
},
|
},
|
||||||
Date.now(),
|
Date.now(),
|
||||||
@@ -873,7 +873,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|||||||
|
|
||||||
historyManager.addItem(
|
historyManager.addItem(
|
||||||
{
|
{
|
||||||
type: MessageType.VERBOSE,
|
type: MessageType.INFO,
|
||||||
text: `Memory refreshed successfully. ${
|
text: `Memory refreshed successfully. ${
|
||||||
memoryContent.length > 0
|
memoryContent.length > 0
|
||||||
? `Loaded ${memoryContent.length} characters from ${fileCount} file(s).`
|
? `Loaded ${memoryContent.length} characters from ${fileCount} file(s).`
|
||||||
|
|||||||
@@ -171,18 +171,6 @@ describe('<HistoryItemDisplay />', () => {
|
|||||||
expect(lastFrame()).toContain('Agent powering down. Goodbye!');
|
expect(lastFrame()).toContain('Agent powering down. Goodbye!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders InfoMessage for "debug" type with gear icon', () => {
|
|
||||||
const item: HistoryItem = {
|
|
||||||
...baseItem,
|
|
||||||
type: MessageType.DEBUG,
|
|
||||||
text: 'Debug info',
|
|
||||||
};
|
|
||||||
const { lastFrame } = renderWithProviders(
|
|
||||||
<HistoryItemDisplay {...baseItem} item={item} />,
|
|
||||||
);
|
|
||||||
expect(lastFrame()).toContain('⚙ Debug info');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should escape ANSI codes in text content', () => {
|
it('should escape ANSI codes in text content', () => {
|
||||||
const historyItem: HistoryItem = {
|
const historyItem: HistoryItem = {
|
||||||
id: 1,
|
id: 1,
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import { GeminiMessageContent } from './messages/GeminiMessageContent.js';
|
|||||||
import { CompressionMessage } from './messages/CompressionMessage.js';
|
import { CompressionMessage } from './messages/CompressionMessage.js';
|
||||||
import { WarningMessage } from './messages/WarningMessage.js';
|
import { WarningMessage } from './messages/WarningMessage.js';
|
||||||
import { Box } from 'ink';
|
import { Box } from 'ink';
|
||||||
import { theme } from '../semantic-colors.js';
|
|
||||||
import { AboutBox } from './AboutBox.js';
|
import { AboutBox } from './AboutBox.js';
|
||||||
import { StatsDisplay } from './StatsDisplay.js';
|
import { StatsDisplay } from './StatsDisplay.js';
|
||||||
import { ModelStatsDisplay } from './ModelStatsDisplay.js';
|
import { ModelStatsDisplay } from './ModelStatsDisplay.js';
|
||||||
@@ -97,27 +96,6 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
|
|||||||
color={itemForDisplay.color}
|
color={itemForDisplay.color}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{itemForDisplay.type === 'verbose' && (
|
|
||||||
<InfoMessage
|
|
||||||
text={itemForDisplay.text}
|
|
||||||
icon={itemForDisplay.icon || 'ℹ '}
|
|
||||||
color={theme.text.secondary}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{itemForDisplay.type === 'debug' && (
|
|
||||||
<InfoMessage
|
|
||||||
text={itemForDisplay.text}
|
|
||||||
icon={'⚙ '}
|
|
||||||
color={theme.text.accent}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{itemForDisplay.type === 'trace' && (
|
|
||||||
<InfoMessage
|
|
||||||
text={itemForDisplay.text}
|
|
||||||
icon={'🔍 '}
|
|
||||||
color={theme.text.accent}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{itemForDisplay.type === 'warning' && (
|
{itemForDisplay.type === 'warning' && (
|
||||||
<WarningMessage text={itemForDisplay.text} />
|
<WarningMessage text={itemForDisplay.text} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { useAlternateBuffer } from '../hooks/useAlternateBuffer.js';
|
|||||||
import { ToolCallStatus } from '../types.js';
|
import { ToolCallStatus } from '../types.js';
|
||||||
import { SHELL_COMMAND_NAME } from '../constants.js';
|
import { SHELL_COMMAND_NAME } from '../constants.js';
|
||||||
import type { UIState } from '../contexts/UIStateContext.js';
|
import type { UIState } from '../contexts/UIStateContext.js';
|
||||||
import type { HistoryItem } from '../types.js';
|
|
||||||
|
|
||||||
// Mock dependencies
|
// Mock dependencies
|
||||||
vi.mock('../contexts/AppContext.js', async () => {
|
vi.mock('../contexts/AppContext.js', async () => {
|
||||||
@@ -29,9 +28,6 @@ vi.mock('../contexts/AppContext.js', async () => {
|
|||||||
|
|
||||||
const mockSettings = {
|
const mockSettings = {
|
||||||
merged: {
|
merged: {
|
||||||
output: {
|
|
||||||
verbosity: 'info',
|
|
||||||
},
|
|
||||||
ui: {
|
ui: {
|
||||||
enableCompactToolOutput: false,
|
enableCompactToolOutput: false,
|
||||||
},
|
},
|
||||||
@@ -99,7 +95,6 @@ describe('MainContent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.mocked(useAlternateBuffer).mockReturnValue(false);
|
vi.mocked(useAlternateBuffer).mockReturnValue(false);
|
||||||
mockSettings.merged.output.verbosity = 'info';
|
|
||||||
mockSettings.merged.ui.enableCompactToolOutput = false;
|
mockSettings.merged.ui.enableCompactToolOutput = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -248,38 +243,4 @@ describe('MainContent', () => {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('filters out verbose items when verbosity is info', async () => {
|
|
||||||
const history: HistoryItem[] = [
|
|
||||||
{ id: 1, type: 'user', text: 'Visible User Message' },
|
|
||||||
{ id: 2, type: 'verbose', text: 'Hidden Verbose Log' },
|
|
||||||
];
|
|
||||||
mockSettings.merged.output.verbosity = 'info';
|
|
||||||
|
|
||||||
const { lastFrame } = renderWithProviders(<MainContent />, {
|
|
||||||
uiState: { ...defaultMockUiState, history } as Partial<UIState>,
|
|
||||||
});
|
|
||||||
await waitFor(() => expect(lastFrame()).toContain('AppHeader'));
|
|
||||||
const output = lastFrame();
|
|
||||||
|
|
||||||
expect(output).toContain('Visible User Message');
|
|
||||||
expect(output).not.toContain('Hidden Verbose Log');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('shows verbose items when verbosity is verbose', async () => {
|
|
||||||
const history: HistoryItem[] = [
|
|
||||||
{ id: 1, type: 'user', text: 'Visible User Message' },
|
|
||||||
{ id: 2, type: 'verbose', text: 'Visible Verbose Log' },
|
|
||||||
];
|
|
||||||
mockSettings.merged.output.verbosity = 'verbose';
|
|
||||||
|
|
||||||
const { lastFrame } = renderWithProviders(<MainContent />, {
|
|
||||||
uiState: { ...defaultMockUiState, history } as Partial<UIState>,
|
|
||||||
});
|
|
||||||
await waitFor(() => expect(lastFrame()).toContain('AppHeader'));
|
|
||||||
const output = lastFrame();
|
|
||||||
|
|
||||||
expect(output).toContain('Visible User Message');
|
|
||||||
expect(output).toContain('Visible Verbose Log');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ import { MAX_GEMINI_MESSAGE_LINES } from '../constants.js';
|
|||||||
import { useConfirmingTool } from '../hooks/useConfirmingTool.js';
|
import { useConfirmingTool } from '../hooks/useConfirmingTool.js';
|
||||||
import { ToolConfirmationQueue } from './ToolConfirmationQueue.js';
|
import { ToolConfirmationQueue } from './ToolConfirmationQueue.js';
|
||||||
import { useConfig } from '../contexts/ConfigContext.js';
|
import { useConfig } from '../contexts/ConfigContext.js';
|
||||||
import { VERBOSITY_MAPPING, Verbosity } from '../types.js';
|
|
||||||
import { useSettings } from '../contexts/SettingsContext.js';
|
|
||||||
|
|
||||||
const MemoizedHistoryItemDisplay = memo(HistoryItemDisplay);
|
const MemoizedHistoryItemDisplay = memo(HistoryItemDisplay);
|
||||||
const MemoizedAppHeader = memo(AppHeader);
|
const MemoizedAppHeader = memo(AppHeader);
|
||||||
@@ -34,7 +32,6 @@ export const MainContent = () => {
|
|||||||
const { version } = useAppContext();
|
const { version } = useAppContext();
|
||||||
const uiState = useUIState();
|
const uiState = useUIState();
|
||||||
const config = useConfig();
|
const config = useConfig();
|
||||||
const settings = useSettings();
|
|
||||||
const isAlternateBuffer = useAlternateBuffer();
|
const isAlternateBuffer = useAlternateBuffer();
|
||||||
|
|
||||||
const confirmingTool = useConfirmingTool();
|
const confirmingTool = useConfirmingTool();
|
||||||
@@ -56,24 +53,9 @@ export const MainContent = () => {
|
|||||||
availableTerminalHeight,
|
availableTerminalHeight,
|
||||||
} = uiState;
|
} = uiState;
|
||||||
|
|
||||||
const currentVerbosity =
|
|
||||||
VERBOSITY_MAPPING[settings.merged.output?.verbosity ?? 'info'] ??
|
|
||||||
Verbosity.INFO;
|
|
||||||
|
|
||||||
const filteredHistory = useMemo(
|
|
||||||
() =>
|
|
||||||
uiState.history.filter((item) => {
|
|
||||||
const itemType = item.type;
|
|
||||||
const itemVerbosity =
|
|
||||||
item.verbosity ?? VERBOSITY_MAPPING[itemType] ?? Verbosity.INFO;
|
|
||||||
return itemVerbosity <= currentVerbosity;
|
|
||||||
}),
|
|
||||||
[uiState.history, currentVerbosity],
|
|
||||||
);
|
|
||||||
|
|
||||||
const historyItems = useMemo(
|
const historyItems = useMemo(
|
||||||
() =>
|
() =>
|
||||||
filteredHistory.map((h) => (
|
uiState.history.map((h) => (
|
||||||
<MemoizedHistoryItemDisplay
|
<MemoizedHistoryItemDisplay
|
||||||
terminalWidth={mainAreaWidth}
|
terminalWidth={mainAreaWidth}
|
||||||
availableTerminalHeight={staticAreaMaxItemHeight}
|
availableTerminalHeight={staticAreaMaxItemHeight}
|
||||||
@@ -85,7 +67,7 @@ export const MainContent = () => {
|
|||||||
/>
|
/>
|
||||||
)),
|
)),
|
||||||
[
|
[
|
||||||
filteredHistory,
|
uiState.history,
|
||||||
mainAreaWidth,
|
mainAreaWidth,
|
||||||
staticAreaMaxItemHeight,
|
staticAreaMaxItemHeight,
|
||||||
uiState.slashCommands,
|
uiState.slashCommands,
|
||||||
@@ -134,10 +116,10 @@ export const MainContent = () => {
|
|||||||
const virtualizedData = useMemo(
|
const virtualizedData = useMemo(
|
||||||
() => [
|
() => [
|
||||||
{ type: 'header' as const },
|
{ type: 'header' as const },
|
||||||
...filteredHistory.map((item) => ({ type: 'history' as const, item })),
|
...uiState.history.map((item) => ({ type: 'history' as const, item })),
|
||||||
{ type: 'pending' as const },
|
{ type: 'pending' as const },
|
||||||
],
|
],
|
||||||
[filteredHistory],
|
[uiState.history],
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderItem = useCallback(
|
const renderItem = useCallback(
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import type {
|
|||||||
HistoryItemWithoutId,
|
HistoryItemWithoutId,
|
||||||
IndividualToolCallDisplay,
|
IndividualToolCallDisplay,
|
||||||
} from '../types.js';
|
} from '../types.js';
|
||||||
import { ToolCallStatus, Verbosity } from '../types.js';
|
import { ToolCallStatus } from '../types.js';
|
||||||
import { useCallback, useReducer, useRef, useEffect } from 'react';
|
import { useCallback, useReducer, useRef, useEffect } from 'react';
|
||||||
import type { AnsiOutput, Config, GeminiClient } from '@google/gemini-cli-core';
|
import type { AnsiOutput, Config, GeminiClient } from '@google/gemini-cli-core';
|
||||||
import { isBinary, ShellExecutionService } from '@google/gemini-cli-core';
|
import { isBinary, ShellExecutionService } from '@google/gemini-cli-core';
|
||||||
@@ -487,7 +487,6 @@ export const useShellCommandProcessor = (
|
|||||||
addItemToHistory(
|
addItemToHistory(
|
||||||
{
|
{
|
||||||
type: 'tool_group',
|
type: 'tool_group',
|
||||||
verbosity: Verbosity.INFO,
|
|
||||||
tools: [finalToolDisplay],
|
tools: [finalToolDisplay],
|
||||||
} as HistoryItemWithoutId,
|
} as HistoryItemWithoutId,
|
||||||
userMessageTimestamp,
|
userMessageTimestamp,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
type WaitingToolCall,
|
type WaitingToolCall,
|
||||||
type CancelledToolCall,
|
type CancelledToolCall,
|
||||||
} from '@google/gemini-cli-core';
|
} from '@google/gemini-cli-core';
|
||||||
import { ToolCallStatus, Verbosity } from '../types.js';
|
import { ToolCallStatus } from '../types.js';
|
||||||
|
|
||||||
describe('toolMapping', () => {
|
describe('toolMapping', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -274,27 +274,5 @@ describe('toolMapping', () => {
|
|||||||
expect(result.tools[0].resultDisplay).toBeUndefined();
|
expect(result.tools[0].resultDisplay).toBeUndefined();
|
||||||
expect(result.tools[0].status).toBe(ToolCallStatus.Pending);
|
expect(result.tools[0].status).toBe(ToolCallStatus.Pending);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('sets verbosity to INFO for client-initiated tools', () => {
|
|
||||||
const toolCall: ScheduledToolCall = {
|
|
||||||
status: 'scheduled',
|
|
||||||
request: { ...mockRequest, isClientInitiated: true },
|
|
||||||
tool: mockTool,
|
|
||||||
invocation: mockInvocation,
|
|
||||||
};
|
|
||||||
const result = mapToDisplay(toolCall);
|
|
||||||
expect(result.verbosity).toBe(Verbosity.INFO);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('sets verbosity to undefined (defaulting to VERBOSE) for autonomous tools', () => {
|
|
||||||
const toolCall: ScheduledToolCall = {
|
|
||||||
status: 'scheduled',
|
|
||||||
request: { ...mockRequest, isClientInitiated: false },
|
|
||||||
tool: mockTool,
|
|
||||||
invocation: mockInvocation,
|
|
||||||
};
|
|
||||||
const result = mapToDisplay(toolCall);
|
|
||||||
expect(result.verbosity).toBeUndefined();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
} from '@google/gemini-cli-core';
|
} from '@google/gemini-cli-core';
|
||||||
import {
|
import {
|
||||||
ToolCallStatus,
|
ToolCallStatus,
|
||||||
Verbosity,
|
|
||||||
type HistoryItemToolGroup,
|
type HistoryItemToolGroup,
|
||||||
type IndividualToolCallDisplay,
|
type IndividualToolCallDisplay,
|
||||||
} from '../types.js';
|
} from '../types.js';
|
||||||
@@ -55,9 +54,6 @@ export function mapToDisplay(
|
|||||||
): HistoryItemToolGroup {
|
): HistoryItemToolGroup {
|
||||||
const toolCalls = Array.isArray(toolOrTools) ? toolOrTools : [toolOrTools];
|
const toolCalls = Array.isArray(toolOrTools) ? toolOrTools : [toolOrTools];
|
||||||
const { borderTop, borderBottom } = options;
|
const { borderTop, borderBottom } = options;
|
||||||
const isClientInitiated = toolCalls.some(
|
|
||||||
(tc) => tc.request.isClientInitiated,
|
|
||||||
);
|
|
||||||
|
|
||||||
const toolDisplays = toolCalls.map((call): IndividualToolCallDisplay => {
|
const toolDisplays = toolCalls.map((call): IndividualToolCallDisplay => {
|
||||||
let description: string;
|
let description: string;
|
||||||
@@ -133,7 +129,6 @@ export function mapToDisplay(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
type: 'tool_group',
|
type: 'tool_group',
|
||||||
verbosity: isClientInitiated ? Verbosity.INFO : undefined,
|
|
||||||
tools: toolDisplays,
|
tools: toolDisplays,
|
||||||
borderTop,
|
borderTop,
|
||||||
borderBottom,
|
borderBottom,
|
||||||
|
|||||||
@@ -261,28 +261,6 @@ describe('useHistoryManager', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should store all items regardless of verbosity level (filtering is done at render time)', () => {
|
|
||||||
// @ts-expect-error - verbosity prop was removed, but we want to ensure it's ignored if passed by mistake
|
|
||||||
const { result } = renderHook(() => useHistory({ verbosity: 'info' }));
|
|
||||||
const timestamp = Date.now();
|
|
||||||
const verboseItem: HistoryItemWithoutId = {
|
|
||||||
type: 'verbose',
|
|
||||||
text: 'Hidden detail',
|
|
||||||
verbosity: 3, // Verbosity.VERBOSE
|
|
||||||
};
|
|
||||||
|
|
||||||
act(() => {
|
|
||||||
result.current.addItem(verboseItem, timestamp);
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(result.current.history).toHaveLength(1);
|
|
||||||
expect(result.current.history[0]).toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
text: 'Hidden detail',
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should merge consecutive tool_group items', () => {
|
it('should merge consecutive tool_group items', () => {
|
||||||
const { result } = renderHook(() => useHistory());
|
const { result } = renderHook(() => useHistory());
|
||||||
const timestamp = Date.now();
|
const timestamp = Date.now();
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ export function useHistory({
|
|||||||
|
|
||||||
switch (itemData.type) {
|
switch (itemData.type) {
|
||||||
case 'compression':
|
case 'compression':
|
||||||
case 'verbose':
|
|
||||||
case 'info':
|
case 'info':
|
||||||
chatRecordingService?.recordMessage({
|
chatRecordingService?.recordMessage({
|
||||||
model: undefined,
|
model: undefined,
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ export const emptyIcon = ' ';
|
|||||||
|
|
||||||
export interface HistoryItemBase {
|
export interface HistoryItemBase {
|
||||||
text?: string; // Text content for user/gemini/info/error messages
|
text?: string; // Text content for user/gemini/info/error messages
|
||||||
verbosity?: Verbosity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type HistoryItemUser = HistoryItemBase & {
|
export type HistoryItemUser = HistoryItemBase & {
|
||||||
@@ -136,23 +135,6 @@ export type HistoryItemWarning = HistoryItemBase & {
|
|||||||
text: string;
|
text: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type HistoryItemVerbose = HistoryItemBase & {
|
|
||||||
type: 'verbose';
|
|
||||||
text: string;
|
|
||||||
icon?: string;
|
|
||||||
color?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type HistoryItemDebug = HistoryItemBase & {
|
|
||||||
type: 'debug';
|
|
||||||
text: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type HistoryItemTrace = HistoryItemBase & {
|
|
||||||
type: 'trace';
|
|
||||||
text: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type HistoryItemAbout = HistoryItemBase & {
|
export type HistoryItemAbout = HistoryItemBase & {
|
||||||
type: 'about';
|
type: 'about';
|
||||||
cliVersion: string;
|
cliVersion: string;
|
||||||
@@ -336,9 +318,6 @@ export type HistoryItemWithoutId =
|
|||||||
| HistoryItemInfo
|
| HistoryItemInfo
|
||||||
| HistoryItemError
|
| HistoryItemError
|
||||||
| HistoryItemWarning
|
| HistoryItemWarning
|
||||||
| HistoryItemVerbose
|
|
||||||
| HistoryItemDebug
|
|
||||||
| HistoryItemTrace
|
|
||||||
| HistoryItemAbout
|
| HistoryItemAbout
|
||||||
| HistoryItemHelp
|
| HistoryItemHelp
|
||||||
| HistoryItemToolGroup
|
| HistoryItemToolGroup
|
||||||
@@ -363,9 +342,6 @@ export type HistoryItem = HistoryItemWithoutId & { id: number };
|
|||||||
// Message types used by internal command feedback (subset of HistoryItem types)
|
// Message types used by internal command feedback (subset of HistoryItem types)
|
||||||
export enum MessageType {
|
export enum MessageType {
|
||||||
INFO = 'info',
|
INFO = 'info',
|
||||||
VERBOSE = 'verbose',
|
|
||||||
DEBUG = 'debug',
|
|
||||||
TRACE = 'trace',
|
|
||||||
ERROR = 'error',
|
ERROR = 'error',
|
||||||
WARNING = 'warning',
|
WARNING = 'warning',
|
||||||
USER = 'user',
|
USER = 'user',
|
||||||
@@ -386,52 +362,10 @@ export enum MessageType {
|
|||||||
HOOKS_LIST = 'hooks_list',
|
HOOKS_LIST = 'hooks_list',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Verbosity {
|
|
||||||
ERROR = 0,
|
|
||||||
WARN = 1,
|
|
||||||
INFO = 2,
|
|
||||||
VERBOSE = 3,
|
|
||||||
DEBUG = 4,
|
|
||||||
TRACE = 5,
|
|
||||||
}
|
|
||||||
|
|
||||||
export const VERBOSITY_MAPPING: Record<HistoryItemType, Verbosity> = {
|
|
||||||
error: Verbosity.ERROR,
|
|
||||||
warning: Verbosity.WARN,
|
|
||||||
info: Verbosity.INFO,
|
|
||||||
user: Verbosity.INFO,
|
|
||||||
gemini: Verbosity.INFO,
|
|
||||||
gemini_content: Verbosity.INFO,
|
|
||||||
tool_group: Verbosity.INFO,
|
|
||||||
user_shell: Verbosity.INFO,
|
|
||||||
about: Verbosity.INFO,
|
|
||||||
stats: Verbosity.INFO,
|
|
||||||
model_stats: Verbosity.INFO,
|
|
||||||
tool_stats: Verbosity.INFO,
|
|
||||||
model: Verbosity.INFO,
|
|
||||||
quit: Verbosity.INFO,
|
|
||||||
extensions_list: Verbosity.INFO,
|
|
||||||
tools_list: Verbosity.INFO,
|
|
||||||
skills_list: Verbosity.INFO,
|
|
||||||
agents_list: Verbosity.INFO,
|
|
||||||
mcp_status: Verbosity.INFO,
|
|
||||||
chat_list: Verbosity.INFO,
|
|
||||||
hooks_list: Verbosity.INFO,
|
|
||||||
help: Verbosity.INFO,
|
|
||||||
verbose: Verbosity.VERBOSE,
|
|
||||||
compression: Verbosity.VERBOSE,
|
|
||||||
debug: Verbosity.DEBUG,
|
|
||||||
trace: Verbosity.TRACE,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Simplified message structure for internal feedback
|
// Simplified message structure for internal feedback
|
||||||
export type Message =
|
export type Message =
|
||||||
| {
|
| {
|
||||||
type:
|
type: MessageType.INFO | MessageType.ERROR | MessageType.USER;
|
||||||
| MessageType.INFO
|
|
||||||
| MessageType.VERBOSE
|
|
||||||
| MessageType.ERROR
|
|
||||||
| MessageType.USER;
|
|
||||||
content: string; // Renamed from text for clarity in this context
|
content: string; // Renamed from text for clarity in this context
|
||||||
timestamp: Date;
|
timestamp: Date;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,14 +153,6 @@
|
|||||||
"default": "text",
|
"default": "text",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["text", "json"]
|
"enum": ["text", "json"]
|
||||||
},
|
|
||||||
"verbosity": {
|
|
||||||
"title": "Verbose Output History",
|
|
||||||
"description": "Show verbose output history. When enabled, output history will include autonomous tool calls, additional logs, etc.",
|
|
||||||
"markdownDescription": "Show verbose output history. When enabled, output history will include autonomous tool calls, additional logs, etc.\n\n- Category: `General`\n- Requires restart: `no`\n- Default: `verbose`",
|
|
||||||
"default": "verbose",
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["info", "verbose"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
|||||||
Reference in New Issue
Block a user