@vybestack/llxprt-code 0.1.18-nightly.250808.f9b79d74 → 0.1.18-nightly.250812.12fa8ad2
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 +49 -2
- package/dist/package.json +5 -3
- package/dist/src/auth/anthropic-oauth-provider.d.ts +33 -0
- package/dist/src/auth/anthropic-oauth-provider.js +129 -0
- package/dist/src/auth/anthropic-oauth-provider.js.map +1 -0
- 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 +109 -0
- package/dist/src/auth/oauth-manager.js +334 -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/config/auth.js +11 -0
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.js +93 -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 -59
- package/dist/src/config/settings.js +17 -1
- 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.d.ts +2 -0
- package/dist/src/providers/providerManagerInstance.js +49 -5
- 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 +156 -35
- package/dist/src/ui/App.js.map +1 -1
- 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 +145 -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 +94 -10
- 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/keyCommand.js +32 -2
- package/dist/src/ui/commands/keyCommand.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/modelCommand.js +21 -3
- package/dist/src/ui/commands/modelCommand.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/providerCommand.js +52 -14
- package/dist/src/ui/commands/providerCommand.js.map +1 -1
- package/dist/src/ui/commands/setCommand.js +17 -1
- 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 +21 -2
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/toolformatCommand.js +79 -23
- package/dist/src/ui/commands/toolformatCommand.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 +15 -54
- 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/OAuthCodeDialog.d.ts +13 -0
- package/dist/src/ui/components/OAuthCodeDialog.js +54 -0
- package/dist/src/ui/components/OAuthCodeDialog.js.map +1 -0
- 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.js +93 -18
- package/dist/src/ui/components/TodoPanel.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +85 -7
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- 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/hooks/atCommandProcessor.js +21 -0
- 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.js +1 -1
- package/dist/src/ui/hooks/useAuthCommand.js +48 -2
- 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 +35 -10
- package/dist/src/ui/hooks/useGeminiStream.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/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/reducers/appReducer.d.ts +3 -2
- package/dist/src/ui/reducers/appReducer.js +1 -0
- package/dist/src/ui/reducers/appReducer.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/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/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 +9 -0
- package/dist/src/utils/gitUtils.js +17 -0
- 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 +10 -0
- 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 +5 -3
- 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
@@ -7,8 +7,13 @@ import { ProviderManager, OpenAIProvider, AnthropicProvider, GeminiProvider, san
|
|
7
7
|
import { NodeFileSystem } from './IFileSystem.js';
|
8
8
|
import { homedir } from 'os';
|
9
9
|
import { join } from 'path';
|
10
|
-
import { USER_SETTINGS_PATH } from '../config/settings.js';
|
10
|
+
import { LoadedSettings, USER_SETTINGS_PATH, } from '../config/settings.js';
|
11
11
|
import stripJsonComments from 'strip-json-comments';
|
12
|
+
import { OAuthManager } from '../auth/oauth-manager.js';
|
13
|
+
import { MultiProviderTokenStore } from '../auth/types.js';
|
14
|
+
import { GeminiOAuthProvider } from '../auth/gemini-oauth-provider.js';
|
15
|
+
import { QwenOAuthProvider } from '../auth/qwen-oauth-provider.js';
|
16
|
+
import { AnthropicOAuthProvider } from '../auth/anthropic-oauth-provider.js';
|
12
17
|
/**
|
13
18
|
* Sanitizes API keys to remove problematic characters that cause ByteString errors.
|
14
19
|
* This handles cases where API key files have encoding issues or contain
|
@@ -24,6 +29,7 @@ function sanitizeApiKey(key) {
|
|
24
29
|
}
|
25
30
|
let providerManagerInstance = null;
|
26
31
|
let fileSystemInstance = null;
|
32
|
+
let oauthManagerInstance = null;
|
27
33
|
/**
|
28
34
|
* Set a custom file system implementation (mainly for testing).
|
29
35
|
*/
|
@@ -54,8 +60,27 @@ export function getProviderManager(config, allowBrowserEnvironment = false) {
|
|
54
60
|
catch (_error) {
|
55
61
|
// Failed to load user settings, that's OK
|
56
62
|
}
|
57
|
-
//
|
58
|
-
const
|
63
|
+
// Create OAuth manager for providers
|
64
|
+
const tokenStore = new MultiProviderTokenStore();
|
65
|
+
// Create LoadedSettings from user settings for OAuth manager
|
66
|
+
const loadedSettings = userSettings
|
67
|
+
? new LoadedSettings({ path: '', settings: {} }, // system
|
68
|
+
{ path: USER_SETTINGS_PATH, settings: userSettings }, // user
|
69
|
+
{ path: '', settings: {} }, // workspace
|
70
|
+
[])
|
71
|
+
: undefined;
|
72
|
+
const oauthManager = new OAuthManager(tokenStore, loadedSettings);
|
73
|
+
oauthManagerInstance = oauthManager;
|
74
|
+
// Register OAuth providers
|
75
|
+
oauthManager.registerProvider(new GeminiOAuthProvider());
|
76
|
+
oauthManager.registerProvider(new QwenOAuthProvider());
|
77
|
+
oauthManager.registerProvider(new AnthropicOAuthProvider());
|
78
|
+
// Set config BEFORE registering providers so logging wrapper works
|
79
|
+
if (config) {
|
80
|
+
providerManagerInstance.setConfig(config);
|
81
|
+
}
|
82
|
+
// Always register GeminiProvider with OAuth manager
|
83
|
+
const geminiProvider = new GeminiProvider(undefined, undefined, config, oauthManager);
|
59
84
|
if (config) {
|
60
85
|
geminiProvider.setConfig(config);
|
61
86
|
}
|
@@ -109,8 +134,22 @@ export function getProviderManager(config, allowBrowserEnvironment = false) {
|
|
109
134
|
? () => config.getEphemeralSettings()
|
110
135
|
: undefined,
|
111
136
|
};
|
112
|
-
const openaiProvider = new OpenAIProvider(openaiApiKey ||
|
137
|
+
const openaiProvider = new OpenAIProvider(openaiApiKey || undefined, // Pass undefined, not empty string, to allow OAuth fallback
|
138
|
+
openaiBaseUrl, openaiProviderConfig, oauthManager);
|
113
139
|
providerManagerInstance.registerProvider(openaiProvider);
|
140
|
+
// Register qwen as an alias to OpenAI provider with OAuth
|
141
|
+
// When user selects "--provider qwen", we create a separate OpenAI instance for Qwen
|
142
|
+
const qwenProvider = new OpenAIProvider(undefined, // No API key - force OAuth
|
143
|
+
undefined, // No base URL - will be set from OAuth token's resource_url
|
144
|
+
openaiProviderConfig, oauthManager);
|
145
|
+
// Override the name to 'qwen' so it can be selected
|
146
|
+
Object.defineProperty(qwenProvider, 'name', {
|
147
|
+
value: 'qwen',
|
148
|
+
writable: false,
|
149
|
+
enumerable: true,
|
150
|
+
configurable: true,
|
151
|
+
});
|
152
|
+
providerManagerInstance.registerProvider(qwenProvider);
|
114
153
|
// Always register Anthropic provider
|
115
154
|
// Priority: Environment variable > keyfile (skip keyfile in test)
|
116
155
|
let anthropicApiKey;
|
@@ -134,7 +173,8 @@ export function getProviderManager(config, allowBrowserEnvironment = false) {
|
|
134
173
|
const anthropicProviderConfig = {
|
135
174
|
allowBrowserEnvironment,
|
136
175
|
};
|
137
|
-
const anthropicProvider = new AnthropicProvider(anthropicApiKey ||
|
176
|
+
const anthropicProvider = new AnthropicProvider(anthropicApiKey || undefined, // Pass undefined instead of empty string to allow OAuth fallback
|
177
|
+
anthropicBaseUrl, anthropicProviderConfig, oauthManager);
|
138
178
|
providerManagerInstance.registerProvider(anthropicProvider);
|
139
179
|
// Set default provider to gemini
|
140
180
|
providerManagerInstance.setActiveProvider('gemini');
|
@@ -144,6 +184,10 @@ export function getProviderManager(config, allowBrowserEnvironment = false) {
|
|
144
184
|
export function resetProviderManager() {
|
145
185
|
providerManagerInstance = null;
|
146
186
|
fileSystemInstance = null;
|
187
|
+
oauthManagerInstance = null;
|
188
|
+
}
|
189
|
+
export function getOAuthManager() {
|
190
|
+
return oauthManagerInstance;
|
147
191
|
}
|
148
192
|
export { getProviderManager as providerManager };
|
149
193
|
//# sourceMappingURL=providerManagerInstance.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"providerManagerInstance.js","sourceRoot":"","sources":["../../../src/providers/providerManagerInstance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAe,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,
|
1
|
+
{"version":3,"file":"providerManagerInstance.js","sourceRoot":"","sources":["../../../src/providers/providerManagerInstance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAe,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAEL,cAAc,EACd,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E;;;;GAIG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,MAAM,SAAS,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;IAE7C,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,IAAI,CACV,yFAAyF;YACvF,wEAAwE,CAC3E,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,IAAI,uBAAuB,GAA2B,IAAI,CAAC;AA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GAAG,CAAC,kBAAkB,CAAC;QACxD,4CAA4C;QAC5C,MAAM,uBAAuB,GAAG;YAC9B,uBAAuB;SACxB,CAAC;QACF,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAC7C,eAAe,IAAI,SAAS,EAAE,iEAAiE;QAC/F,gBAAgB,EAChB,uBAAuB,EACvB,YAAY,CACb,CAAC;QACF,uBAAuB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;QAE5D,iCAAiC;QACjC,uBAAuB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,uBAAuB,GAAG,IAAI,CAAC;IAC/B,kBAAkB,GAAG,IAAI,CAAC;IAC1B,oBAAoB,GAAG,IAAI,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,OAAO,EAAE,kBAAkB,IAAI,eAAe,EAAE,CAAC"}
|
@@ -20,11 +20,13 @@ import { initCommand } from '../ui/commands/initCommand.js';
|
|
20
20
|
import { mcpCommand } from '../ui/commands/mcpCommand.js';
|
21
21
|
import { memoryCommand } from '../ui/commands/memoryCommand.js';
|
22
22
|
import { privacyCommand } from '../ui/commands/privacyCommand.js';
|
23
|
+
import { loggingCommand } from '../ui/commands/loggingCommand.js';
|
23
24
|
import { quitCommand } from '../ui/commands/quitCommand.js';
|
24
25
|
import { restoreCommand } from '../ui/commands/restoreCommand.js';
|
25
26
|
import { statsCommand } from '../ui/commands/statsCommand.js';
|
26
27
|
import { themeCommand } from '../ui/commands/themeCommand.js';
|
27
28
|
import { toolsCommand } from '../ui/commands/toolsCommand.js';
|
29
|
+
import { settingsCommand } from '../ui/commands/settingsCommand.js';
|
28
30
|
import { vimCommand } from '../ui/commands/vimCommand.js';
|
29
31
|
import { providerCommand } from '../ui/commands/providerCommand.js';
|
30
32
|
import { modelCommand } from '../ui/commands/modelCommand.js';
|
@@ -71,11 +73,13 @@ export class BuiltinCommandLoader {
|
|
71
73
|
mcpCommand,
|
72
74
|
memoryCommand,
|
73
75
|
privacyCommand,
|
76
|
+
loggingCommand,
|
74
77
|
quitCommand,
|
75
78
|
restoreCommand(this.config),
|
76
79
|
statsCommand,
|
77
80
|
themeCommand,
|
78
81
|
toolsCommand,
|
82
|
+
settingsCommand,
|
79
83
|
vimCommand,
|
80
84
|
providerCommand,
|
81
85
|
modelCommand,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BuiltinCommandLoader.js","sourceRoot":"","sources":["../../../src/services/BuiltinCommandLoader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO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AG,CAAC;IAE7C;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,CAAC,OAAoB;QACrC,MAAM,cAAc,GAA+B;YACjD,YAAY;YACZ,WAAW;YACX,UAAU;YACV,WAAW;YACX,YAAY;YACZ,eAAe;YACf,WAAW;YACX,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,iBAAiB;YACjB,WAAW;YACX,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;YACvB,WAAW;YACX,UAAU;YACV,aAAa;YACb,cAAc;YACd,cAAc;YACd,WAAW;YACX,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC;YAC3B,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,UAAU;YACV,eAAe;YACf,YAAY;YACZ,UAAU;YACV,cAAc;YACd,cAAc;YACd,iBAAiB;YACjB,UAAU;YACV,cAAc;YACd,kBAAkB;YAClB,kBAAkB;SACnB,CAAC;QAEF,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAuB,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;IAC3E,CAAC;CACF"}
|
@@ -0,0 +1,172 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Vybestack LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import { Config } from '@vybestack/llxprt-code-core';
|
7
|
+
import type { Todo } from '@vybestack/llxprt-code-core';
|
8
|
+
/**
|
9
|
+
* Configuration for generating continuation prompts
|
10
|
+
*/
|
11
|
+
export interface ContinuationPromptConfig {
|
12
|
+
readonly taskDescription: string;
|
13
|
+
readonly isYoloMode: boolean;
|
14
|
+
readonly attemptCount?: number;
|
15
|
+
readonly previousFailure?: string;
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* Context information for evaluating continuation conditions
|
19
|
+
*/
|
20
|
+
export interface ContinuationContext {
|
21
|
+
readonly todos: readonly Todo[];
|
22
|
+
readonly hadToolCalls: boolean;
|
23
|
+
readonly isResponding: boolean;
|
24
|
+
readonly config: Config;
|
25
|
+
readonly currentState: ContinuationState;
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Result of evaluating continuation conditions
|
29
|
+
*/
|
30
|
+
export interface ContinuationEvaluation {
|
31
|
+
readonly shouldContinue: boolean;
|
32
|
+
readonly reason: string;
|
33
|
+
readonly activeTodo?: Todo;
|
34
|
+
readonly conditions: ConditionSet;
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* State tracking for continuation attempts
|
38
|
+
*/
|
39
|
+
export interface ContinuationState {
|
40
|
+
isActive: boolean;
|
41
|
+
attemptCount: number;
|
42
|
+
taskDescription?: string;
|
43
|
+
lastPromptTime?: Date;
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* Set of conditions evaluated for continuation
|
47
|
+
*/
|
48
|
+
export interface ConditionSet {
|
49
|
+
readonly hasActiveTodos: boolean;
|
50
|
+
readonly noToolCallsMade: boolean;
|
51
|
+
readonly continuationEnabled: boolean;
|
52
|
+
readonly notCurrentlyContinuing: boolean;
|
53
|
+
readonly withinAttemptLimits: boolean;
|
54
|
+
readonly withinTimeConstraints: boolean;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Template structure for continuation prompts
|
58
|
+
*/
|
59
|
+
export interface ContinuationPromptTemplates {
|
60
|
+
readonly standard: {
|
61
|
+
readonly base: string;
|
62
|
+
readonly retry: string;
|
63
|
+
};
|
64
|
+
readonly yolo: {
|
65
|
+
readonly base: string;
|
66
|
+
readonly retry: string;
|
67
|
+
readonly urgent: string;
|
68
|
+
};
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Service responsible for generating continuation prompts and managing continuation logic
|
72
|
+
*/
|
73
|
+
export declare class TodoContinuationService {
|
74
|
+
private static readonly MAX_CONTINUATION_ATTEMPTS;
|
75
|
+
private static readonly MIN_CONTINUATION_INTERVAL_MS;
|
76
|
+
private static readonly CONTINUATION_TIMEOUT_MS;
|
77
|
+
private static readonly MAX_TASK_DESCRIPTION_LENGTH;
|
78
|
+
/**
|
79
|
+
* Generates a continuation prompt based on the provided configuration
|
80
|
+
* @param config Configuration for prompt generation
|
81
|
+
* @returns Formatted continuation prompt string
|
82
|
+
*/
|
83
|
+
generateContinuationPrompt(config: ContinuationPromptConfig): string;
|
84
|
+
/**
|
85
|
+
* Evaluates whether continuation should occur based on current conditions
|
86
|
+
* @param context Current continuation context
|
87
|
+
* @returns Evaluation result with decision and reasoning
|
88
|
+
*/
|
89
|
+
checkContinuationConditions(context: ContinuationContext): ContinuationEvaluation;
|
90
|
+
/**
|
91
|
+
* Formats a todo item's content into a task description
|
92
|
+
* @param todo Todo item to format
|
93
|
+
* @returns Formatted task description string
|
94
|
+
*/
|
95
|
+
formatTaskDescription(todo: Todo): string;
|
96
|
+
/**
|
97
|
+
* Checks if continuation should be allowed based on configuration and state
|
98
|
+
* @param config Application configuration
|
99
|
+
* @param state Current continuation state
|
100
|
+
* @returns Whether continuation is allowed
|
101
|
+
*/
|
102
|
+
shouldAllowContinuation(config: Config, state: ContinuationState): boolean;
|
103
|
+
/**
|
104
|
+
* Creates a new, empty continuation state
|
105
|
+
* @returns Initial continuation state
|
106
|
+
*/
|
107
|
+
createContinuationState(): ContinuationState;
|
108
|
+
/**
|
109
|
+
* Checks whether continuation should occur based on settings, todos, and tool calls
|
110
|
+
* @param settings Application settings/config
|
111
|
+
* @param hasActiveTodos Whether there are active todos
|
112
|
+
* @param hasToolCalls Whether tool calls were made
|
113
|
+
* @returns Whether continuation should proceed
|
114
|
+
*/
|
115
|
+
shouldContinue(settings: Config, hasActiveTodos: boolean, hasToolCalls: boolean): boolean;
|
116
|
+
/**
|
117
|
+
* Formats a prompt for task description and YOLO mode
|
118
|
+
* @param taskDescription Description of the task to continue
|
119
|
+
* @param isYoloMode Whether YOLO mode is enabled
|
120
|
+
* @returns Formatted prompt string
|
121
|
+
*/
|
122
|
+
formatPrompt(taskDescription: string, isYoloMode: boolean): string;
|
123
|
+
/**
|
124
|
+
* Private method to truncate task descriptions to acceptable length
|
125
|
+
* @param description Task description to truncate
|
126
|
+
* @returns Truncated description
|
127
|
+
*/
|
128
|
+
private truncateTaskDescription;
|
129
|
+
/**
|
130
|
+
* Private method to generate standard continuation prompt
|
131
|
+
* @param taskDescription Task description
|
132
|
+
* @param attemptCount Optional attempt count
|
133
|
+
* @returns Standard prompt string
|
134
|
+
*/
|
135
|
+
private generateStandardPrompt;
|
136
|
+
/**
|
137
|
+
* Private method to generate YOLO mode continuation prompt
|
138
|
+
* @param taskDescription Task description
|
139
|
+
* @param attemptCount Optional attempt count
|
140
|
+
* @returns YOLO mode prompt string
|
141
|
+
*/
|
142
|
+
private generateYoloModePrompt;
|
143
|
+
/**
|
144
|
+
* Private method to evaluate all continuation conditions
|
145
|
+
* @param context Continuation context
|
146
|
+
* @returns Evaluated condition set
|
147
|
+
*/
|
148
|
+
private evaluateAllConditions;
|
149
|
+
/**
|
150
|
+
* Private method to check if there are any active todos
|
151
|
+
* @param todos Array of todos to check
|
152
|
+
* @returns Whether active todos exist
|
153
|
+
*/
|
154
|
+
private hasAnyActiveTodos;
|
155
|
+
/**
|
156
|
+
* Private method to find the best active todo to continue
|
157
|
+
* @param todos Array of todos to search
|
158
|
+
* @returns Best active todo or undefined
|
159
|
+
*/
|
160
|
+
private findBestActiveTodo;
|
161
|
+
/**
|
162
|
+
* Private method to check time constraints for continuation
|
163
|
+
* @param lastPromptTime Time of last continuation prompt
|
164
|
+
* @returns Whether time constraints are satisfied
|
165
|
+
*/
|
166
|
+
private checkTimeConstraints;
|
167
|
+
}
|
168
|
+
/**
|
169
|
+
* Factory function to create a new TodoContinuationService instance
|
170
|
+
* @returns New service instance
|
171
|
+
*/
|
172
|
+
export declare function createTodoContinuationService(): TodoContinuationService;
|