@google/gemini-cli 0.1.19-nightly.250814.514e883a → 0.1.20
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 +1 -1
- package/dist/package.json +3 -3
- package/dist/src/acp/acp.d.ts +208 -0
- package/dist/src/{zed-integration → acp}/acp.js +44 -76
- package/dist/src/acp/acp.js.map +1 -0
- package/dist/src/acp/acpPeer.d.ts +8 -0
- package/dist/src/{zed-integration/zedIntegration.js → acp/acpPeer.js} +187 -333
- package/dist/src/acp/acpPeer.js.map +1 -0
- package/dist/src/config/config.d.ts +1 -1
- package/dist/src/config/config.js +8 -11
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/keyBindings.js +0 -4
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/gemini.js +3 -6
- 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.js +2 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +0 -2
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/ui/App.js +2 -8
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +4 -2
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +0 -4
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +0 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +1 -7
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.js +1 -2
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +46 -67
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useFocus.d.ts +0 -4
- package/dist/src/ui/hooks/useFocus.js +4 -4
- package/dist/src/ui/hooks/useFocus.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -3
- package/dist/src/ui/hooks/useFolderTrust.js +9 -24
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +2 -1
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useKeypress.d.ts +1 -9
- package/dist/src/ui/hooks/useKeypress.js +8 -197
- package/dist/src/ui/hooks/useKeypress.js.map +1 -1
- package/dist/src/ui/utils/errorParsing.d.ts +7 -0
- package/dist/src/ui/utils/errorParsing.js +90 -0
- package/dist/src/ui/utils/errorParsing.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/src/config/trustedFolders.d.ts +0 -36
- package/dist/src/config/trustedFolders.js +0 -112
- package/dist/src/config/trustedFolders.js.map +0 -1
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +0 -13
- package/dist/src/ui/commands/terminalSetupCommand.js +0 -41
- package/dist/src/ui/commands/terminalSetupCommand.js.map +0 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -15
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +0 -20
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +0 -1
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -13
- package/dist/src/ui/utils/kittyProtocolDetector.js +0 -88
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
- package/dist/src/ui/utils/platformConstants.d.ts +0 -38
- package/dist/src/ui/utils/platformConstants.js +0 -39
- package/dist/src/ui/utils/platformConstants.js.map +0 -1
- package/dist/src/ui/utils/terminalSetup.d.ts +0 -30
- package/dist/src/ui/utils/terminalSetup.js +0 -281
- package/dist/src/ui/utils/terminalSetup.js.map +0 -1
- package/dist/src/utils/checks.d.ts +0 -19
- package/dist/src/utils/checks.js +0 -24
- package/dist/src/utils/checks.js.map +0 -1
- package/dist/src/zed-integration/acp.d.ts +0 -63
- package/dist/src/zed-integration/acp.js.map +0 -1
- package/dist/src/zed-integration/schema.d.ts +0 -11679
- package/dist/src/zed-integration/schema.js +0 -305
- package/dist/src/zed-integration/schema.js.map +0 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +0 -10
- package/dist/src/zed-integration/zedIntegration.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google/gemini-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "Gemini CLI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"config": {
|
|
28
|
-
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.
|
|
28
|
+
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.20"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@google/gemini-cli-core": "0.1.
|
|
31
|
+
"@google/gemini-cli-core": "0.1.20",
|
|
32
32
|
"@google/genai": "1.9.0",
|
|
33
33
|
"@iarna/toml": "^2.2.5",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.15.1",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dotenv": "^17.1.0",
|
|
39
39
|
"glob": "^10.4.1",
|
|
40
40
|
"highlight.js": "^11.11.1",
|
|
41
|
-
"ink": "^6.
|
|
41
|
+
"ink": "^6.0.1",
|
|
42
42
|
"ink-big-text": "^2.0.0",
|
|
43
43
|
"ink-gradient": "^3.0.0",
|
|
44
44
|
"ink-link": "^4.1.0",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export declare const TRUSTED_FOLDERS_FILENAME = "trustedFolders.json";
|
|
7
|
-
export declare const SETTINGS_DIRECTORY_NAME = ".gemini";
|
|
8
|
-
export declare const USER_SETTINGS_DIR: string;
|
|
9
|
-
export declare const USER_TRUSTED_FOLDERS_PATH: string;
|
|
10
|
-
export declare enum TrustLevel {
|
|
11
|
-
TRUST_FOLDER = "TRUST_FOLDER",
|
|
12
|
-
TRUST_PARENT = "TRUST_PARENT",
|
|
13
|
-
DO_NOT_TRUST = "DO_NOT_TRUST"
|
|
14
|
-
}
|
|
15
|
-
export interface TrustRule {
|
|
16
|
-
path: string;
|
|
17
|
-
trustLevel: TrustLevel;
|
|
18
|
-
}
|
|
19
|
-
export interface TrustedFoldersError {
|
|
20
|
-
message: string;
|
|
21
|
-
path: string;
|
|
22
|
-
}
|
|
23
|
-
export interface TrustedFoldersFile {
|
|
24
|
-
config: Record<string, TrustLevel>;
|
|
25
|
-
path: string;
|
|
26
|
-
}
|
|
27
|
-
export declare class LoadedTrustedFolders {
|
|
28
|
-
user: TrustedFoldersFile;
|
|
29
|
-
errors: TrustedFoldersError[];
|
|
30
|
-
constructor(user: TrustedFoldersFile, errors: TrustedFoldersError[]);
|
|
31
|
-
get rules(): TrustRule[];
|
|
32
|
-
setValue(path: string, trustLevel: TrustLevel): void;
|
|
33
|
-
}
|
|
34
|
-
export declare function loadTrustedFolders(): LoadedTrustedFolders;
|
|
35
|
-
export declare function saveTrustedFolders(trustedFoldersFile: TrustedFoldersFile): void;
|
|
36
|
-
export declare function isWorkspaceTrusted(): boolean | undefined;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import * as fs from 'fs';
|
|
7
|
-
import * as path from 'path';
|
|
8
|
-
import { homedir } from 'os';
|
|
9
|
-
import { getErrorMessage, isWithinRoot } from '@google/gemini-cli-core';
|
|
10
|
-
import stripJsonComments from 'strip-json-comments';
|
|
11
|
-
export const TRUSTED_FOLDERS_FILENAME = 'trustedFolders.json';
|
|
12
|
-
export const SETTINGS_DIRECTORY_NAME = '.gemini';
|
|
13
|
-
export const USER_SETTINGS_DIR = path.join(homedir(), SETTINGS_DIRECTORY_NAME);
|
|
14
|
-
export const USER_TRUSTED_FOLDERS_PATH = path.join(USER_SETTINGS_DIR, TRUSTED_FOLDERS_FILENAME);
|
|
15
|
-
export var TrustLevel;
|
|
16
|
-
(function (TrustLevel) {
|
|
17
|
-
TrustLevel["TRUST_FOLDER"] = "TRUST_FOLDER";
|
|
18
|
-
TrustLevel["TRUST_PARENT"] = "TRUST_PARENT";
|
|
19
|
-
TrustLevel["DO_NOT_TRUST"] = "DO_NOT_TRUST";
|
|
20
|
-
})(TrustLevel || (TrustLevel = {}));
|
|
21
|
-
export class LoadedTrustedFolders {
|
|
22
|
-
user;
|
|
23
|
-
errors;
|
|
24
|
-
constructor(user, errors) {
|
|
25
|
-
this.user = user;
|
|
26
|
-
this.errors = errors;
|
|
27
|
-
}
|
|
28
|
-
get rules() {
|
|
29
|
-
return Object.entries(this.user.config).map(([path, trustLevel]) => ({
|
|
30
|
-
path,
|
|
31
|
-
trustLevel,
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
setValue(path, trustLevel) {
|
|
35
|
-
this.user.config[path] = trustLevel;
|
|
36
|
-
saveTrustedFolders(this.user);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export function loadTrustedFolders() {
|
|
40
|
-
const errors = [];
|
|
41
|
-
const userConfig = {};
|
|
42
|
-
const userPath = USER_TRUSTED_FOLDERS_PATH;
|
|
43
|
-
// Load user trusted folders
|
|
44
|
-
try {
|
|
45
|
-
if (fs.existsSync(userPath)) {
|
|
46
|
-
const content = fs.readFileSync(userPath, 'utf-8');
|
|
47
|
-
const parsed = JSON.parse(stripJsonComments(content));
|
|
48
|
-
if (parsed) {
|
|
49
|
-
Object.assign(userConfig, parsed);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
errors.push({
|
|
55
|
-
message: getErrorMessage(error),
|
|
56
|
-
path: userPath,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return new LoadedTrustedFolders({ path: userPath, config: userConfig }, errors);
|
|
60
|
-
}
|
|
61
|
-
export function saveTrustedFolders(trustedFoldersFile) {
|
|
62
|
-
try {
|
|
63
|
-
// Ensure the directory exists
|
|
64
|
-
const dirPath = path.dirname(trustedFoldersFile.path);
|
|
65
|
-
if (!fs.existsSync(dirPath)) {
|
|
66
|
-
fs.mkdirSync(dirPath, { recursive: true });
|
|
67
|
-
}
|
|
68
|
-
fs.writeFileSync(trustedFoldersFile.path, JSON.stringify(trustedFoldersFile.config, null, 2), 'utf-8');
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
console.error('Error saving trusted folders file:', error);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export function isWorkspaceTrusted() {
|
|
75
|
-
const { rules, errors } = loadTrustedFolders();
|
|
76
|
-
if (errors.length > 0) {
|
|
77
|
-
for (const error of errors) {
|
|
78
|
-
console.error(`Error loading trusted folders config from ${error.path}: ${error.message}`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const trustedPaths = [];
|
|
82
|
-
const untrustedPaths = [];
|
|
83
|
-
for (const rule of rules) {
|
|
84
|
-
switch (rule.trustLevel) {
|
|
85
|
-
case TrustLevel.TRUST_FOLDER:
|
|
86
|
-
trustedPaths.push(rule.path);
|
|
87
|
-
break;
|
|
88
|
-
case TrustLevel.TRUST_PARENT:
|
|
89
|
-
trustedPaths.push(path.dirname(rule.path));
|
|
90
|
-
break;
|
|
91
|
-
case TrustLevel.DO_NOT_TRUST:
|
|
92
|
-
untrustedPaths.push(rule.path);
|
|
93
|
-
break;
|
|
94
|
-
default:
|
|
95
|
-
// Do nothing for unknown trust levels.
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
const cwd = process.cwd();
|
|
100
|
-
for (const trustedPath of trustedPaths) {
|
|
101
|
-
if (isWithinRoot(cwd, trustedPath)) {
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
for (const untrustedPath of untrustedPaths) {
|
|
106
|
-
if (path.normalize(cwd) === path.normalize(untrustedPath)) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return undefined;
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=trustedFolders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trustedFolders.js","sourceRoot":"","sources":["../../../src/config/trustedFolders.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,uBAAuB,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,IAAI,CAChD,iBAAiB,EACjB,wBAAwB,CACzB,CAAC;AAEF,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;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K,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,QAAQ,IAAI,CAAC,UAAU,EAAE,CAAC;YACxB,KAAK,UAAU,CAAC,YAAY;gBAC1B,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7B,MAAM;YACR,KAAK,UAAU,CAAC,YAAY;gBAC1B,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC3C,MAAM;YACR,KAAK,UAAU,CAAC,YAAY;gBAC1B,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/B,MAAM;YACR;gBACE,uCAAuC;gBACvC,MAAM;QACV,CAAC;IACH,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,IAAI,YAAY,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;YAC1D,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { SlashCommand } from './types.js';
|
|
7
|
-
/**
|
|
8
|
-
* Command to configure terminal keybindings for multiline input support.
|
|
9
|
-
*
|
|
10
|
-
* This command automatically detects and configures VS Code, Cursor, and Windsurf
|
|
11
|
-
* to support Shift+Enter and Ctrl+Enter for multiline input.
|
|
12
|
-
*/
|
|
13
|
-
export declare const terminalSetupCommand: SlashCommand;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { CommandKind } from './types.js';
|
|
7
|
-
import { terminalSetup } from '../utils/terminalSetup.js';
|
|
8
|
-
/**
|
|
9
|
-
* Command to configure terminal keybindings for multiline input support.
|
|
10
|
-
*
|
|
11
|
-
* This command automatically detects and configures VS Code, Cursor, and Windsurf
|
|
12
|
-
* to support Shift+Enter and Ctrl+Enter for multiline input.
|
|
13
|
-
*/
|
|
14
|
-
export const terminalSetupCommand = {
|
|
15
|
-
name: 'terminal-setup',
|
|
16
|
-
description: 'Configure terminal keybindings for multiline input (VS Code, Cursor, Windsurf)',
|
|
17
|
-
kind: CommandKind.BUILT_IN,
|
|
18
|
-
action: async () => {
|
|
19
|
-
try {
|
|
20
|
-
const result = await terminalSetup();
|
|
21
|
-
let content = result.message;
|
|
22
|
-
if (result.requiresRestart) {
|
|
23
|
-
content +=
|
|
24
|
-
'\n\nPlease restart your terminal for the changes to take effect.';
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
type: 'message',
|
|
28
|
-
content,
|
|
29
|
-
messageType: result.success ? 'info' : 'error',
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
return {
|
|
34
|
-
type: 'message',
|
|
35
|
-
content: `Failed to configure terminal: ${error}`,
|
|
36
|
-
messageType: 'error',
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=terminalSetupCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminalSetupCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/terminalSetupCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAqC,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,gFAAgF;IAClF,IAAI,EAAE,WAAW,CAAC,QAAQ;IAE1B,MAAM,EAAE,KAAK,IAAkC,EAAE;QAC/C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;YAErC,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;YAC7B,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;gBAC3B,OAAO;oBACL,kEAAkE,CAAC;YACvE,CAAC;YAED,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,OAAO;gBACP,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;aAC/C,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,iCAAiC,KAAK,EAAE;gBACjD,WAAW,EAAE,OAAO;aACrB,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export interface KittyProtocolStatus {
|
|
7
|
-
supported: boolean;
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
checking: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Hook that returns the cached Kitty keyboard protocol status.
|
|
13
|
-
* Detection is done once at app startup to avoid repeated queries.
|
|
14
|
-
*/
|
|
15
|
-
export declare function useKittyKeyboardProtocol(): KittyProtocolStatus;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { useState } from 'react';
|
|
7
|
-
import { isKittyProtocolEnabled, isKittyProtocolSupported, } from '../utils/kittyProtocolDetector.js';
|
|
8
|
-
/**
|
|
9
|
-
* Hook that returns the cached Kitty keyboard protocol status.
|
|
10
|
-
* Detection is done once at app startup to avoid repeated queries.
|
|
11
|
-
*/
|
|
12
|
-
export function useKittyKeyboardProtocol() {
|
|
13
|
-
const [status] = useState({
|
|
14
|
-
supported: isKittyProtocolSupported(),
|
|
15
|
-
enabled: isKittyProtocolEnabled(),
|
|
16
|
-
checking: false,
|
|
17
|
-
});
|
|
18
|
-
return status;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=useKittyKeyboardProtocol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useKittyKeyboardProtocol.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useKittyKeyboardProtocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAQ3C;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAsB;QAC7C,SAAS,EAAE,wBAAwB,EAAE;QACrC,OAAO,EAAE,sBAAsB,EAAE;QACjC,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Detects Kitty keyboard protocol support.
|
|
8
|
-
* Definitive document about this protocol lives at https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
9
|
-
* This function should be called once at app startup.
|
|
10
|
-
*/
|
|
11
|
-
export declare function detectAndEnableKittyProtocol(): Promise<boolean>;
|
|
12
|
-
export declare function isKittyProtocolEnabled(): boolean;
|
|
13
|
-
export declare function isKittyProtocolSupported(): boolean;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
let detectionComplete = false;
|
|
7
|
-
let protocolSupported = false;
|
|
8
|
-
let protocolEnabled = false;
|
|
9
|
-
/**
|
|
10
|
-
* Detects Kitty keyboard protocol support.
|
|
11
|
-
* Definitive document about this protocol lives at https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
12
|
-
* This function should be called once at app startup.
|
|
13
|
-
*/
|
|
14
|
-
export async function detectAndEnableKittyProtocol() {
|
|
15
|
-
if (detectionComplete) {
|
|
16
|
-
return protocolSupported;
|
|
17
|
-
}
|
|
18
|
-
return new Promise((resolve) => {
|
|
19
|
-
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
20
|
-
detectionComplete = true;
|
|
21
|
-
resolve(false);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const originalRawMode = process.stdin.isRaw;
|
|
25
|
-
if (!originalRawMode) {
|
|
26
|
-
process.stdin.setRawMode(true);
|
|
27
|
-
}
|
|
28
|
-
let responseBuffer = '';
|
|
29
|
-
let progressiveEnhancementReceived = false;
|
|
30
|
-
let checkFinished = false;
|
|
31
|
-
const handleData = (data) => {
|
|
32
|
-
responseBuffer += data.toString();
|
|
33
|
-
// Check for progressive enhancement response (CSI ? <flags> u)
|
|
34
|
-
if (responseBuffer.includes('\x1b[?') && responseBuffer.includes('u')) {
|
|
35
|
-
progressiveEnhancementReceived = true;
|
|
36
|
-
}
|
|
37
|
-
// Check for device attributes response (CSI ? <attrs> c)
|
|
38
|
-
if (responseBuffer.includes('\x1b[?') && responseBuffer.includes('c')) {
|
|
39
|
-
if (!checkFinished) {
|
|
40
|
-
checkFinished = true;
|
|
41
|
-
process.stdin.removeListener('data', handleData);
|
|
42
|
-
if (!originalRawMode) {
|
|
43
|
-
process.stdin.setRawMode(false);
|
|
44
|
-
}
|
|
45
|
-
if (progressiveEnhancementReceived) {
|
|
46
|
-
// Enable the protocol
|
|
47
|
-
process.stdout.write('\x1b[>1u');
|
|
48
|
-
protocolSupported = true;
|
|
49
|
-
protocolEnabled = true;
|
|
50
|
-
// Set up cleanup on exit
|
|
51
|
-
process.on('exit', disableProtocol);
|
|
52
|
-
process.on('SIGTERM', disableProtocol);
|
|
53
|
-
}
|
|
54
|
-
detectionComplete = true;
|
|
55
|
-
resolve(protocolSupported);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
process.stdin.on('data', handleData);
|
|
60
|
-
// Send queries
|
|
61
|
-
process.stdout.write('\x1b[?u'); // Query progressive enhancement
|
|
62
|
-
process.stdout.write('\x1b[c'); // Query device attributes
|
|
63
|
-
// Timeout after 50ms
|
|
64
|
-
setTimeout(() => {
|
|
65
|
-
if (!checkFinished) {
|
|
66
|
-
process.stdin.removeListener('data', handleData);
|
|
67
|
-
if (!originalRawMode) {
|
|
68
|
-
process.stdin.setRawMode(false);
|
|
69
|
-
}
|
|
70
|
-
detectionComplete = true;
|
|
71
|
-
resolve(false);
|
|
72
|
-
}
|
|
73
|
-
}, 50);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function disableProtocol() {
|
|
77
|
-
if (protocolEnabled) {
|
|
78
|
-
process.stdout.write('\x1b[<u');
|
|
79
|
-
protocolEnabled = false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
export function isKittyProtocolEnabled() {
|
|
83
|
-
return protocolEnabled;
|
|
84
|
-
}
|
|
85
|
-
export function isKittyProtocolSupported() {
|
|
86
|
-
return protocolSupported;
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=kittyProtocolDetector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kittyProtocolDetector.js","sourceRoot":"","sources":["../../../../src/ui/utils/kittyProtocolDetector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAC9B,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAC9B,IAAI,eAAe,GAAG,KAAK,CAAC;AAE5B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B;IAChD,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAClD,iBAAiB,GAAG,IAAI,CAAC;YACzB,OAAO,CAAC,KAAK,CAAC,CAAC;YACf,OAAO;QACT,CAAC;QAED,MAAM,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;QAC5C,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,cAAc,GAAG,EAAE,CAAC;QACxB,IAAI,8BAA8B,GAAG,KAAK,CAAC;QAC3C,IAAI,aAAa,GAAG,KAAK,CAAC;QAE1B,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE;YAClC,cAAc,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAElC,+DAA+D;YAC/D,IAAI,cAAc,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,IAAI,CAAC,aAAa,EAAE,CAAC;gBACnB,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;gBACjD,IAAI,CAAC,eAAe,EAAE,CAAC;oBACrB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAClC,CAAC;gBACD,iBAAiB,GAAG,IAAI,CAAC;gBACzB,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe;IACtB,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAChC,eAAe,GAAG,KAAK,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Terminal Platform Constants
|
|
8
|
-
*
|
|
9
|
-
* This file contains terminal-related constants used throughout the application,
|
|
10
|
-
* specifically for handling keyboard inputs and terminal protocols.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Kitty keyboard protocol sequences for enhanced keyboard input.
|
|
14
|
-
* @see https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
15
|
-
*/
|
|
16
|
-
export declare const KITTY_CTRL_C = "[99;5u";
|
|
17
|
-
/**
|
|
18
|
-
* Timing constants for terminal interactions
|
|
19
|
-
*/
|
|
20
|
-
export declare const CTRL_EXIT_PROMPT_DURATION_MS = 1000;
|
|
21
|
-
/**
|
|
22
|
-
* VS Code terminal integration constants
|
|
23
|
-
*/
|
|
24
|
-
export declare const VSCODE_SHIFT_ENTER_SEQUENCE = "\\\r\n";
|
|
25
|
-
/**
|
|
26
|
-
* Backslash + Enter detection window in milliseconds.
|
|
27
|
-
* Used to detect Shift+Enter pattern where backslash
|
|
28
|
-
* is followed by Enter within this timeframe.
|
|
29
|
-
*/
|
|
30
|
-
export declare const BACKSLASH_ENTER_DETECTION_WINDOW_MS = 5;
|
|
31
|
-
/**
|
|
32
|
-
* Maximum expected length of a Kitty keyboard protocol sequence.
|
|
33
|
-
* Format: ESC [ <keycode> ; <modifiers> u/~
|
|
34
|
-
* Example: \x1b[13;2u (Shift+Enter) = 8 chars
|
|
35
|
-
* Longest reasonable: \x1b[127;15~ = 11 chars (Del with all modifiers)
|
|
36
|
-
* We use 12 to provide a small buffer.
|
|
37
|
-
*/
|
|
38
|
-
export declare const MAX_KITTY_SEQUENCE_LENGTH = 12;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Terminal Platform Constants
|
|
8
|
-
*
|
|
9
|
-
* This file contains terminal-related constants used throughout the application,
|
|
10
|
-
* specifically for handling keyboard inputs and terminal protocols.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Kitty keyboard protocol sequences for enhanced keyboard input.
|
|
14
|
-
* @see https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
15
|
-
*/
|
|
16
|
-
export const KITTY_CTRL_C = '[99;5u';
|
|
17
|
-
/**
|
|
18
|
-
* Timing constants for terminal interactions
|
|
19
|
-
*/
|
|
20
|
-
export const CTRL_EXIT_PROMPT_DURATION_MS = 1000;
|
|
21
|
-
/**
|
|
22
|
-
* VS Code terminal integration constants
|
|
23
|
-
*/
|
|
24
|
-
export const VSCODE_SHIFT_ENTER_SEQUENCE = '\\\r\n';
|
|
25
|
-
/**
|
|
26
|
-
* Backslash + Enter detection window in milliseconds.
|
|
27
|
-
* Used to detect Shift+Enter pattern where backslash
|
|
28
|
-
* is followed by Enter within this timeframe.
|
|
29
|
-
*/
|
|
30
|
-
export const BACKSLASH_ENTER_DETECTION_WINDOW_MS = 5;
|
|
31
|
-
/**
|
|
32
|
-
* Maximum expected length of a Kitty keyboard protocol sequence.
|
|
33
|
-
* Format: ESC [ <keycode> ; <modifiers> u/~
|
|
34
|
-
* Example: \x1b[13;2u (Shift+Enter) = 8 chars
|
|
35
|
-
* Longest reasonable: \x1b[127;15~ = 11 chars (Del with all modifiers)
|
|
36
|
-
* We use 12 to provide a small buffer.
|
|
37
|
-
*/
|
|
38
|
-
export const MAX_KITTY_SEQUENCE_LENGTH = 12;
|
|
39
|
-
//# sourceMappingURL=platformConstants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platformConstants.js","sourceRoot":"","sources":["../../../../src/ui/utils/platformConstants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export interface TerminalSetupResult {
|
|
7
|
-
success: boolean;
|
|
8
|
-
message: string;
|
|
9
|
-
requiresRestart?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Main terminal setup function that detects and configures the current terminal.
|
|
13
|
-
*
|
|
14
|
-
* This function:
|
|
15
|
-
* 1. Detects the current terminal emulator
|
|
16
|
-
* 2. Applies appropriate configuration for Shift+Enter and Ctrl+Enter support
|
|
17
|
-
* 3. Creates backups of configuration files before modifying them
|
|
18
|
-
*
|
|
19
|
-
* @returns Promise<TerminalSetupResult> Result object with success status and message
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* const result = await terminalSetup();
|
|
23
|
-
* if (result.success) {
|
|
24
|
-
* console.log(result.message);
|
|
25
|
-
* if (result.requiresRestart) {
|
|
26
|
-
* console.log('Please restart your terminal');
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
export declare function terminalSetup(): Promise<TerminalSetupResult>;
|