@vybestack/llxprt-code 0.1.18-nightly.250807.306d1939 → 0.1.18-nightly.250811.b0db22c6
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 -0
- package/dist/package.json +6 -4
- package/dist/src/acp/acpPeer.js +72 -64
- package/dist/src/acp/acpPeer.js.map +1 -1
- package/dist/src/auth/gemini-oauth-provider.d.ts +15 -0
- package/dist/src/auth/gemini-oauth-provider.js +33 -0
- package/dist/src/auth/gemini-oauth-provider.js.map +1 -0
- package/dist/src/auth/oauth-manager.d.ts +103 -0
- package/dist/src/auth/oauth-manager.js +326 -0
- package/dist/src/auth/oauth-manager.js.map +1 -0
- package/dist/src/auth/oauth-manager.spec.d.ts +6 -0
- package/dist/src/auth/oauth-manager.spec.js +523 -0
- package/dist/src/auth/oauth-manager.spec.js.map +1 -0
- package/dist/src/auth/qwen-oauth-provider.d.ts +14 -0
- package/dist/src/auth/qwen-oauth-provider.js +75 -0
- package/dist/src/auth/qwen-oauth-provider.js.map +1 -0
- package/dist/src/auth/types.d.ts +7 -0
- package/dist/src/auth/types.js +7 -0
- package/dist/src/auth/types.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +7 -0
- package/dist/src/commands/mcp/add.js +155 -0
- package/dist/src/commands/mcp/add.js.map +1 -0
- package/dist/src/commands/mcp/list.d.ts +8 -0
- package/dist/src/commands/mcp/list.js +110 -0
- package/dist/src/commands/mcp/list.js.map +1 -0
- package/dist/src/commands/mcp/remove.d.ts +7 -0
- package/dist/src/commands/mcp/remove.js +44 -0
- package/dist/src/commands/mcp/remove.js.map +1 -0
- package/dist/src/commands/mcp.d.ts +7 -0
- package/dist/src/commands/mcp.js +23 -0
- package/dist/src/commands/mcp.js.map +1 -0
- package/dist/src/config/auth.js +9 -0
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.js +100 -43
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +66 -0
- package/dist/src/config/keyBindings.js +136 -0
- package/dist/src/config/keyBindings.js.map +1 -0
- package/dist/src/config/settings.d.ts +3 -56
- package/dist/src/config/settings.js +20 -4
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +587 -0
- package/dist/src/config/settingsSchema.js +565 -0
- package/dist/src/config/settingsSchema.js.map +1 -0
- package/dist/src/gemini.js +12 -109
- 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 +0 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/providers/logging/git-stats-service-impl.d.ts +19 -0
- package/dist/src/providers/logging/git-stats-service-impl.js +25 -0
- package/dist/src/providers/logging/git-stats-service-impl.js.map +1 -0
- package/dist/src/providers/logging/git-stats.d.ts +43 -0
- package/dist/src/providers/logging/git-stats.js +137 -0
- package/dist/src/providers/logging/git-stats.js.map +1 -0
- package/dist/src/providers/providerManagerInstance.js +42 -4
- package/dist/src/providers/providerManagerInstance.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +4 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/todo-continuation/todoContinuationService.d.ts +172 -0
- package/dist/src/services/todo-continuation/todoContinuationService.js +387 -0
- package/dist/src/services/todo-continuation/todoContinuationService.js.map +1 -0
- package/dist/src/services/todo-continuation/todoContinuationService.spec.d.ts +6 -0
- package/dist/src/services/todo-continuation/todoContinuationService.spec.js +385 -0
- package/dist/src/services/todo-continuation/todoContinuationService.spec.js.map +1 -0
- package/dist/src/ui/App.js +123 -37
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.d.ts +14 -0
- package/dist/src/ui/IdeIntegrationNudge.js +32 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
- package/dist/src/ui/colors.d.ts +5 -0
- package/dist/src/ui/colors.js +51 -0
- package/dist/src/ui/colors.js.map +1 -1
- package/dist/src/ui/commands/authCommand.d.ts +11 -1
- package/dist/src/ui/commands/authCommand.js +143 -48
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +16 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/diagnosticsCommand.js +9 -1
- package/dist/src/ui/commands/diagnosticsCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.js +67 -31
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/keyfileCommand.js +15 -12
- package/dist/src/ui/commands/keyfileCommand.js.map +1 -1
- package/dist/src/ui/commands/loggingCommand.d.ts +15 -0
- package/dist/src/ui/commands/loggingCommand.js +421 -0
- package/dist/src/ui/commands/loggingCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/privacyCommand.d.ts +3 -0
- package/dist/src/ui/commands/privacyCommand.js +6 -3
- package/dist/src/ui/commands/privacyCommand.js.map +1 -1
- package/dist/src/ui/commands/profileCommand.js +1 -0
- package/dist/src/ui/commands/profileCommand.js.map +1 -1
- package/dist/src/ui/commands/setCommand.js +2 -0
- package/dist/src/ui/commands/setCommand.js.map +1 -1
- package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
- package/dist/src/ui/commands/settingsCommand.js +16 -0
- package/dist/src/ui/commands/settingsCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.js +90 -26
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +14 -2
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.js +13 -56
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/AuthInProgress.js +3 -3
- package/dist/src/ui/components/AuthInProgress.js.map +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +10 -0
- package/dist/src/ui/components/ContextUsageDisplay.js +27 -0
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.d.ts +16 -0
- package/dist/src/ui/components/FolderTrustDialog.js +38 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/Footer.js +132 -15
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +1 -0
- package/dist/src/ui/components/InputPrompt.js +87 -31
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoggingDialog.d.ts +37 -0
- package/dist/src/ui/components/LoggingDialog.js +155 -0
- package/dist/src/ui/components/LoggingDialog.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +6 -4
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
- package/dist/src/ui/components/ProviderDialog.js +100 -26
- package/dist/src/ui/components/ProviderDialog.js.map +1 -1
- package/dist/src/ui/components/ProviderModelDialog.js +99 -27
- package/dist/src/ui/components/ProviderModelDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +14 -0
- package/dist/src/ui/components/SettingsDialog.js +247 -0
- package/dist/src/ui/components/SettingsDialog.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.js +4 -15
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/TodoPanel.d.ts +11 -0
- package/dist/src/ui/components/TodoPanel.js +206 -0
- package/dist/src/ui/components/TodoPanel.js.map +1 -0
- package/dist/src/ui/components/ToolsDialog.d.ts +2 -2
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +116 -16
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +36 -8
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/todo-utils.d.ts +16 -0
- package/dist/src/ui/components/todo-utils.js +41 -0
- package/dist/src/ui/components/todo-utils.js.map +1 -0
- package/dist/src/ui/contexts/SettingsContext.d.ts +9 -0
- package/dist/src/ui/contexts/SettingsContext.js +15 -0
- package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
- package/dist/src/ui/contexts/TodoContext.d.ts +15 -0
- package/dist/src/ui/contexts/TodoContext.js +18 -0
- package/dist/src/ui/contexts/TodoContext.js.map +1 -0
- package/dist/src/ui/contexts/TodoProvider.d.ts +7 -0
- package/dist/src/ui/contexts/TodoProvider.js +62 -0
- package/dist/src/ui/contexts/TodoProvider.js.map +1 -0
- package/dist/src/ui/contexts/ToolCallContext.d.ts +19 -0
- package/dist/src/ui/contexts/ToolCallContext.js +13 -0
- package/dist/src/ui/contexts/ToolCallContext.js.map +1 -0
- package/dist/src/ui/contexts/ToolCallProvider.d.ts +12 -0
- package/dist/src/ui/contexts/ToolCallProvider.js +62 -0
- package/dist/src/ui/contexts/ToolCallProvider.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +28 -4
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +6 -2
- package/dist/src/ui/hooks/slashCommandProcessor.js +142 -113
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useAtCompletion.js +180 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useAuthCommand.js +14 -0
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +7 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +11 -0
- package/dist/src/ui/hooks/useFolderTrust.js +22 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +16 -4
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +12 -12
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useResponsive.d.ts +14 -0
- package/dist/src/ui/hooks/useResponsive.js +19 -0
- package/dist/src/ui/hooks/useResponsive.js.map +1 -0
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +10 -0
- package/dist/src/ui/hooks/useSettingsCommand.js +21 -0
- package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTodoContinuation.d.ts +31 -0
- package/dist/src/ui/hooks/useTodoContinuation.js +148 -0
- package/dist/src/ui/hooks/useTodoContinuation.js.map +1 -0
- package/dist/src/ui/hooks/useTodoContinuation.spec.d.ts +6 -0
- package/dist/src/ui/hooks/useTodoContinuation.spec.js +378 -0
- package/dist/src/ui/hooks/useTodoContinuation.spec.js.map +1 -0
- package/dist/src/ui/hooks/useToolsDialog.d.ts +2 -2
- package/dist/src/ui/hooks/useToolsDialog.js.map +1 -1
- package/dist/src/ui/keyMatchers.d.ts +26 -0
- package/dist/src/ui/keyMatchers.js +68 -0
- package/dist/src/ui/keyMatchers.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +10 -4
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -1
- package/dist/src/ui/themes/semantic-resolver.d.ts +12 -0
- package/dist/src/ui/themes/semantic-resolver.js +32 -0
- package/dist/src/ui/themes/semantic-resolver.js.map +1 -0
- package/dist/src/ui/themes/semantic-tokens.d.ts +52 -0
- package/dist/src/ui/themes/semantic-tokens.js +7 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
- package/dist/src/ui/themes/theme-compat.d.ts +34 -0
- package/dist/src/ui/themes/theme-compat.js +65 -0
- package/dist/src/ui/themes/theme-compat.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +8 -0
- package/dist/src/ui/themes/theme-manager.js +18 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/types.d.ts +1 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +2 -1
- package/dist/src/ui/utils/CodeColorizer.js +4 -3
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/ConsolePatcher.d.ts +1 -0
- package/dist/src/ui/utils/ConsolePatcher.js +3 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +4 -2
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +1 -0
- package/dist/src/ui/utils/commandUtils.js +22 -1
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/responsive.d.ts +16 -0
- package/dist/src/ui/utils/responsive.js +111 -0
- package/dist/src/ui/utils/responsive.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +2 -2
- package/dist/src/utils/cleanup.js +2 -2
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/dialogScopeUtils.d.ts +31 -0
- package/dist/src/utils/dialogScopeUtils.js +48 -0
- package/dist/src/utils/dialogScopeUtils.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +21 -1
- package/dist/src/utils/gitUtils.js +70 -3
- package/dist/src/utils/gitUtils.js.map +1 -1
- package/dist/src/utils/privacy/ConversationDataRedactor.d.ts +75 -0
- package/dist/src/utils/privacy/ConversationDataRedactor.js +412 -0
- package/dist/src/utils/privacy/ConversationDataRedactor.js.map +1 -0
- package/dist/src/utils/privacy/PrivacyManager.d.ts +58 -0
- package/dist/src/utils/privacy/PrivacyManager.js +133 -0
- package/dist/src/utils/privacy/PrivacyManager.js.map +1 -0
- package/dist/src/utils/sandbox.js +430 -401
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/settingsUtils.d.ts +126 -0
- package/dist/src/utils/settingsUtils.js +327 -0
- package/dist/src/utils/settingsUtils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -4
- package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +0 -12
- package/dist/src/ui/components/IDEContextDetailDisplay.js +0 -17
- package/dist/src/ui/components/IDEContextDetailDisplay.js.map +0 -1
@@ -0,0 +1,111 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
export const BREAKPOINTS = {
|
7
|
+
NARROW: 80,
|
8
|
+
STANDARD: 120,
|
9
|
+
WIDE: 160,
|
10
|
+
};
|
11
|
+
export function getBreakpoint(width) {
|
12
|
+
if (width < BREAKPOINTS.NARROW) {
|
13
|
+
return 'NARROW';
|
14
|
+
}
|
15
|
+
if (width <= BREAKPOINTS.STANDARD) {
|
16
|
+
return 'STANDARD';
|
17
|
+
}
|
18
|
+
return 'WIDE';
|
19
|
+
}
|
20
|
+
export function isNarrowWidth(width) {
|
21
|
+
return width < BREAKPOINTS.NARROW;
|
22
|
+
}
|
23
|
+
export function truncateMiddle(text, maxLength) {
|
24
|
+
if (text.length <= maxLength) {
|
25
|
+
return text;
|
26
|
+
}
|
27
|
+
if (maxLength <= 1) {
|
28
|
+
return '.';
|
29
|
+
}
|
30
|
+
if (maxLength <= 3) {
|
31
|
+
return '..';
|
32
|
+
}
|
33
|
+
const ellipsis = '...';
|
34
|
+
// For path-like strings, use smart path truncation
|
35
|
+
if (text.includes('/')) {
|
36
|
+
const segments = text.split('/');
|
37
|
+
if (segments.length < 2) {
|
38
|
+
// Not really a path, fall back to standard truncation
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
const firstDir = segments[0];
|
42
|
+
const filename = segments[segments.length - 1];
|
43
|
+
const parentDir = segments.length > 2 ? segments[segments.length - 2] : '';
|
44
|
+
// Try: firstDir + ... + parentDir + filename
|
45
|
+
if (parentDir && segments.length >= 3) {
|
46
|
+
const candidate = firstDir + ellipsis + '/' + parentDir + '/' + filename;
|
47
|
+
if (candidate.length <= maxLength) {
|
48
|
+
return candidate;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
// Try: firstDir + ... + filename
|
52
|
+
const candidate2 = firstDir + ellipsis + '/' + filename;
|
53
|
+
if (candidate2.length <= maxLength) {
|
54
|
+
return candidate2;
|
55
|
+
}
|
56
|
+
// Try: /firstChar + ... + endOfFilename (for very constrained cases)
|
57
|
+
if (maxLength <= 10) {
|
58
|
+
const firstChar = firstDir.length > 0 ? firstDir.charAt(0) : '/';
|
59
|
+
const availableForEnd = maxLength - firstChar.length - ellipsis.length - 1; // -1 for '/'
|
60
|
+
if (availableForEnd > 0) {
|
61
|
+
const endPart = filename.length <= availableForEnd
|
62
|
+
? filename
|
63
|
+
: filename.substring(filename.length - availableForEnd);
|
64
|
+
return firstChar + ellipsis + '/' + endPart;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
// Character-based fallback
|
68
|
+
const availableForStart = maxLength - ellipsis.length - filename.length - 1; // -1 for '/'
|
69
|
+
if (availableForStart > 0) {
|
70
|
+
const startPart = text.substring(0, availableForStart);
|
71
|
+
return startPart + ellipsis + '/' + filename;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
// Standard middle truncation for non-path strings
|
76
|
+
const availableSpace = maxLength - ellipsis.length;
|
77
|
+
const startChars = Math.ceil(availableSpace / 2);
|
78
|
+
const endChars = Math.floor(availableSpace / 2);
|
79
|
+
const start = text.substring(0, startChars);
|
80
|
+
const end = text.substring(text.length - endChars);
|
81
|
+
return start + ellipsis + end;
|
82
|
+
}
|
83
|
+
export function truncateStart(text, maxLength) {
|
84
|
+
if (text.length <= maxLength) {
|
85
|
+
return text;
|
86
|
+
}
|
87
|
+
if (maxLength <= 1) {
|
88
|
+
return '.';
|
89
|
+
}
|
90
|
+
if (maxLength <= 3) {
|
91
|
+
return '.'.repeat(maxLength);
|
92
|
+
}
|
93
|
+
const ellipsis = '...';
|
94
|
+
const endChars = maxLength - ellipsis.length;
|
95
|
+
return ellipsis + text.slice(-endChars);
|
96
|
+
}
|
97
|
+
export function truncateEnd(text, maxLength) {
|
98
|
+
if (text.length <= maxLength) {
|
99
|
+
return text;
|
100
|
+
}
|
101
|
+
if (maxLength <= 1) {
|
102
|
+
return '.';
|
103
|
+
}
|
104
|
+
if (maxLength <= 3) {
|
105
|
+
return '.'.repeat(maxLength);
|
106
|
+
}
|
107
|
+
const ellipsis = '...';
|
108
|
+
const keepChars = maxLength - ellipsis.length;
|
109
|
+
return text.substring(0, keepChars) + ellipsis;
|
110
|
+
}
|
111
|
+
//# sourceMappingURL=responsive.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../../../src/ui/utils/responsive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,GAAG;IACb,IAAI,EAAE,GAAG;CACD,CAAC;AAIX,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,KAAK,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,KAAK,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,SAAiB;IAC5D,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,SAAS,IAAI,CAAC,EAAE,CAAC;QACnB,OA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6
|
-
export declare function registerCleanup(fn: () => void): void;
|
7
|
-
export declare function runExitCleanup(): void
|
6
|
+
export declare function registerCleanup(fn: (() => void) | (() => Promise<void>)): void;
|
7
|
+
export declare function runExitCleanup(): Promise<void>;
|
8
8
|
export declare function cleanupCheckpoints(): Promise<void>;
|
@@ -10,10 +10,10 @@ const cleanupFunctions = [];
|
|
10
10
|
export function registerCleanup(fn) {
|
11
11
|
cleanupFunctions.push(fn);
|
12
12
|
}
|
13
|
-
export function runExitCleanup() {
|
13
|
+
export async function runExitCleanup() {
|
14
14
|
for (const fn of cleanupFunctions) {
|
15
15
|
try {
|
16
|
-
fn();
|
16
|
+
await fn();
|
17
17
|
}
|
18
18
|
catch (_) {
|
19
19
|
// Ignore errors during cleanup.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/utils/cleanup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,gBAAgB,
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/utils/cleanup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,gBAAgB,GAAgD,EAAE,CAAC;AAEzE,MAAM,UAAU,eAAe,CAAC,EAAwC;IACtE,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,KAAK,MAAM,EAAE,IAAI,gBAAgB,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,EAAE,EAAE,CAAC;QACb,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,gCAAgC;QAClC,CAAC;IACH,CAAC;IACD,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,kBAAkB;AACjD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,mEAAmE;IACrE,CAAC;AACH,CAAC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import { SettingScope, LoadedSettings } from '../config/settings.js';
|
7
|
+
/**
|
8
|
+
* Shared scope labels for dialog components that need to display setting scopes
|
9
|
+
*/
|
10
|
+
export declare const SCOPE_LABELS: {
|
11
|
+
readonly User: "User Settings";
|
12
|
+
readonly Workspace: "Workspace Settings";
|
13
|
+
readonly System: "System Settings";
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* Helper function to get scope items for radio button selects
|
17
|
+
*/
|
18
|
+
export declare function getScopeItems(): ({
|
19
|
+
label: "User Settings";
|
20
|
+
value: SettingScope;
|
21
|
+
} | {
|
22
|
+
label: "Workspace Settings";
|
23
|
+
value: SettingScope;
|
24
|
+
} | {
|
25
|
+
label: "System Settings";
|
26
|
+
value: SettingScope;
|
27
|
+
})[];
|
28
|
+
/**
|
29
|
+
* Generate scope message for a specific setting
|
30
|
+
*/
|
31
|
+
export declare function getScopeMessageForSetting(settingKey: string, selectedScope: SettingScope, settings: LoadedSettings): string;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import { SettingScope } from '../config/settings.js';
|
7
|
+
import { settingExistsInScope } from './settingsUtils.js';
|
8
|
+
/**
|
9
|
+
* Shared scope labels for dialog components that need to display setting scopes
|
10
|
+
*/
|
11
|
+
export const SCOPE_LABELS = {
|
12
|
+
[SettingScope.User]: 'User Settings',
|
13
|
+
[SettingScope.Workspace]: 'Workspace Settings',
|
14
|
+
[SettingScope.System]: 'System Settings',
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* Helper function to get scope items for radio button selects
|
18
|
+
*/
|
19
|
+
export function getScopeItems() {
|
20
|
+
return [
|
21
|
+
{ label: SCOPE_LABELS[SettingScope.User], value: SettingScope.User },
|
22
|
+
{
|
23
|
+
label: SCOPE_LABELS[SettingScope.Workspace],
|
24
|
+
value: SettingScope.Workspace,
|
25
|
+
},
|
26
|
+
{ label: SCOPE_LABELS[SettingScope.System], value: SettingScope.System },
|
27
|
+
];
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* Generate scope message for a specific setting
|
31
|
+
*/
|
32
|
+
export function getScopeMessageForSetting(settingKey, selectedScope, settings) {
|
33
|
+
const otherScopes = Object.values(SettingScope).filter((scope) => scope !== selectedScope);
|
34
|
+
const modifiedInOtherScopes = otherScopes.filter((scope) => {
|
35
|
+
const scopeSettings = settings.forScope(scope).settings;
|
36
|
+
return settingExistsInScope(settingKey, scopeSettings);
|
37
|
+
});
|
38
|
+
if (modifiedInOtherScopes.length === 0) {
|
39
|
+
return '';
|
40
|
+
}
|
41
|
+
const modifiedScopesStr = modifiedInOtherScopes.join(', ');
|
42
|
+
const currentScopeSettings = settings.forScope(selectedScope).settings;
|
43
|
+
const existsInCurrentScope = settingExistsInScope(settingKey, currentScopeSettings);
|
44
|
+
return existsInCurrentScope
|
45
|
+
? `(Also modified in ${modifiedScopesStr})`
|
46
|
+
: `(Modified in ${modifiedScopesStr})`;
|
47
|
+
}
|
48
|
+
//# sourceMappingURL=dialogScopeUtils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dialogScopeUtils.js","sourceRoot":"","sources":["../../../src/utils/dialogScopeUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,eAAe;IACpC,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,oBAAoB;IAC9C,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,iBAAiB;CAChC,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,EAAE,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE;QACpE;YACE,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC;YAC3C,KAAK,EAAE,YAAY,CAAC,SAAS;SAC9B;QACD,EAAE,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,MAAM,EAAE;KACzE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAAkB,EAClB,aAA2B,EAC3B,QAAwB;IAExB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CACpD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,aAAa,CACnC,CAAC;IAEF,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QACzD,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;QACxD,OAAO,oBAAoB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,oBAAoB,GAAG,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC;IACvE,MAAM,oBAAoB,GAAG,oBAAoB,CAC/C,UAAU,EACV,oBAAoB,CACrB,CAAC;IAEF,OAAO,oBAAoB;QACzB,CAAC,CAAC,qBAAqB,iBAAiB,GAAG;QAC3C,CAAC,CAAC,gBAAgB,iBAAiB,GAAG,CAAC;AAC3C,CAAC"}
|
@@ -7,4 +7,24 @@
|
|
7
7
|
* Checks if a directory is within a git repository hosted on GitHub.
|
8
8
|
* @returns true if the directory is in a git repository with a github.com remote, false otherwise
|
9
9
|
*/
|
10
|
-
export declare
|
10
|
+
export declare const isGitHubRepository: () => boolean;
|
11
|
+
/**
|
12
|
+
* getGitRepoRoot returns the root directory of the git repository.
|
13
|
+
* @returns the path to the root of the git repo.
|
14
|
+
* @throws error if the exec command fails.
|
15
|
+
*/
|
16
|
+
export declare const getGitRepoRoot: () => string;
|
17
|
+
/**
|
18
|
+
* getLatestGitHubRelease returns the release tag as a string.
|
19
|
+
* @returns string of the release tag (e.g. "v1.2.3").
|
20
|
+
*/
|
21
|
+
export declare const getLatestGitHubRelease: (proxy?: string) => Promise<string>;
|
22
|
+
/**
|
23
|
+
* getGitHubRepoInfo returns the owner and repository for a GitHub repo.
|
24
|
+
* @returns the owner and repository of the github repo.
|
25
|
+
* @throws error if the exec command fails.
|
26
|
+
*/
|
27
|
+
export declare function getGitHubRepoInfo(): {
|
28
|
+
owner: string;
|
29
|
+
repo: string;
|
30
|
+
};
|
@@ -4,21 +4,88 @@
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
5
5
|
*/
|
6
6
|
import { execSync } from 'child_process';
|
7
|
+
import { ProxyAgent, setGlobalDispatcher } from 'undici';
|
7
8
|
/**
|
8
9
|
* Checks if a directory is within a git repository hosted on GitHub.
|
9
10
|
* @returns true if the directory is in a git repository with a github.com remote, false otherwise
|
10
11
|
*/
|
11
|
-
export
|
12
|
+
export const isGitHubRepository = () => {
|
12
13
|
try {
|
13
|
-
const remotes = execSync('git remote -v', {
|
14
|
+
const remotes = (execSync('git remote -v', {
|
14
15
|
encoding: 'utf-8',
|
15
|
-
});
|
16
|
+
}) || '').trim();
|
16
17
|
const pattern = /github\.com/;
|
17
18
|
return pattern.test(remotes);
|
18
19
|
}
|
19
20
|
catch (_error) {
|
20
21
|
// If any filesystem error occurs, assume not a git repo
|
22
|
+
console.debug(`Failed to get git remote:`, _error);
|
21
23
|
return false;
|
22
24
|
}
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* getGitRepoRoot returns the root directory of the git repository.
|
28
|
+
* @returns the path to the root of the git repo.
|
29
|
+
* @throws error if the exec command fails.
|
30
|
+
*/
|
31
|
+
export const getGitRepoRoot = () => {
|
32
|
+
const gitRepoRoot = (execSync('git rev-parse --show-toplevel', {
|
33
|
+
encoding: 'utf-8',
|
34
|
+
}) || '').trim();
|
35
|
+
if (!gitRepoRoot) {
|
36
|
+
throw new Error(`Git repo returned empty value`);
|
37
|
+
}
|
38
|
+
return gitRepoRoot;
|
39
|
+
};
|
40
|
+
/**
|
41
|
+
* getLatestGitHubRelease returns the release tag as a string.
|
42
|
+
* @returns string of the release tag (e.g. "v1.2.3").
|
43
|
+
*/
|
44
|
+
export const getLatestGitHubRelease = async (proxy) => {
|
45
|
+
try {
|
46
|
+
const controller = new AbortController();
|
47
|
+
if (proxy) {
|
48
|
+
setGlobalDispatcher(new ProxyAgent(proxy));
|
49
|
+
}
|
50
|
+
const endpoint = `https://api.github.com/repos/acoliver/run-llxprt-code/releases/latest`;
|
51
|
+
const response = await fetch(endpoint, {
|
52
|
+
method: 'GET',
|
53
|
+
headers: {
|
54
|
+
Accept: 'application/vnd.github+json',
|
55
|
+
'Content-Type': 'application/json',
|
56
|
+
'X-GitHub-Api-Version': '2022-11-28',
|
57
|
+
},
|
58
|
+
signal: controller.signal,
|
59
|
+
});
|
60
|
+
if (!response.ok) {
|
61
|
+
throw new Error(`Invalid response code: ${response.status} - ${response.statusText}`);
|
62
|
+
}
|
63
|
+
const releaseTag = (await response.json()).tag_name;
|
64
|
+
if (!releaseTag) {
|
65
|
+
throw new Error(`Response did not include tag_name field`);
|
66
|
+
}
|
67
|
+
return releaseTag;
|
68
|
+
}
|
69
|
+
catch (_error) {
|
70
|
+
console.debug(`Failed to determine latest run-llxprt-code release:`, _error);
|
71
|
+
throw new Error(`Unable to determine the latest run-llxprt-code release on GitHub.`);
|
72
|
+
}
|
73
|
+
};
|
74
|
+
/**
|
75
|
+
* getGitHubRepoInfo returns the owner and repository for a GitHub repo.
|
76
|
+
* @returns the owner and repository of the github repo.
|
77
|
+
* @throws error if the exec command fails.
|
78
|
+
*/
|
79
|
+
export function getGitHubRepoInfo() {
|
80
|
+
const remoteUrl = execSync('git remote get-url origin', {
|
81
|
+
encoding: 'utf-8',
|
82
|
+
}).trim();
|
83
|
+
// Matches either https://github.com/owner/repo.git or git@github.com:owner/repo.git
|
84
|
+
const match = remoteUrl.match(/(?:https?:\/\/|git@)github\.com(?::|\/)([^/]+)\/([^/]+?)(?:\.git)?$/);
|
85
|
+
// If the regex fails match, throw an error.
|
86
|
+
if (!match || !match[1] || !match[2]) {
|
87
|
+
throw new Error(`Owner & repo could not be extracted from remote URL: ${remoteUrl}`);
|
88
|
+
}
|
89
|
+
return { owner: match[1], repo: match[2] };
|
23
90
|
}
|
24
91
|
//# sourceMappingURL=gitUtils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gitUtils.js","sourceRoot":"","sources":["../../../src/utils/gitUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"gitUtils.js","sourceRoot":"","sources":["../../../src/utils/gitUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAY,EAAE;IAC9C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,CACd,QAAQ,CAAC,eAAe,EAAE;YACxB,QAAQ,EAAE,OAAO;SAClB,CAAC,IAAI,EAAE,CACT,CAAC,IAAI,EAAE,CAAC;QAET,MAAM,OAAO,GAAG,aAAa,CAAC;QAE9B,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,wDAAwD;QACxD,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAW,EAAE;IACzC,MAAM,WAAW,GAAG,CAClB,QAAQ,CAAC,+BAA+B,EAAE;QACxC,QAAQ,EAAE,OAAO;KAClB,CAAC,IAAI,EAAE,CACT,CAAC,IAAI,EAAE,CAAC;IAET,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,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,CAAC,CAAC,IAAI,EAAE,CAAC;IAEV,oFAAoF;IACpF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAC3B,qEAAqE,CACtE,CAAC;IAEF,4CAA4C;IAC5C,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,wDAAwD,SAAS,EAAE,CACpE,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7C,CAAC"}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Vybestack LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import { IMessage, ITool } from '@vybestack/llxprt-code-core';
|
7
|
+
export interface RedactionPattern {
|
8
|
+
name: string;
|
9
|
+
pattern: RegExp;
|
10
|
+
replacement: string;
|
11
|
+
enabled: boolean;
|
12
|
+
}
|
13
|
+
export interface RedactionConfig {
|
14
|
+
redactApiKeys: boolean;
|
15
|
+
redactCredentials: boolean;
|
16
|
+
redactFilePaths: boolean;
|
17
|
+
redactUrls: boolean;
|
18
|
+
redactEmails: boolean;
|
19
|
+
redactPersonalInfo: boolean;
|
20
|
+
customPatterns?: RedactionPattern[];
|
21
|
+
}
|
22
|
+
export declare class ConversationDataRedactor {
|
23
|
+
private redactionConfig;
|
24
|
+
private redactionPatterns;
|
25
|
+
constructor(config?: Partial<RedactionConfig>);
|
26
|
+
/**
|
27
|
+
* Redact sensitive data from a conversation message
|
28
|
+
*/
|
29
|
+
redactMessage(message: IMessage, providerName: string): IMessage;
|
30
|
+
/**
|
31
|
+
* Redact sensitive data from tool definitions
|
32
|
+
*/
|
33
|
+
redactToolCall(tool: ITool): ITool;
|
34
|
+
/**
|
35
|
+
* Redact sensitive data from response content
|
36
|
+
*/
|
37
|
+
redactResponseContent(content: string, providerName: string): string;
|
38
|
+
/**
|
39
|
+
* Redact entire conversation consistently
|
40
|
+
*/
|
41
|
+
redactConversation(messages: IMessage[], providerName: string): IMessage[];
|
42
|
+
/**
|
43
|
+
* Redact API keys from content based on provider
|
44
|
+
*/
|
45
|
+
redactApiKeys(content: string, providerName: string): string;
|
46
|
+
/**
|
47
|
+
* Redact sensitive file paths
|
48
|
+
*/
|
49
|
+
redactSensitivePaths(content: string): string;
|
50
|
+
/**
|
51
|
+
* Redact personal identifiable information
|
52
|
+
*/
|
53
|
+
redactPersonalInfo(content: string): string;
|
54
|
+
private shouldRedact;
|
55
|
+
private redactContent;
|
56
|
+
private redactContentPart;
|
57
|
+
private redactToolParameters;
|
58
|
+
private redactFilePath;
|
59
|
+
private redactShellCommand;
|
60
|
+
private redactUrl;
|
61
|
+
private initializeRedactionPatterns;
|
62
|
+
private isPatternEnabled;
|
63
|
+
/**
|
64
|
+
* Update redaction configuration
|
65
|
+
*/
|
66
|
+
updateConfig(config: Partial<RedactionConfig>): void;
|
67
|
+
/**
|
68
|
+
* Get current redaction statistics
|
69
|
+
*/
|
70
|
+
getRedactionStats(content: string, providerName: string): RedactionStats;
|
71
|
+
}
|
72
|
+
export interface RedactionStats {
|
73
|
+
totalRedactions: number;
|
74
|
+
redactionsByType: Record<string, number>;
|
75
|
+
}
|