@google/gemini-cli 0.1.12-nightly.250714.b018e2d3 → 0.1.13-nightly.250726.fb751c54
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 +30 -3
- package/dist/google-gemini-cli-0.1.13.tgz +0 -0
- package/dist/package.json +6 -4
- package/dist/src/acp/acp.d.ts +208 -0
- package/dist/src/acp/acp.js +193 -0
- package/dist/src/acp/acp.js.map +1 -0
- package/dist/src/acp/acpPeer.d.ts +8 -0
- package/dist/src/acp/acpPeer.js +537 -0
- package/dist/src/acp/acpPeer.js.map +1 -0
- package/dist/src/config/config.d.ts +6 -2
- package/dist/src/config/config.js +77 -13
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +2 -2
- package/dist/src/config/extension.js +21 -16
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/settings.d.ts +15 -2
- package/dist/src/config/settings.js +25 -10
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/gemini.js +10 -20
- 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/patches/is-in-ci.d.ts +7 -0
- package/dist/src/patches/is-in-ci.js +15 -0
- package/dist/src/patches/is-in-ci.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +72 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +43 -5
- package/dist/src/services/CommandService.js +61 -19
- package/dist/src/services/CommandService.js.map +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +37 -0
- package/dist/src/services/FileCommandLoader.js +156 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.d.ts +25 -0
- package/dist/src/services/McpPromptLoader.js +192 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +21 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js +28 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/types.d.ts +34 -0
- package/dist/src/services/prompt-processors/types.js +10 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -0
- package/dist/src/services/types.d.ts +22 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/ui/App.js +103 -98
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/colors.js +6 -0
- package/dist/src/ui/colors.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +39 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +16 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +63 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.d.ts +7 -0
- package/dist/src/ui/commands/chatCommand.js +179 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.js +14 -2
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +64 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +59 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
- package/dist/src/ui/commands/corgiCommand.js +15 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +31 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +16 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/extensionsCommand.js +31 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.js +3 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.d.ts +8 -0
- package/dist/src/ui/commands/ideCommand.js +121 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +425 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.js +11 -4
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
- package/dist/src/ui/commands/privacyCommand.js +16 -0
- package/dist/src/ui/commands/privacyCommand.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +7 -0
- package/dist/src/ui/commands/quitCommand.js +34 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +128 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +54 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.js +2 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +56 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +61 -4
- package/dist/src/ui/commands/types.js +6 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/vimCommand.d.ts +7 -0
- package/dist/src/ui/commands/vimCommand.js +23 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +6 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +46 -19
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -0
- package/dist/src/ui/components/Footer.js +2 -2
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/Help.d.ts +1 -1
- package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +11 -0
- package/dist/src/ui/components/IDEContextDetailDisplay.js +19 -0
- package/dist/src/ui/components/IDEContextDetailDisplay.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +3 -1
- package/dist/src/ui/components/InputPrompt.js +85 -113
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +51 -25
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +12 -11
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +5 -4
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +3 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js +69 -2
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +3 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +60 -10
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +273 -3
- package/dist/src/ui/components/shared/text-buffer.js +426 -80
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js +565 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
- package/dist/src/ui/constants.d.ts +1 -0
- package/dist/src/ui/constants.js +1 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
- package/dist/src/ui/contexts/VimModeContext.js +48 -0
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +54 -15
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +57 -19
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +3 -10
- package/dist/src/ui/hooks/slashCommandProcessor.js +121 -879
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.js +2 -1
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
- package/dist/src/ui/hooks/useCompletion.d.ts +4 -1
- package/dist/src/ui/hooks/useCompletion.js +141 -25
- package/dist/src/ui/hooks/useCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useFocus.d.ts +6 -0
- package/dist/src/ui/hooks/useFocus.js +41 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.js +74 -11
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useInputHistory.d.ts +1 -1
- package/dist/src/ui/hooks/useKeypress.js +5 -2
- package/dist/src/ui/hooks/useKeypress.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +5 -5
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.d.ts +3 -2
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +24 -23
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/vim.d.ts +28 -0
- package/dist/src/ui/hooks/vim.js +630 -0
- package/dist/src/ui/hooks/vim.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.js +3 -1
- package/dist/src/ui/themes/ansi-light.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +2 -0
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/themes/atom-one-dark.js +2 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
- package/dist/src/ui/themes/ayu-light.js +3 -1
- package/dist/src/ui/themes/ayu-light.js.map +1 -1
- package/dist/src/ui/themes/ayu.js +3 -1
- package/dist/src/ui/themes/ayu.js.map +1 -1
- package/dist/src/ui/themes/color-utils.d.ts +21 -0
- package/dist/src/ui/themes/color-utils.js +221 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -0
- package/dist/src/ui/themes/dracula.js +2 -0
- package/dist/src/ui/themes/dracula.js.map +1 -1
- package/dist/src/ui/themes/github-dark.js +2 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -1
- package/dist/src/ui/themes/github-light.js +2 -0
- package/dist/src/ui/themes/github-light.js.map +1 -1
- package/dist/src/ui/themes/googlecode.js +3 -1
- package/dist/src/ui/themes/googlecode.js.map +1 -1
- package/dist/src/ui/themes/no-color.js +3 -1
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.d.ts +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +3 -1
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +31 -6
- package/dist/src/ui/themes/theme-manager.js +104 -34
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +22 -3
- package/dist/src/ui/themes/theme.js +229 -182
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/xcode.js +3 -1
- package/dist/src/ui/themes/xcode.js.map +1 -1
- package/dist/src/ui/types.d.ts +9 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +3 -1
- package/dist/src/ui/utils/CodeColorizer.js +23 -11
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +1 -0
- package/dist/src/ui/utils/commandUtils.js +47 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/markdownUtilities.js +1 -1
- package/dist/src/ui/utils/updateCheck.js +4 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/utils/sandbox.js +7 -3
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.js +22 -1
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.d.ts +7 -0
- package/dist/src/validateNonInterActiveAuth.js +35 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -5
- package/dist/google-gemini-cli-0.1.12.tgz +0 -0
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
export type Direction = 'left' | 'right' | 'up' | 'down' | 'wordLeft' | 'wordRight' | 'home' | 'end';
|
|
7
|
+
export declare const findNextWordStart: (text: string, currentOffset: number) => number;
|
|
8
|
+
export declare const findPrevWordStart: (text: string, currentOffset: number) => number;
|
|
9
|
+
export declare const findWordEnd: (text: string, currentOffset: number) => number;
|
|
10
|
+
export declare const getOffsetFromPosition: (row: number, col: number, lines: string[]) => number;
|
|
11
|
+
export declare const getPositionFromOffsets: (startOffset: number, endOffset: number, lines: string[]) => {
|
|
12
|
+
startRow: number;
|
|
13
|
+
startCol: number;
|
|
14
|
+
endRow: number;
|
|
15
|
+
endCol: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const getLineRangeOffsets: (startRow: number, lineCount: number, lines: string[]) => {
|
|
18
|
+
startOffset: number;
|
|
19
|
+
endOffset: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const replaceRangeInternal: (state: TextBufferState, startRow: number, startCol: number, endRow: number, endCol: number, text: string) => TextBufferState;
|
|
7
22
|
export interface Viewport {
|
|
8
23
|
height: number;
|
|
9
24
|
width: number;
|
|
@@ -24,7 +39,12 @@ interface UndoHistoryEntry {
|
|
|
24
39
|
cursorCol: number;
|
|
25
40
|
}
|
|
26
41
|
export declare function offsetToLogicalPos(text: string, offset: number): [number, number];
|
|
27
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Converts logical row/col position to absolute text offset
|
|
44
|
+
* Inverse operation of offsetToLogicalPos
|
|
45
|
+
*/
|
|
46
|
+
export declare function logicalPosToOffset(lines: string[], row: number, col: number): number;
|
|
47
|
+
export interface TextBufferState {
|
|
28
48
|
lines: string[];
|
|
29
49
|
cursorRow: number;
|
|
30
50
|
cursorCol: number;
|
|
@@ -35,7 +55,8 @@ interface TextBufferState {
|
|
|
35
55
|
selectionAnchor: [number, number] | null;
|
|
36
56
|
viewportWidth: number;
|
|
37
57
|
}
|
|
38
|
-
|
|
58
|
+
export declare const pushUndo: (currentState: TextBufferState) => TextBufferState;
|
|
59
|
+
export type TextBufferAction = {
|
|
39
60
|
type: 'set_text';
|
|
40
61
|
payload: string;
|
|
41
62
|
pushToUndo?: boolean;
|
|
@@ -82,6 +103,125 @@ type TextBufferAction = {
|
|
|
82
103
|
} | {
|
|
83
104
|
type: 'set_viewport_width';
|
|
84
105
|
payload: number;
|
|
106
|
+
} | {
|
|
107
|
+
type: 'vim_delete_word_forward';
|
|
108
|
+
payload: {
|
|
109
|
+
count: number;
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
type: 'vim_delete_word_backward';
|
|
113
|
+
payload: {
|
|
114
|
+
count: number;
|
|
115
|
+
};
|
|
116
|
+
} | {
|
|
117
|
+
type: 'vim_delete_word_end';
|
|
118
|
+
payload: {
|
|
119
|
+
count: number;
|
|
120
|
+
};
|
|
121
|
+
} | {
|
|
122
|
+
type: 'vim_change_word_forward';
|
|
123
|
+
payload: {
|
|
124
|
+
count: number;
|
|
125
|
+
};
|
|
126
|
+
} | {
|
|
127
|
+
type: 'vim_change_word_backward';
|
|
128
|
+
payload: {
|
|
129
|
+
count: number;
|
|
130
|
+
};
|
|
131
|
+
} | {
|
|
132
|
+
type: 'vim_change_word_end';
|
|
133
|
+
payload: {
|
|
134
|
+
count: number;
|
|
135
|
+
};
|
|
136
|
+
} | {
|
|
137
|
+
type: 'vim_delete_line';
|
|
138
|
+
payload: {
|
|
139
|
+
count: number;
|
|
140
|
+
};
|
|
141
|
+
} | {
|
|
142
|
+
type: 'vim_change_line';
|
|
143
|
+
payload: {
|
|
144
|
+
count: number;
|
|
145
|
+
};
|
|
146
|
+
} | {
|
|
147
|
+
type: 'vim_delete_to_end_of_line';
|
|
148
|
+
} | {
|
|
149
|
+
type: 'vim_change_to_end_of_line';
|
|
150
|
+
} | {
|
|
151
|
+
type: 'vim_change_movement';
|
|
152
|
+
payload: {
|
|
153
|
+
movement: 'h' | 'j' | 'k' | 'l';
|
|
154
|
+
count: number;
|
|
155
|
+
};
|
|
156
|
+
} | {
|
|
157
|
+
type: 'vim_move_left';
|
|
158
|
+
payload: {
|
|
159
|
+
count: number;
|
|
160
|
+
};
|
|
161
|
+
} | {
|
|
162
|
+
type: 'vim_move_right';
|
|
163
|
+
payload: {
|
|
164
|
+
count: number;
|
|
165
|
+
};
|
|
166
|
+
} | {
|
|
167
|
+
type: 'vim_move_up';
|
|
168
|
+
payload: {
|
|
169
|
+
count: number;
|
|
170
|
+
};
|
|
171
|
+
} | {
|
|
172
|
+
type: 'vim_move_down';
|
|
173
|
+
payload: {
|
|
174
|
+
count: number;
|
|
175
|
+
};
|
|
176
|
+
} | {
|
|
177
|
+
type: 'vim_move_word_forward';
|
|
178
|
+
payload: {
|
|
179
|
+
count: number;
|
|
180
|
+
};
|
|
181
|
+
} | {
|
|
182
|
+
type: 'vim_move_word_backward';
|
|
183
|
+
payload: {
|
|
184
|
+
count: number;
|
|
185
|
+
};
|
|
186
|
+
} | {
|
|
187
|
+
type: 'vim_move_word_end';
|
|
188
|
+
payload: {
|
|
189
|
+
count: number;
|
|
190
|
+
};
|
|
191
|
+
} | {
|
|
192
|
+
type: 'vim_delete_char';
|
|
193
|
+
payload: {
|
|
194
|
+
count: number;
|
|
195
|
+
};
|
|
196
|
+
} | {
|
|
197
|
+
type: 'vim_insert_at_cursor';
|
|
198
|
+
} | {
|
|
199
|
+
type: 'vim_append_at_cursor';
|
|
200
|
+
} | {
|
|
201
|
+
type: 'vim_open_line_below';
|
|
202
|
+
} | {
|
|
203
|
+
type: 'vim_open_line_above';
|
|
204
|
+
} | {
|
|
205
|
+
type: 'vim_append_at_line_end';
|
|
206
|
+
} | {
|
|
207
|
+
type: 'vim_insert_at_line_start';
|
|
208
|
+
} | {
|
|
209
|
+
type: 'vim_move_to_line_start';
|
|
210
|
+
} | {
|
|
211
|
+
type: 'vim_move_to_line_end';
|
|
212
|
+
} | {
|
|
213
|
+
type: 'vim_move_to_first_nonwhitespace';
|
|
214
|
+
} | {
|
|
215
|
+
type: 'vim_move_to_first_line';
|
|
216
|
+
} | {
|
|
217
|
+
type: 'vim_move_to_last_line';
|
|
218
|
+
} | {
|
|
219
|
+
type: 'vim_move_to_line';
|
|
220
|
+
payload: {
|
|
221
|
+
lineNumber: number;
|
|
222
|
+
};
|
|
223
|
+
} | {
|
|
224
|
+
type: 'vim_escape_insert_mode';
|
|
85
225
|
};
|
|
86
226
|
export declare function textBufferReducer(state: TextBufferState, action: TextBufferAction): TextBufferState;
|
|
87
227
|
export declare function useTextBuffer({ initialText, initialCursorOffset, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive, }: UseTextBufferProps): TextBuffer;
|
|
@@ -109,7 +249,9 @@ export interface TextBuffer {
|
|
|
109
249
|
/**
|
|
110
250
|
* Insert a single character or string without newlines.
|
|
111
251
|
*/
|
|
112
|
-
insert: (ch: string
|
|
252
|
+
insert: (ch: string, opts?: {
|
|
253
|
+
paste?: boolean;
|
|
254
|
+
}) => void;
|
|
113
255
|
newline: () => void;
|
|
114
256
|
backspace: () => void;
|
|
115
257
|
del: () => void;
|
|
@@ -180,5 +322,133 @@ export interface TextBuffer {
|
|
|
180
322
|
}) => Promise<void>;
|
|
181
323
|
replaceRangeByOffset: (startOffset: number, endOffset: number, replacementText: string) => void;
|
|
182
324
|
moveToOffset(offset: number): void;
|
|
325
|
+
/**
|
|
326
|
+
* Delete N words forward from cursor position (vim 'dw' command)
|
|
327
|
+
*/
|
|
328
|
+
vimDeleteWordForward: (count: number) => void;
|
|
329
|
+
/**
|
|
330
|
+
* Delete N words backward from cursor position (vim 'db' command)
|
|
331
|
+
*/
|
|
332
|
+
vimDeleteWordBackward: (count: number) => void;
|
|
333
|
+
/**
|
|
334
|
+
* Delete to end of N words from cursor position (vim 'de' command)
|
|
335
|
+
*/
|
|
336
|
+
vimDeleteWordEnd: (count: number) => void;
|
|
337
|
+
/**
|
|
338
|
+
* Change N words forward from cursor position (vim 'cw' command)
|
|
339
|
+
*/
|
|
340
|
+
vimChangeWordForward: (count: number) => void;
|
|
341
|
+
/**
|
|
342
|
+
* Change N words backward from cursor position (vim 'cb' command)
|
|
343
|
+
*/
|
|
344
|
+
vimChangeWordBackward: (count: number) => void;
|
|
345
|
+
/**
|
|
346
|
+
* Change to end of N words from cursor position (vim 'ce' command)
|
|
347
|
+
*/
|
|
348
|
+
vimChangeWordEnd: (count: number) => void;
|
|
349
|
+
/**
|
|
350
|
+
* Delete N lines from cursor position (vim 'dd' command)
|
|
351
|
+
*/
|
|
352
|
+
vimDeleteLine: (count: number) => void;
|
|
353
|
+
/**
|
|
354
|
+
* Change N lines from cursor position (vim 'cc' command)
|
|
355
|
+
*/
|
|
356
|
+
vimChangeLine: (count: number) => void;
|
|
357
|
+
/**
|
|
358
|
+
* Delete from cursor to end of line (vim 'D' command)
|
|
359
|
+
*/
|
|
360
|
+
vimDeleteToEndOfLine: () => void;
|
|
361
|
+
/**
|
|
362
|
+
* Change from cursor to end of line (vim 'C' command)
|
|
363
|
+
*/
|
|
364
|
+
vimChangeToEndOfLine: () => void;
|
|
365
|
+
/**
|
|
366
|
+
* Change movement operations (vim 'ch', 'cj', 'ck', 'cl' commands)
|
|
367
|
+
*/
|
|
368
|
+
vimChangeMovement: (movement: 'h' | 'j' | 'k' | 'l', count: number) => void;
|
|
369
|
+
/**
|
|
370
|
+
* Move cursor left N times (vim 'h' command)
|
|
371
|
+
*/
|
|
372
|
+
vimMoveLeft: (count: number) => void;
|
|
373
|
+
/**
|
|
374
|
+
* Move cursor right N times (vim 'l' command)
|
|
375
|
+
*/
|
|
376
|
+
vimMoveRight: (count: number) => void;
|
|
377
|
+
/**
|
|
378
|
+
* Move cursor up N times (vim 'k' command)
|
|
379
|
+
*/
|
|
380
|
+
vimMoveUp: (count: number) => void;
|
|
381
|
+
/**
|
|
382
|
+
* Move cursor down N times (vim 'j' command)
|
|
383
|
+
*/
|
|
384
|
+
vimMoveDown: (count: number) => void;
|
|
385
|
+
/**
|
|
386
|
+
* Move cursor forward N words (vim 'w' command)
|
|
387
|
+
*/
|
|
388
|
+
vimMoveWordForward: (count: number) => void;
|
|
389
|
+
/**
|
|
390
|
+
* Move cursor backward N words (vim 'b' command)
|
|
391
|
+
*/
|
|
392
|
+
vimMoveWordBackward: (count: number) => void;
|
|
393
|
+
/**
|
|
394
|
+
* Move cursor to end of Nth word (vim 'e' command)
|
|
395
|
+
*/
|
|
396
|
+
vimMoveWordEnd: (count: number) => void;
|
|
397
|
+
/**
|
|
398
|
+
* Delete N characters at cursor (vim 'x' command)
|
|
399
|
+
*/
|
|
400
|
+
vimDeleteChar: (count: number) => void;
|
|
401
|
+
/**
|
|
402
|
+
* Enter insert mode at cursor (vim 'i' command)
|
|
403
|
+
*/
|
|
404
|
+
vimInsertAtCursor: () => void;
|
|
405
|
+
/**
|
|
406
|
+
* Enter insert mode after cursor (vim 'a' command)
|
|
407
|
+
*/
|
|
408
|
+
vimAppendAtCursor: () => void;
|
|
409
|
+
/**
|
|
410
|
+
* Open new line below and enter insert mode (vim 'o' command)
|
|
411
|
+
*/
|
|
412
|
+
vimOpenLineBelow: () => void;
|
|
413
|
+
/**
|
|
414
|
+
* Open new line above and enter insert mode (vim 'O' command)
|
|
415
|
+
*/
|
|
416
|
+
vimOpenLineAbove: () => void;
|
|
417
|
+
/**
|
|
418
|
+
* Move to end of line and enter insert mode (vim 'A' command)
|
|
419
|
+
*/
|
|
420
|
+
vimAppendAtLineEnd: () => void;
|
|
421
|
+
/**
|
|
422
|
+
* Move to first non-whitespace and enter insert mode (vim 'I' command)
|
|
423
|
+
*/
|
|
424
|
+
vimInsertAtLineStart: () => void;
|
|
425
|
+
/**
|
|
426
|
+
* Move cursor to beginning of line (vim '0' command)
|
|
427
|
+
*/
|
|
428
|
+
vimMoveToLineStart: () => void;
|
|
429
|
+
/**
|
|
430
|
+
* Move cursor to end of line (vim '$' command)
|
|
431
|
+
*/
|
|
432
|
+
vimMoveToLineEnd: () => void;
|
|
433
|
+
/**
|
|
434
|
+
* Move cursor to first non-whitespace character (vim '^' command)
|
|
435
|
+
*/
|
|
436
|
+
vimMoveToFirstNonWhitespace: () => void;
|
|
437
|
+
/**
|
|
438
|
+
* Move cursor to first line (vim 'gg' command)
|
|
439
|
+
*/
|
|
440
|
+
vimMoveToFirstLine: () => void;
|
|
441
|
+
/**
|
|
442
|
+
* Move cursor to last line (vim 'G' command)
|
|
443
|
+
*/
|
|
444
|
+
vimMoveToLastLine: () => void;
|
|
445
|
+
/**
|
|
446
|
+
* Move cursor to specific line number (vim '[N]G' command)
|
|
447
|
+
*/
|
|
448
|
+
vimMoveToLine: (lineNumber: number) => void;
|
|
449
|
+
/**
|
|
450
|
+
* Handle escape from insert mode (moves cursor left if not at line start)
|
|
451
|
+
*/
|
|
452
|
+
vimEscapeInsertMode: () => void;
|
|
183
453
|
}
|
|
184
454
|
export {};
|