@vybestack/llxprt-code 0.1.18 → 0.1.19-beta
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/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 +5 -0
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.js +80 -37
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +64 -0
- package/dist/src/config/keyBindings.js +137 -0
- package/dist/src/config/keyBindings.js.map +1 -0
- package/dist/src/config/settings.d.ts +7 -1
- package/dist/src/config/settings.js +20 -4
- package/dist/src/config/settings.js.map +1 -1
- 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 +7 -0
- package/dist/src/providers/providerManagerInstance.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +2 -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 +111 -35
- 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/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/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/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/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.d.ts +0 -1
- 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.js +32 -28
- 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/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 +5 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +137 -112
- 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/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/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/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/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,137 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Vybestack LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
export class GitStatsTracker {
|
7
|
+
config;
|
8
|
+
enabled;
|
9
|
+
sessionStats;
|
10
|
+
constructor(config) {
|
11
|
+
this.config = config;
|
12
|
+
// Handle invalid config gracefully
|
13
|
+
try {
|
14
|
+
this.enabled = this.config?.getConversationLoggingEnabled?.() ?? false;
|
15
|
+
}
|
16
|
+
catch (_error) {
|
17
|
+
this.enabled = false;
|
18
|
+
}
|
19
|
+
this.sessionStats = {
|
20
|
+
filesChanged: new Set(),
|
21
|
+
totalLinesAdded: 0,
|
22
|
+
totalLinesRemoved: 0,
|
23
|
+
};
|
24
|
+
}
|
25
|
+
async trackFileEdit(filePath, oldContent, newContent) {
|
26
|
+
// Check current config state for each call (runtime toggle support)
|
27
|
+
if (!this.isEnabled()) {
|
28
|
+
return null;
|
29
|
+
}
|
30
|
+
// Handle null/undefined content gracefully
|
31
|
+
if (oldContent === null || oldContent === undefined) {
|
32
|
+
oldContent = '';
|
33
|
+
}
|
34
|
+
if (newContent === null || newContent === undefined) {
|
35
|
+
newContent = '';
|
36
|
+
}
|
37
|
+
// Handle invalid file paths gracefully
|
38
|
+
if (!filePath || typeof filePath !== 'string') {
|
39
|
+
return null;
|
40
|
+
}
|
41
|
+
// Calculate diff statistics
|
42
|
+
const stats = this.calculateStats(oldContent, newContent);
|
43
|
+
// Update session stats
|
44
|
+
this.sessionStats.filesChanged.add(filePath);
|
45
|
+
this.sessionStats.totalLinesAdded += stats.linesAdded;
|
46
|
+
this.sessionStats.totalLinesRemoved += stats.linesRemoved;
|
47
|
+
// Return stats for logging
|
48
|
+
return {
|
49
|
+
...stats,
|
50
|
+
filesChanged: this.sessionStats.filesChanged.size,
|
51
|
+
};
|
52
|
+
}
|
53
|
+
calculateStats(oldContent, newContent) {
|
54
|
+
// Handle empty content explicitly
|
55
|
+
if (oldContent === '' && newContent === '') {
|
56
|
+
return { linesAdded: 0, linesRemoved: 0 };
|
57
|
+
}
|
58
|
+
// Split content into lines, treating empty string as no lines
|
59
|
+
const oldLines = oldContent === '' ? [] : oldContent.split('\n');
|
60
|
+
const newLines = newContent === '' ? [] : newContent.split('\n');
|
61
|
+
// If same content, no changes
|
62
|
+
if (oldContent === newContent) {
|
63
|
+
return { linesAdded: 0, linesRemoved: 0 };
|
64
|
+
}
|
65
|
+
// Count changes line by line and calculate adds/removes
|
66
|
+
let added = 0;
|
67
|
+
let removed = 0;
|
68
|
+
// Find common lines and differences
|
69
|
+
const _maxLength = Math.max(oldLines.length, newLines.length);
|
70
|
+
const minLength = Math.min(oldLines.length, newLines.length);
|
71
|
+
// Count changed lines in the common range
|
72
|
+
for (let i = 0; i < minLength; i++) {
|
73
|
+
if (oldLines[i] !== newLines[i]) {
|
74
|
+
// Line changed - count as both add and remove
|
75
|
+
added++;
|
76
|
+
removed++;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
// Add extra lines (if new is longer)
|
80
|
+
if (newLines.length > oldLines.length) {
|
81
|
+
added += newLines.length - oldLines.length;
|
82
|
+
}
|
83
|
+
// Remove missing lines (if old is longer)
|
84
|
+
if (oldLines.length > newLines.length) {
|
85
|
+
removed += oldLines.length - newLines.length;
|
86
|
+
}
|
87
|
+
return {
|
88
|
+
linesAdded: added,
|
89
|
+
linesRemoved: removed,
|
90
|
+
};
|
91
|
+
}
|
92
|
+
isEnabled() {
|
93
|
+
// Update enabled state based on current config
|
94
|
+
try {
|
95
|
+
this.enabled = this.config?.getConversationLoggingEnabled?.() ?? false;
|
96
|
+
}
|
97
|
+
catch (_error) {
|
98
|
+
this.enabled = false;
|
99
|
+
}
|
100
|
+
return this.enabled;
|
101
|
+
}
|
102
|
+
hasComplexSettings() {
|
103
|
+
// This tracker intentionally has no complex settings - simple on/off only
|
104
|
+
return false;
|
105
|
+
}
|
106
|
+
getLogEntry() {
|
107
|
+
if (!this.isEnabled()) {
|
108
|
+
return null;
|
109
|
+
}
|
110
|
+
// Return the current session stats as a log entry
|
111
|
+
return {
|
112
|
+
type: 'git_stats',
|
113
|
+
stats: {
|
114
|
+
linesAdded: this.sessionStats.totalLinesAdded,
|
115
|
+
linesRemoved: this.sessionStats.totalLinesRemoved,
|
116
|
+
filesChanged: this.sessionStats.filesChanged.size,
|
117
|
+
},
|
118
|
+
timestamp: new Date().toISOString(),
|
119
|
+
};
|
120
|
+
}
|
121
|
+
getSummary() {
|
122
|
+
let sessionId = '';
|
123
|
+
try {
|
124
|
+
sessionId = this.config?.getSessionId?.() ?? '';
|
125
|
+
}
|
126
|
+
catch (_error) {
|
127
|
+
sessionId = '';
|
128
|
+
}
|
129
|
+
return {
|
130
|
+
filesChanged: this.sessionStats.filesChanged.size,
|
131
|
+
totalLinesAdded: this.sessionStats.totalLinesAdded,
|
132
|
+
totalLinesRemoved: this.sessionStats.totalLinesRemoved,
|
133
|
+
sessionId,
|
134
|
+
};
|
135
|
+
}
|
136
|
+
}
|
137
|
+
//# sourceMappingURL=git-stats.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"git-stats.js","sourceRoot":"","sources":["../../../../src/providers/logging/git-stats.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkCH,MAAM,OAAO,eAAe;IAIN;IAHZ,OAAO,CAAU;IACjB,YAAY,CAAe;IAEnC,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAChC,mCAAmC;QACnC,IAAI,CAAC;YACH,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,6BAA6B,EAAE,EAAE,IAAI,KAAK,CAAC;QACzE,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC;QAED,IAAI,CAAC,YAAY,GAAG;YAClB,YAAY,EAAE,IAAI,GAAG,EAAU;YAC/B,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,CAAC;SACrB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CACj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AAiB;YACtD,SAAS;SACV,CAAC;IACJ,CAAC;CACF"}
|
@@ -54,6 +54,10 @@ export function getProviderManager(config, allowBrowserEnvironment = false) {
|
|
54
54
|
catch (_error) {
|
55
55
|
// Failed to load user settings, that's OK
|
56
56
|
}
|
57
|
+
// Set config BEFORE registering providers so logging wrapper works
|
58
|
+
if (config) {
|
59
|
+
providerManagerInstance.setConfig(config);
|
60
|
+
}
|
57
61
|
// Always register GeminiProvider
|
58
62
|
const geminiProvider = new GeminiProvider(undefined, undefined, config);
|
59
63
|
if (config) {
|
@@ -105,6 +109,9 @@ export function getProviderManager(config, allowBrowserEnvironment = false) {
|
|
105
109
|
providerToolFormatOverrides: userSettings?.providerToolFormatOverrides,
|
106
110
|
openaiResponsesEnabled: userSettings?.openaiResponsesEnabled,
|
107
111
|
allowBrowserEnvironment,
|
112
|
+
getEphemeralSettings: config
|
113
|
+
? () => config.getEphemeralSettings()
|
114
|
+
: undefined,
|
108
115
|
};
|
109
116
|
const openaiProvider = new OpenAIProvider(openaiApiKey || '', openaiBaseUrl, openaiProviderConfig);
|
110
117
|
providerManagerInstance.registerProvider(openaiProvider);
|
@@ -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,EAAY,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD;;;;GAIG;AACH,SAAS,cAAc,CAAC,GAA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C,GAAG,CAAC,eAAe,CAAC;QAClD,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,sDAAsD,EAAE;gBAClE,SAAS,EAAE,CAAC,CAAC,YAAY;gBACzB,OAAO,EAAE,aAAa,IAAI,SAAS;aACpC,CAAC,CAAC;QACL,CAAC;QACD,4CAA4C;QAC5C,MAAM,oBAAoB,GAAG;YAC3B,yBAAyB,EAAE,YAAY,EAAE,yBAAyB;YAClE,kBAAkB,EAAE,YAAY,EAAE,kBAAkB;YACpD,2BAA2B,EAAE,YAAY,EAAE,2BAA2B;YACtE,sBAAsB,EAAE,YAAY,EAAE,sBAAsB;YAC5D,uBAAuB;
|
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,EAAY,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD;;;;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,uB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CAA4C;YAC9C,CAAC;QACH,CAAC;QAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;QACxD,4CAA4C;QAC5C,MAAM,uBAAuB,GAAG;YAC9B,uBAAuB;SACxB,CAAC;QACF,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAC7C,eAAe,IAAI,EAAE,EACrB,gBAAgB,EAChB,uBAAuB,CACxB,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;AAC5B,CAAC;AAED,OAAO,EAAE,kBAAkB,IAAI,eAAe,EAAE,CAAC"}
|
@@ -20,6 +20,7 @@ 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';
|
@@ -71,6 +72,7 @@ export class BuiltinCommandLoader {
|
|
71
72
|
mcpCommand,
|
72
73
|
memoryCommand,
|
73
74
|
privacyCommand,
|
75
|
+
loggingCommand,
|
74
76
|
quitCommand,
|
75
77
|
restoreCommand(this.config),
|
76
78
|
statsCommand,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BuiltinCommandLoader.js","sourceRoot":"","sources":["../../../src/services/BuiltinCommandLoader.ts"],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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;
|