@google/gemini-cli 0.1.10-dev.14 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/google-gemini-cli-0.1.9.tgz +0 -0
- package/dist/package.json +7 -7
- package/dist/src/config/auth.js +6 -5
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.d.ts +0 -1
- package/dist/src/config/config.js +62 -50
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +1 -0
- package/dist/src/config/extension.js +34 -6
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/sandboxConfig.d.ts +1 -1
- package/dist/src/config/sandboxConfig.js +1 -1
- package/dist/src/config/sandboxConfig.js.map +1 -1
- package/dist/src/config/settings.d.ts +7 -2
- package/dist/src/config/settings.js +101 -3
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/gemini.js +30 -21
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/nonInteractiveCli.d.ts +1 -1
- package/dist/src/nonInteractiveCli.js +4 -2
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/services/CommandService.d.ts +13 -0
- package/dist/src/services/CommandService.js +30 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/ui/App.js +71 -12
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +15 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +18 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +81 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +63 -0
- package/dist/src/{gemini.test.d.ts → ui/commands/types.js} +1 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.js +36 -8
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/Help.d.ts +1 -1
- package/dist/src/ui/components/Help.js +3 -2
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +2 -1
- package/dist/src/ui/components/InputPrompt.js +106 -157
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +2 -1
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +10 -9
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.js +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +72 -16
- package/dist/src/ui/components/shared/text-buffer.js +564 -676
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +4 -1
- package/dist/src/ui/contexts/SessionContext.js +12 -2
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +5 -7
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +6 -10
- package/dist/src/ui/hooks/slashCommandProcessor.js +217 -121
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useCompletion.d.ts +2 -2
- package/dist/src/ui/hooks/useCompletion.js +106 -56
- package/dist/src/ui/hooks/useCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +3 -3
- package/dist/src/ui/hooks/useGeminiStream.js +45 -28
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +1 -1
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/types.d.ts +10 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +104 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +1 -80
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.js +50 -32
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/ui/utils/errorParsing.d.ts +2 -10
- package/dist/src/ui/utils/errorParsing.js +34 -23
- package/dist/src/ui/utils/errorParsing.js.map +1 -1
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +1 -1
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +1 -1
- package/dist/src/utils/userStartupWarnings.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.js +33 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/dist/src/gemini.test.js +0 -122
- package/dist/src/gemini.test.js.map +0 -1
- package/dist/src/ui/App.test.d.ts +0 -6
- package/dist/src/ui/App.test.js +0 -299
- package/dist/src/ui/App.test.js.map +0 -1
- package/dist/src/ui/components/AuthDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AuthDialog.test.js +0 -69
- package/dist/src/ui/components/AuthDialog.test.js.map +0 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -81
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
- package/dist/src/ui/components/InputPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/InputPrompt.test.js +0 -154
- package/dist/src/ui/components/InputPrompt.test.js.map +0 -1
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/LoadingIndicator.test.js +0 -141
- package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ModelStatsDisplay.test.js +0 -217
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +0 -60
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/StatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/StatsDisplay.test.js +0 -275
- package/dist/src/ui/components/StatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ToolStatsDisplay.test.js +0 -160
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
- package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -239
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -37
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessage.test.js +0 -116
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -134
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
- package/dist/src/ui/contexts/SessionContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/SessionContext.test.js +0 -96
- package/dist/src/ui/contexts/SessionContext.test.js.map +0 -1
- package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
- package/dist/src/ui/hooks/useGeminiStream.test.js +0 -775
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
- package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -176
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
export type Direction = 'left' | 'right' | 'up' | 'down' | 'wordLeft' | 'wordRight' | 'home' | 'end';
|
|
7
|
-
type UpdateOperation = {
|
|
8
|
-
type: 'insert';
|
|
9
|
-
payload: string;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'backspace';
|
|
12
|
-
};
|
|
13
7
|
export interface Viewport {
|
|
14
8
|
height: number;
|
|
15
9
|
width: number;
|
|
@@ -22,9 +16,75 @@ interface UseTextBufferProps {
|
|
|
22
16
|
setRawMode?: (mode: boolean) => void;
|
|
23
17
|
onChange?: (text: string) => void;
|
|
24
18
|
isValidPath: (path: string) => boolean;
|
|
19
|
+
shellModeActive?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface UndoHistoryEntry {
|
|
22
|
+
lines: string[];
|
|
23
|
+
cursorRow: number;
|
|
24
|
+
cursorCol: number;
|
|
25
25
|
}
|
|
26
26
|
export declare function offsetToLogicalPos(text: string, offset: number): [number, number];
|
|
27
|
-
|
|
27
|
+
interface TextBufferState {
|
|
28
|
+
lines: string[];
|
|
29
|
+
cursorRow: number;
|
|
30
|
+
cursorCol: number;
|
|
31
|
+
preferredCol: number | null;
|
|
32
|
+
undoStack: UndoHistoryEntry[];
|
|
33
|
+
redoStack: UndoHistoryEntry[];
|
|
34
|
+
clipboard: string | null;
|
|
35
|
+
selectionAnchor: [number, number] | null;
|
|
36
|
+
viewportWidth: number;
|
|
37
|
+
}
|
|
38
|
+
type TextBufferAction = {
|
|
39
|
+
type: 'set_text';
|
|
40
|
+
payload: string;
|
|
41
|
+
pushToUndo?: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'insert';
|
|
44
|
+
payload: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'backspace';
|
|
47
|
+
} | {
|
|
48
|
+
type: 'move';
|
|
49
|
+
payload: {
|
|
50
|
+
dir: Direction;
|
|
51
|
+
};
|
|
52
|
+
} | {
|
|
53
|
+
type: 'delete';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'delete_word_left';
|
|
56
|
+
} | {
|
|
57
|
+
type: 'delete_word_right';
|
|
58
|
+
} | {
|
|
59
|
+
type: 'kill_line_right';
|
|
60
|
+
} | {
|
|
61
|
+
type: 'kill_line_left';
|
|
62
|
+
} | {
|
|
63
|
+
type: 'undo';
|
|
64
|
+
} | {
|
|
65
|
+
type: 'redo';
|
|
66
|
+
} | {
|
|
67
|
+
type: 'replace_range';
|
|
68
|
+
payload: {
|
|
69
|
+
startRow: number;
|
|
70
|
+
startCol: number;
|
|
71
|
+
endRow: number;
|
|
72
|
+
endCol: number;
|
|
73
|
+
text: string;
|
|
74
|
+
};
|
|
75
|
+
} | {
|
|
76
|
+
type: 'move_to_offset';
|
|
77
|
+
payload: {
|
|
78
|
+
offset: number;
|
|
79
|
+
};
|
|
80
|
+
} | {
|
|
81
|
+
type: 'create_undo_snapshot';
|
|
82
|
+
} | {
|
|
83
|
+
type: 'set_viewport_width';
|
|
84
|
+
payload: number;
|
|
85
|
+
};
|
|
86
|
+
export declare function textBufferReducer(state: TextBufferState, action: TextBufferAction): TextBufferState;
|
|
87
|
+
export declare function useTextBuffer({ initialText, initialCursorOffset, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive, }: UseTextBufferProps): TextBuffer;
|
|
28
88
|
export interface TextBuffer {
|
|
29
89
|
lines: string[];
|
|
30
90
|
text: string;
|
|
@@ -54,8 +114,8 @@ export interface TextBuffer {
|
|
|
54
114
|
backspace: () => void;
|
|
55
115
|
del: () => void;
|
|
56
116
|
move: (dir: Direction) => void;
|
|
57
|
-
undo: () =>
|
|
58
|
-
redo: () =>
|
|
117
|
+
undo: () => void;
|
|
118
|
+
redo: () => void;
|
|
59
119
|
/**
|
|
60
120
|
* Replaces the text within the specified range with new text.
|
|
61
121
|
* Handles both single-line and multi-line ranges.
|
|
@@ -67,7 +127,7 @@ export interface TextBuffer {
|
|
|
67
127
|
* @param text The new text to insert.
|
|
68
128
|
* @returns True if the buffer was modified, false otherwise.
|
|
69
129
|
*/
|
|
70
|
-
replaceRange: (startRow: number, startCol: number, endRow: number, endCol: number, text: string) =>
|
|
130
|
+
replaceRange: (startRow: number, startCol: number, endRow: number, endCol: number, text: string) => void;
|
|
71
131
|
/**
|
|
72
132
|
* Delete the word to the *left* of the caret, mirroring common
|
|
73
133
|
* Ctrl/Alt+Backspace behaviour in editors & terminals. Both the adjacent
|
|
@@ -99,7 +159,7 @@ export interface TextBuffer {
|
|
|
99
159
|
shift: boolean;
|
|
100
160
|
paste: boolean;
|
|
101
161
|
sequence: string;
|
|
102
|
-
}) =>
|
|
162
|
+
}) => void;
|
|
103
163
|
/**
|
|
104
164
|
* Opens the current buffer contents in the user's preferred terminal text
|
|
105
165
|
* editor ($VISUAL or $EDITOR, falling back to "vi"). The method blocks
|
|
@@ -118,11 +178,7 @@ export interface TextBuffer {
|
|
|
118
178
|
openInExternalEditor: (opts?: {
|
|
119
179
|
editor?: string;
|
|
120
180
|
}) => Promise<void>;
|
|
121
|
-
|
|
122
|
-
paste: () => boolean;
|
|
123
|
-
startSelection: () => void;
|
|
124
|
-
replaceRangeByOffset: (startOffset: number, endOffset: number, replacementText: string) => boolean;
|
|
181
|
+
replaceRangeByOffset: (startOffset: number, endOffset: number, replacementText: string) => void;
|
|
125
182
|
moveToOffset(offset: number): void;
|
|
126
|
-
applyOperations: (ops: UpdateOperation[]) => void;
|
|
127
183
|
}
|
|
128
184
|
export {};
|