@vybestack/llxprt-code-core 0.1.14 → 0.1.15

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.
Files changed (206) hide show
  1. package/README.md +53 -0
  2. package/dist/src/code_assist/oauth2.test.d.ts +1 -1
  3. package/dist/src/code_assist/oauth2.test.js +15 -15
  4. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  5. package/dist/src/config/config.d.ts +15 -1
  6. package/dist/src/config/config.js +27 -5
  7. package/dist/src/config/config.js.map +1 -1
  8. package/dist/src/config/config.test.js +5 -0
  9. package/dist/src/config/config.test.js.map +1 -1
  10. package/dist/src/config/flashFallback.test.js +12 -46
  11. package/dist/src/config/flashFallback.test.js.map +1 -1
  12. package/dist/src/config/models.d.ts +1 -0
  13. package/dist/src/config/models.js +1 -0
  14. package/dist/src/config/models.js.map +1 -1
  15. package/dist/src/core/client.d.ts +4 -0
  16. package/dist/src/core/client.js +75 -15
  17. package/dist/src/core/client.js.map +1 -1
  18. package/dist/src/core/client.test.d.ts +1 -1
  19. package/dist/src/core/client.test.js +204 -22
  20. package/dist/src/core/client.test.js.map +1 -1
  21. package/dist/src/core/contentGenerator.js +2 -7
  22. package/dist/src/core/contentGenerator.js.map +1 -1
  23. package/dist/src/core/contentGenerator.test.js +6 -2
  24. package/dist/src/core/contentGenerator.test.js.map +1 -1
  25. package/dist/src/core/coreToolScheduler.d.ts +1 -3
  26. package/dist/src/core/coreToolScheduler.js +9 -4
  27. package/dist/src/core/coreToolScheduler.js.map +1 -1
  28. package/dist/src/core/coreToolScheduler.test.js +76 -1
  29. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  30. package/dist/src/core/geminiChat.js +1 -0
  31. package/dist/src/core/geminiChat.js.map +1 -1
  32. package/dist/src/core/googleGenAIWrapper.d.ts +21 -0
  33. package/dist/src/core/googleGenAIWrapper.js +36 -0
  34. package/dist/src/core/googleGenAIWrapper.js.map +1 -0
  35. package/dist/src/core/googleGenAIWrapper.test.d.ts +6 -0
  36. package/dist/src/core/googleGenAIWrapper.test.js +104 -0
  37. package/dist/src/core/googleGenAIWrapper.test.js.map +1 -0
  38. package/dist/src/core/logger.d.ts +1 -0
  39. package/dist/src/core/logger.js +22 -8
  40. package/dist/src/core/logger.js.map +1 -1
  41. package/dist/src/core/logger.test.js +60 -9
  42. package/dist/src/core/logger.test.js.map +1 -1
  43. package/dist/src/core/nonInteractiveToolExecutor.js +8 -1
  44. package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
  45. package/dist/src/core/nonInteractiveToolExecutor.test.js +3 -1
  46. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
  47. package/dist/src/core/prompts.js +1 -1
  48. package/dist/src/core/tokenLimits.js +1 -0
  49. package/dist/src/core/tokenLimits.js.map +1 -1
  50. package/dist/src/core/turn.d.ts +2 -1
  51. package/dist/src/core/turn.js +4 -2
  52. package/dist/src/core/turn.js.map +1 -1
  53. package/dist/src/core/turn.test.js +2 -2
  54. package/dist/src/core/turn.test.js.map +1 -1
  55. package/dist/src/ide/ide-client.d.ts +8 -6
  56. package/dist/src/ide/ide-client.js +73 -36
  57. package/dist/src/ide/ide-client.js.map +1 -1
  58. package/dist/src/ide/ideContext.d.ts +212 -107
  59. package/dist/src/ide/ideContext.js +45 -44
  60. package/dist/src/ide/ideContext.js.map +1 -1
  61. package/dist/src/ide/ideContext.test.js +254 -100
  62. package/dist/src/ide/ideContext.test.js.map +1 -1
  63. package/dist/src/index.d.ts +7 -0
  64. package/dist/src/index.js +9 -0
  65. package/dist/src/index.js.map +1 -1
  66. package/dist/src/integration-tests/todo-system.test.d.ts +6 -0
  67. package/dist/src/integration-tests/todo-system.test.js +610 -0
  68. package/dist/src/integration-tests/todo-system.test.js.map +1 -0
  69. package/dist/src/mcp/oauth-provider.d.ts +5 -1
  70. package/dist/src/mcp/oauth-provider.js +36 -11
  71. package/dist/src/mcp/oauth-provider.js.map +1 -1
  72. package/dist/src/mcp/oauth-provider.test.js +2 -2
  73. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  74. package/dist/src/mcp/oauth-token-storage.d.ts +3 -1
  75. package/dist/src/mcp/oauth-token-storage.js +3 -1
  76. package/dist/src/mcp/oauth-token-storage.js.map +1 -1
  77. package/dist/src/mcp/oauth-utils.js +2 -2
  78. package/dist/src/mcp/oauth-utils.js.map +1 -1
  79. package/dist/src/mcp/oauth-utils.test.js +1 -1
  80. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  81. package/dist/src/prompts/mcp-prompts.d.ts +8 -0
  82. package/dist/src/prompts/mcp-prompts.js +13 -0
  83. package/dist/src/prompts/mcp-prompts.js.map +1 -0
  84. package/dist/src/prompts/prompt-registry.d.ts +26 -0
  85. package/dist/src/prompts/prompt-registry.js +47 -0
  86. package/dist/src/prompts/prompt-registry.js.map +1 -0
  87. package/dist/src/providers/adapters/GeminiCompatibleWrapper.js +24 -9
  88. package/dist/src/providers/adapters/GeminiCompatibleWrapper.js.map +1 -1
  89. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.js +1 -1
  90. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.js.map +1 -1
  91. package/dist/src/providers/gemini/GeminiProvider.js +8 -16
  92. package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
  93. package/dist/src/providers/openai/OpenAIProvider.js +54 -6
  94. package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
  95. package/dist/src/services/complexity-analyzer.d.ts +92 -0
  96. package/dist/src/services/complexity-analyzer.js +287 -0
  97. package/dist/src/services/complexity-analyzer.js.map +1 -0
  98. package/dist/src/services/fileDiscoveryService.test.js +101 -60
  99. package/dist/src/services/fileDiscoveryService.test.js.map +1 -1
  100. package/dist/src/services/gitService.test.d.ts +1 -1
  101. package/dist/src/services/gitService.test.js +65 -102
  102. package/dist/src/services/gitService.test.js.map +1 -1
  103. package/dist/src/services/index.d.ts +9 -0
  104. package/dist/src/services/index.js +8 -0
  105. package/dist/src/services/index.js.map +1 -0
  106. package/dist/src/services/loopDetectionService.d.ts +3 -0
  107. package/dist/src/services/loopDetectionService.js +18 -0
  108. package/dist/src/services/loopDetectionService.js.map +1 -1
  109. package/dist/src/services/loopDetectionService.test.js +90 -11
  110. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  111. package/dist/src/services/shellExecutionService.d.ts +70 -0
  112. package/dist/src/services/shellExecutionService.js +152 -0
  113. package/dist/src/services/shellExecutionService.js.map +1 -0
  114. package/dist/src/services/shellExecutionService.test.d.ts +6 -0
  115. package/dist/src/services/shellExecutionService.test.js +258 -0
  116. package/dist/src/services/shellExecutionService.test.js.map +1 -0
  117. package/dist/src/services/todo-reminder-service.d.ts +42 -0
  118. package/dist/src/services/todo-reminder-service.js +77 -0
  119. package/dist/src/services/todo-reminder-service.js.map +1 -0
  120. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +2 -1
  121. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +59 -31
  122. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  123. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +3 -1
  124. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +7 -0
  125. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  126. package/dist/src/telemetry/constants.d.ts +1 -0
  127. package/dist/src/telemetry/constants.js +1 -0
  128. package/dist/src/telemetry/constants.js.map +1 -1
  129. package/dist/src/telemetry/index.d.ts +2 -2
  130. package/dist/src/telemetry/index.js +2 -2
  131. package/dist/src/telemetry/index.js.map +1 -1
  132. package/dist/src/telemetry/loggers.d.ts +2 -1
  133. package/dist/src/telemetry/loggers.js +18 -1
  134. package/dist/src/telemetry/loggers.js.map +1 -1
  135. package/dist/src/telemetry/loggers.test.js +5 -0
  136. package/dist/src/telemetry/loggers.test.js.map +1 -1
  137. package/dist/src/telemetry/types.d.ts +8 -1
  138. package/dist/src/telemetry/types.js +12 -0
  139. package/dist/src/telemetry/types.js.map +1 -1
  140. package/dist/src/tools/edit.js +2 -1
  141. package/dist/src/tools/edit.js.map +1 -1
  142. package/dist/src/tools/glob.test.js +7 -4
  143. package/dist/src/tools/glob.test.js.map +1 -1
  144. package/dist/src/tools/grep.test.js +4 -4
  145. package/dist/src/tools/grep.test.js.map +1 -1
  146. package/dist/src/tools/mcp-client.d.ts +26 -2
  147. package/dist/src/tools/mcp-client.js +64 -21
  148. package/dist/src/tools/mcp-client.js.map +1 -1
  149. package/dist/src/tools/mcp-client.test.js +53 -1
  150. package/dist/src/tools/mcp-client.test.js.map +1 -1
  151. package/dist/src/tools/modifiable-tool.test.js +51 -62
  152. package/dist/src/tools/modifiable-tool.test.js.map +1 -1
  153. package/dist/src/tools/shell.d.ts +8 -3
  154. package/dist/src/tools/shell.js +169 -114
  155. package/dist/src/tools/shell.js.map +1 -1
  156. package/dist/src/tools/shell.test.d.ts +1 -1
  157. package/dist/src/tools/shell.test.js +298 -145
  158. package/dist/src/tools/shell.test.js.map +1 -1
  159. package/dist/src/tools/todo-read.d.ts +4 -1
  160. package/dist/src/tools/todo-read.js +136 -20
  161. package/dist/src/tools/todo-read.js.map +1 -1
  162. package/dist/src/tools/todo-read.test.js +10 -6
  163. package/dist/src/tools/todo-read.test.js.map +1 -1
  164. package/dist/src/tools/todo-schemas.d.ts +4 -4
  165. package/dist/src/tools/todo-write.d.ts +3 -0
  166. package/dist/src/tools/todo-write.js +96 -9
  167. package/dist/src/tools/todo-write.js.map +1 -1
  168. package/dist/src/tools/todo-write.test.js +17 -13
  169. package/dist/src/tools/todo-write.test.js.map +1 -1
  170. package/dist/src/tools/tool-context.d.ts +14 -0
  171. package/dist/src/tools/tool-context.js +7 -0
  172. package/dist/src/tools/tool-context.js.map +1 -0
  173. package/dist/src/tools/tool-registry.d.ts +4 -1
  174. package/dist/src/tools/tool-registry.js +14 -5
  175. package/dist/src/tools/tool-registry.js.map +1 -1
  176. package/dist/src/tools/tool-registry.test.js +2 -2
  177. package/dist/src/tools/tool-registry.test.js.map +1 -1
  178. package/dist/src/tools/tools.d.ts +8 -1
  179. package/dist/src/tools/tools.js +2 -0
  180. package/dist/src/tools/tools.js.map +1 -1
  181. package/dist/src/tools/web-fetch.js +18 -4
  182. package/dist/src/tools/web-fetch.js.map +1 -1
  183. package/dist/src/utils/bfsFileSearch.js +51 -27
  184. package/dist/src/utils/bfsFileSearch.js.map +1 -1
  185. package/dist/src/utils/bfsFileSearch.test.js +57 -0
  186. package/dist/src/utils/bfsFileSearch.test.js.map +1 -1
  187. package/dist/src/utils/formatters.d.ts +6 -0
  188. package/dist/src/utils/formatters.js +16 -0
  189. package/dist/src/utils/formatters.js.map +1 -0
  190. package/dist/src/utils/nextSpeakerChecker.js +2 -2
  191. package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
  192. package/dist/src/utils/nextSpeakerChecker.test.js +2 -2
  193. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
  194. package/dist/src/utils/retry.d.ts +3 -0
  195. package/dist/src/utils/retry.js.map +1 -1
  196. package/dist/src/utils/retry.test.js.map +1 -1
  197. package/dist/src/utils/shell-utils.d.ts +37 -3
  198. package/dist/src/utils/shell-utils.js +110 -47
  199. package/dist/src/utils/shell-utils.js.map +1 -1
  200. package/dist/src/utils/shell-utils.test.js +146 -396
  201. package/dist/src/utils/shell-utils.test.js.map +1 -1
  202. package/dist/src/utils/textUtils.d.ts +13 -0
  203. package/dist/src/utils/textUtils.js +28 -0
  204. package/dist/src/utils/textUtils.js.map +1 -0
  205. package/package.json +2 -2
  206. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,92 @@
1
+ export interface ComplexityAnalysisResult {
2
+ /** Complexity score from 0 to 1 */
3
+ complexityScore: number;
4
+ /** Whether the request is considered complex (score > threshold) */
5
+ isComplex: boolean;
6
+ /** List of detected tasks */
7
+ detectedTasks: string[];
8
+ /** Sequential indicators found (then, after, next, etc.) */
9
+ sequentialIndicators: string[];
10
+ /** Number of questions detected */
11
+ questionCount: number;
12
+ /** Whether to suggest using todos */
13
+ shouldSuggestTodos: boolean;
14
+ /** The suggestion reminder text if applicable */
15
+ suggestionReminder?: string;
16
+ }
17
+ export interface ComplexityAnalyzerOptions {
18
+ /** Threshold for considering a task complex (default: 0.6) */
19
+ complexityThreshold?: number;
20
+ /** Minimum number of tasks to suggest todos (default: 3) */
21
+ minTasksForSuggestion?: number;
22
+ }
23
+ export interface AnalysisStats {
24
+ /** Total number of analyses performed */
25
+ totalAnalyses: number;
26
+ /** Number of complex requests detected */
27
+ complexRequestCount: number;
28
+ /** Number of todo suggestions generated */
29
+ suggestionsGenerated: number;
30
+ /** Average complexity score across all analyses */
31
+ averageComplexityScore: number;
32
+ }
33
+ /**
34
+ * Service that analyzes user messages to detect multi-step tasks
35
+ * and determine when todo lists should be suggested.
36
+ * @requirement REQ-005.1
37
+ */
38
+ export declare class ComplexityAnalyzer {
39
+ private readonly complexityThreshold;
40
+ private readonly minTasksForSuggestion;
41
+ private analysisHistory;
42
+ private readonly listPatterns;
43
+ private readonly sequentialKeywords;
44
+ private readonly taskSeparatorPattern;
45
+ constructor(options?: ComplexityAnalyzerOptions);
46
+ /**
47
+ * Analyzes a user message to determine its complexity and whether
48
+ * it would benefit from using a todo list.
49
+ * @requirement REQ-005.2
50
+ */
51
+ analyzeComplexity(message: string): ComplexityAnalysisResult;
52
+ /**
53
+ * Extracts individual tasks from the message using various patterns.
54
+ * @requirement REQ-005.2
55
+ */
56
+ private extractTasks;
57
+ /**
58
+ * Finds sequential indicator keywords in the message.
59
+ * @requirement REQ-005.2
60
+ */
61
+ private findSequentialIndicators;
62
+ /**
63
+ * Counts the number of questions in the message.
64
+ */
65
+ private countQuestions;
66
+ /**
67
+ * Calculates a complexity score based on various factors.
68
+ */
69
+ private calculateComplexityScore;
70
+ /**
71
+ * Generates a suggestion reminder for using todos.
72
+ * @requirement REQ-005.3
73
+ */
74
+ private generateSuggestionReminder;
75
+ /**
76
+ * Creates an empty result for edge cases.
77
+ */
78
+ private createEmptyResult;
79
+ /**
80
+ * Gets the current complexity threshold.
81
+ */
82
+ getComplexityThreshold(): number;
83
+ /**
84
+ * Gets analysis statistics.
85
+ * @requirement REQ-005.4
86
+ */
87
+ getAnalysisStats(): AnalysisStats;
88
+ /**
89
+ * Resets the analysis history.
90
+ */
91
+ reset(): void;
92
+ }
@@ -0,0 +1,287 @@
1
+ /**
2
+ * Service that analyzes user messages to detect multi-step tasks
3
+ * and determine when todo lists should be suggested.
4
+ * @requirement REQ-005.1
5
+ */
6
+ export class ComplexityAnalyzer {
7
+ complexityThreshold;
8
+ minTasksForSuggestion;
9
+ analysisHistory = [];
10
+ // Patterns for detecting list items
11
+ listPatterns = [
12
+ /^\s*\d+\.\s+(.+)$/gm, // Numbered lists: "1. Task"
13
+ /^\s*[-•*]\s+(.+)$/gm, // Bullet points: "- Task", "• Task", "* Task"
14
+ /^\s*\[[\s\]]\]\s+(.+)$/gm, // Checkboxes: "[ ] Task"
15
+ ];
16
+ // Sequential keywords that indicate multi-step processes
17
+ sequentialKeywords = [
18
+ 'first',
19
+ 'second',
20
+ 'third',
21
+ 'then',
22
+ 'next',
23
+ 'after',
24
+ 'after that',
25
+ 'finally',
26
+ 'lastly',
27
+ 'subsequently',
28
+ 'following',
29
+ 'before',
30
+ 'afterward',
31
+ 'afterwards',
32
+ 'once',
33
+ 'when',
34
+ ];
35
+ // Task separator patterns for comma-separated lists
36
+ taskSeparatorPattern = /(?:,\s*(?:and\s+)?|;\s*|\band\s+)/;
37
+ constructor(options = {}) {
38
+ this.complexityThreshold = options.complexityThreshold ?? 0.6;
39
+ this.minTasksForSuggestion = options.minTasksForSuggestion ?? 3;
40
+ }
41
+ /**
42
+ * Analyzes a user message to determine its complexity and whether
43
+ * it would benefit from using a todo list.
44
+ * @requirement REQ-005.2
45
+ */
46
+ analyzeComplexity(message) {
47
+ if (!message || message.trim().length === 0) {
48
+ return this.createEmptyResult();
49
+ }
50
+ // Extract various complexity indicators
51
+ const detectedTasks = this.extractTasks(message);
52
+ const sequentialIndicators = this.findSequentialIndicators(message);
53
+ const questionCount = this.countQuestions(message);
54
+ // Calculate complexity score based on multiple factors
55
+ const complexityScore = this.calculateComplexityScore({
56
+ taskCount: detectedTasks.length,
57
+ hasSequentialIndicators: sequentialIndicators.length > 0,
58
+ sequentialIndicatorCount: sequentialIndicators.length,
59
+ questionCount,
60
+ messageLength: message.length,
61
+ });
62
+ const isComplex = complexityScore > this.complexityThreshold;
63
+ const shouldSuggestTodos = isComplex && detectedTasks.length >= this.minTasksForSuggestion;
64
+ const result = {
65
+ complexityScore,
66
+ isComplex,
67
+ detectedTasks,
68
+ sequentialIndicators,
69
+ questionCount,
70
+ shouldSuggestTodos,
71
+ };
72
+ // Generate suggestion reminder if needed
73
+ if (shouldSuggestTodos) {
74
+ result.suggestionReminder =
75
+ this.generateSuggestionReminder(detectedTasks);
76
+ }
77
+ // Track analysis for statistics
78
+ this.analysisHistory.push(result);
79
+ return result;
80
+ }
81
+ /**
82
+ * Extracts individual tasks from the message using various patterns.
83
+ * @requirement REQ-005.2
84
+ */
85
+ extractTasks(message) {
86
+ const tasks = [];
87
+ // Check for list patterns
88
+ for (const pattern of this.listPatterns) {
89
+ const matches = [...message.matchAll(pattern)];
90
+ for (const match of matches) {
91
+ const task = match[1].trim();
92
+ if (task && !tasks.includes(task)) {
93
+ tasks.push(task);
94
+ }
95
+ }
96
+ }
97
+ // If no list patterns found, check for comma-separated tasks
98
+ if (tasks.length === 0) {
99
+ // Look for patterns like "I need to X, Y, and Z"
100
+ const needToPattern = /(?:need to|want to|have to|should|must|will)\s+(.+?)(?:\.|$)/i;
101
+ const match = message.match(needToPattern);
102
+ if (match) {
103
+ const taskString = match[1];
104
+ const potentialTasks = taskString
105
+ .split(this.taskSeparatorPattern)
106
+ .map((t) => t.trim())
107
+ .filter((t) => t.length > 3 && !t.includes('?'));
108
+ if (potentialTasks.length >= 2) {
109
+ tasks.push(...potentialTasks);
110
+ }
111
+ }
112
+ }
113
+ // If still no tasks found, check for sequential pattern sentences
114
+ if (tasks.length === 0) {
115
+ // Split by sentence-ending punctuation
116
+ const sentences = message
117
+ .split(/[.!?]+/)
118
+ .map((s) => s.trim())
119
+ .filter((s) => s.length > 0);
120
+ // Check if we have sequential indicators suggesting multiple steps
121
+ const hasSequentialIndicators = this.findSequentialIndicators(message).length > 0;
122
+ if (hasSequentialIndicators && sentences.length >= 2) {
123
+ // Extract tasks from sentences that likely contain actions
124
+ for (const sentence of sentences) {
125
+ const lowerSentence = sentence.toLowerCase();
126
+ // Look for sentences with action verbs or sequential keywords
127
+ if (this.sequentialKeywords.some((kw) => lowerSentence.includes(kw)) ||
128
+ /\b(set up|configure|run|start|create|add|implement|build|deploy)\b/i.test(sentence)) {
129
+ // Extract the main action from the sentence
130
+ const actionMatch = sentence.match(/(?:first,?\s*|then\s*|after that,?\s*|finally,?\s*)?(.+)/i);
131
+ if (actionMatch) {
132
+ const task = actionMatch[1].trim();
133
+ if (task && !tasks.includes(task)) {
134
+ tasks.push(task);
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ return tasks;
142
+ }
143
+ /**
144
+ * Finds sequential indicator keywords in the message.
145
+ * @requirement REQ-005.2
146
+ */
147
+ findSequentialIndicators(message) {
148
+ const lowerMessage = message.toLowerCase();
149
+ const found = [];
150
+ // Sort keywords by length (descending) to match longer phrases first
151
+ const sortedKeywords = [...this.sequentialKeywords].sort((a, b) => b.length - a.length);
152
+ for (const keyword of sortedKeywords) {
153
+ // For multi-word keywords, use a different pattern
154
+ const pattern = keyword.includes(' ')
155
+ ? new RegExp(`\\b${keyword.replace(/\s+/g, '\\s+')}\\b`, 'i')
156
+ : new RegExp(`\\b${keyword}\\b`, 'i');
157
+ if (pattern.test(lowerMessage) && !found.includes(keyword)) {
158
+ found.push(keyword);
159
+ }
160
+ }
161
+ return found;
162
+ }
163
+ /**
164
+ * Counts the number of questions in the message.
165
+ */
166
+ countQuestions(message) {
167
+ const questionPattern = /[^.!?]*\?/g;
168
+ const matches = message.match(questionPattern);
169
+ return matches ? matches.length : 0;
170
+ }
171
+ /**
172
+ * Calculates a complexity score based on various factors.
173
+ */
174
+ calculateComplexityScore(factors) {
175
+ let score = 0;
176
+ // Task count is the primary factor - increased weights
177
+ if (factors.taskCount >= 5) {
178
+ score += 0.8;
179
+ }
180
+ else if (factors.taskCount >= 4) {
181
+ score += 0.75;
182
+ }
183
+ else if (factors.taskCount >= 3) {
184
+ score += 0.7;
185
+ }
186
+ else if (factors.taskCount >= 2) {
187
+ score += 0.5;
188
+ }
189
+ else if (factors.taskCount === 1) {
190
+ score += 0.2;
191
+ }
192
+ // Sequential indicators add to complexity
193
+ if (factors.hasSequentialIndicators) {
194
+ // If we have sequential indicators but few detected tasks, boost the score
195
+ if (factors.taskCount === 0) {
196
+ score += 0.5; // Likely sequential tasks that weren't parsed as list
197
+ }
198
+ else {
199
+ score += Math.min(0.4, factors.sequentialIndicatorCount * 0.15);
200
+ }
201
+ }
202
+ // Multiple questions indicate complexity
203
+ if (factors.questionCount >= 3) {
204
+ score += 0.65; // Multiple questions typically mean separate topics
205
+ }
206
+ else if (factors.questionCount >= 2) {
207
+ score += 0.4;
208
+ }
209
+ else if (factors.questionCount === 1) {
210
+ score += 0.1;
211
+ }
212
+ // Very long messages might be complex
213
+ if (factors.messageLength > 500) {
214
+ score += 0.1;
215
+ }
216
+ else if (factors.messageLength > 200) {
217
+ score += 0.05;
218
+ }
219
+ // Normalize to [0, 1]
220
+ return Math.min(1, score);
221
+ }
222
+ /**
223
+ * Generates a suggestion reminder for using todos.
224
+ * @requirement REQ-005.3
225
+ */
226
+ generateSuggestionReminder(detectedTasks) {
227
+ const taskList = detectedTasks
228
+ .slice(0, 5)
229
+ .map((t) => ` - ${t}`)
230
+ .join('\n');
231
+ return `I notice you have multiple tasks to complete. Using a todo list would help track progress:\n\n${taskList}${detectedTasks.length > 5
232
+ ? `\n ... and ${detectedTasks.length - 5} more tasks`
233
+ : ''}`;
234
+ }
235
+ /**
236
+ * Creates an empty result for edge cases.
237
+ */
238
+ createEmptyResult() {
239
+ const result = {
240
+ complexityScore: 0,
241
+ isComplex: false,
242
+ detectedTasks: [],
243
+ sequentialIndicators: [],
244
+ questionCount: 0,
245
+ shouldSuggestTodos: false,
246
+ };
247
+ this.analysisHistory.push(result);
248
+ return result;
249
+ }
250
+ /**
251
+ * Gets the current complexity threshold.
252
+ */
253
+ getComplexityThreshold() {
254
+ return this.complexityThreshold;
255
+ }
256
+ /**
257
+ * Gets analysis statistics.
258
+ * @requirement REQ-005.4
259
+ */
260
+ getAnalysisStats() {
261
+ const totalAnalyses = this.analysisHistory.length;
262
+ if (totalAnalyses === 0) {
263
+ return {
264
+ totalAnalyses: 0,
265
+ complexRequestCount: 0,
266
+ suggestionsGenerated: 0,
267
+ averageComplexityScore: 0,
268
+ };
269
+ }
270
+ const complexRequestCount = this.analysisHistory.filter((r) => r.isComplex).length;
271
+ const suggestionsGenerated = this.analysisHistory.filter((r) => r.shouldSuggestTodos).length;
272
+ const totalScore = this.analysisHistory.reduce((sum, r) => sum + r.complexityScore, 0);
273
+ return {
274
+ totalAnalyses,
275
+ complexRequestCount,
276
+ suggestionsGenerated,
277
+ averageComplexityScore: totalScore / totalAnalyses,
278
+ };
279
+ }
280
+ /**
281
+ * Resets the analysis history.
282
+ */
283
+ reset() {
284
+ this.analysisHistory = [];
285
+ }
286
+ }
287
+ //# sourceMappingURL=complexity-analyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complexity-analyzer.js","sourceRoot":"","sources":["../../../src/services/complexity-analyzer.ts"],"names":[],"mappings":"AAmCA;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IACZ,mBAAmB,CAAS;IAC5B,qBAAqB,CAAS;IACvC,eAAe,GAA+B,EAAE,CAAC;IAEzD,oCAAoC;IACnB,YAAY,GAAG;QAC9B,qBAAqB,EAAE,4BAA4B;QACnD,qBAAqB,EAAE,8CAA8C;QACrE,0BAA0B,EAAE,yBAAyB;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CAAC;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACd,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;QAElD,IAAI,aAAa,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO;gBACL,aAAa,EAAE,CAAC;gBAChB,mBAAmB,EAAE,CAAC;gBACtB,oBAAoB,EAAE,CAAC;gBACvB,sBAAsB,EAAE,CAAC;aAC1B,CAAC;QACJ,CAAC;QAED,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CACrD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnB,CAAC,MAAM,CAAC;QACT,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CACtD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAC5B,CAAC,MAAM,CAAC;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAC5C,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,eAAe,EACnC,CAAC,CACF,CAAC;QAEF,OAAO;YACL,aAAa;YACb,mBAAmB;YACnB,oBAAoB;YACpB,sBAAsB,EAAE,UAAU,GAAG,aAAa;SACnD,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;CACF"}
@@ -3,99 +3,140 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
6
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
7
+ import * as fs from 'fs/promises';
8
+ import * as os from 'os';
9
+ import * as path from 'path';
7
10
  import { FileDiscoveryService } from './fileDiscoveryService.js';
8
- import { GitIgnoreParser } from '../utils/gitIgnoreParser.js';
9
- import * as gitUtils from '../utils/gitUtils.js';
10
- // Mock the GitIgnoreParser
11
- vi.mock('../utils/gitIgnoreParser.js');
12
- // Mock gitUtils module
13
- vi.mock('../utils/gitUtils.js');
14
11
  describe('FileDiscoveryService', () => {
15
- let service;
16
- let mockGitIgnoreParser;
17
- const mockProjectRoot = '/test/project';
18
- beforeEach(() => {
19
- mockGitIgnoreParser = {
20
- initialize: vi.fn(),
21
- isIgnored: vi.fn(),
22
- loadPatterns: vi.fn(),
23
- loadGitRepoPatterns: vi.fn(),
24
- };
25
- vi.mocked(GitIgnoreParser).mockImplementation(() => mockGitIgnoreParser);
26
- vi.mocked(gitUtils.isGitRepository).mockReturnValue(true);
27
- vi.mocked(gitUtils.findGitRoot).mockReturnValue('/test/project');
28
- vi.clearAllMocks();
12
+ let testRootDir;
13
+ let projectRoot;
14
+ async function createTestFile(filePath, content = '') {
15
+ const fullPath = path.join(projectRoot, filePath);
16
+ await fs.mkdir(path.dirname(fullPath), { recursive: true });
17
+ await fs.writeFile(fullPath, content);
18
+ return fullPath;
19
+ }
20
+ beforeEach(async () => {
21
+ testRootDir = await fs.mkdtemp(path.join(os.tmpdir(), 'file-discovery-test-'));
22
+ projectRoot = path.join(testRootDir, 'project');
23
+ await fs.mkdir(projectRoot, { recursive: true });
29
24
  });
30
- afterEach(() => {
31
- vi.restoreAllMocks();
25
+ afterEach(async () => {
26
+ await fs.rm(testRootDir, { recursive: true, force: true });
32
27
  });
33
28
  describe('initialization', () => {
34
- it('should initialize git ignore parser by default', () => {
35
- service = new FileDiscoveryService(mockProjectRoot);
36
- expect(GitIgnoreParser).toHaveBeenCalledWith(mockProjectRoot);
37
- expect(GitIgnoreParser).toHaveBeenCalledTimes(2);
38
- expect(mockGitIgnoreParser.loadGitRepoPatterns).toHaveBeenCalled();
39
- expect(mockGitIgnoreParser.loadPatterns).toHaveBeenCalled();
29
+ it('should initialize git ignore parser by default in a git repo', async () => {
30
+ await fs.mkdir(path.join(projectRoot, '.git'));
31
+ await createTestFile('.gitignore', 'node_modules/');
32
+ const service = new FileDiscoveryService(projectRoot);
33
+ // Let's check the effect of the parser instead of mocking it.
34
+ expect(service.shouldGitIgnoreFile('node_modules/foo.js')).toBe(true);
35
+ expect(service.shouldGitIgnoreFile('src/foo.js')).toBe(false);
40
36
  });
41
- it('should not initialize git ignore parser when not a git repo', () => {
42
- vi.mocked(gitUtils.isGitRepository).mockReturnValue(false);
43
- service = new FileDiscoveryService(mockProjectRoot);
44
- expect(GitIgnoreParser).toHaveBeenCalledOnce();
45
- expect(mockGitIgnoreParser.loadGitRepoPatterns).not.toHaveBeenCalled();
37
+ it('should not load git repo patterns when not in a git repo', async () => {
38
+ // No .git directory
39
+ await createTestFile('.gitignore', 'node_modules/');
40
+ const service = new FileDiscoveryService(projectRoot);
41
+ // .gitignore is not loaded in non-git repos
42
+ expect(service.shouldGitIgnoreFile('node_modules/foo.js')).toBe(false);
43
+ });
44
+ it('should load .llxprtignore patterns even when not in a git repo', async () => {
45
+ await createTestFile('.llxprtignore', 'secrets.txt');
46
+ const service = new FileDiscoveryService(projectRoot);
47
+ expect(service.shouldLlxprtIgnoreFile('secrets.txt')).toBe(true);
48
+ expect(service.shouldLlxprtIgnoreFile('src/index.js')).toBe(false);
46
49
  });
47
50
  });
48
51
  describe('filterFiles', () => {
49
- beforeEach(() => {
50
- mockGitIgnoreParser.isIgnored.mockImplementation((path) => path.includes('node_modules') || path.includes('.git'));
51
- service = new FileDiscoveryService(mockProjectRoot);
52
+ beforeEach(async () => {
53
+ await fs.mkdir(path.join(projectRoot, '.git'));
54
+ await createTestFile('.gitignore', 'node_modules/\n.git/\ndist');
55
+ await createTestFile('.llxprtignore', 'logs/');
52
56
  });
53
- it('should filter out git-ignored files by default', () => {
57
+ it('should filter out git-ignored and llxprt-ignored files by default', () => {
54
58
  const files = [
55
59
  'src/index.ts',
56
60
  'node_modules/package/index.js',
57
61
  'README.md',
58
62
  '.git/config',
59
63
  'dist/bundle.js',
60
- ];
61
- const filtered = service.filterFiles(files);
62
- expect(filtered).toEqual(['src/index.ts', 'README.md', 'dist/bundle.js']);
64
+ 'logs/latest.log',
65
+ ].map((f) => path.join(projectRoot, f));
66
+ const service = new FileDiscoveryService(projectRoot);
67
+ expect(service.filterFiles(files)).toEqual(['src/index.ts', 'README.md'].map((f) => path.join(projectRoot, f)));
63
68
  });
64
69
  it('should not filter files when respectGitIgnore is false', () => {
65
70
  const files = [
66
71
  'src/index.ts',
67
72
  'node_modules/package/index.js',
68
73
  '.git/config',
69
- ];
70
- const filtered = service.filterFiles(files, { respectGitIgnore: false });
71
- expect(filtered).toEqual(files);
74
+ 'logs/latest.log',
75
+ ].map((f) => path.join(projectRoot, f));
76
+ const service = new FileDiscoveryService(projectRoot);
77
+ const filtered = service.filterFiles(files, {
78
+ respectGitIgnore: false,
79
+ respectLlxprtIgnore: true, // still respect this one
80
+ });
81
+ expect(filtered).toEqual(['src/index.ts', 'node_modules/package/index.js', '.git/config'].map((f) => path.join(projectRoot, f)));
82
+ });
83
+ it('should not filter files when respectLlxprtIgnore is false', () => {
84
+ const files = [
85
+ 'src/index.ts',
86
+ 'node_modules/package/index.js',
87
+ 'logs/latest.log',
88
+ ].map((f) => path.join(projectRoot, f));
89
+ const service = new FileDiscoveryService(projectRoot);
90
+ const filtered = service.filterFiles(files, {
91
+ respectGitIgnore: true,
92
+ respectLlxprtIgnore: false,
93
+ });
94
+ expect(filtered).toEqual(['src/index.ts', 'logs/latest.log'].map((f) => path.join(projectRoot, f)));
72
95
  });
73
96
  it('should handle empty file list', () => {
74
- const filtered = service.filterFiles([]);
75
- expect(filtered).toEqual([]);
97
+ const service = new FileDiscoveryService(projectRoot);
98
+ expect(service.filterFiles([])).toEqual([]);
76
99
  });
77
100
  });
78
- describe('shouldGitIgnoreFile', () => {
79
- beforeEach(() => {
80
- mockGitIgnoreParser.isIgnored.mockImplementation((path) => path.includes('node_modules'));
81
- service = new FileDiscoveryService(mockProjectRoot);
101
+ describe('shouldGitIgnoreFile & shouldLlxprtIgnoreFile', () => {
102
+ beforeEach(async () => {
103
+ await fs.mkdir(path.join(projectRoot, '.git'));
104
+ await createTestFile('.gitignore', 'node_modules/');
105
+ await createTestFile('.llxprtignore', '*.log');
82
106
  });
83
107
  it('should return true for git-ignored files', () => {
84
- expect(service.shouldGitIgnoreFile('node_modules/package/index.js')).toBe(true);
108
+ const service = new FileDiscoveryService(projectRoot);
109
+ expect(service.shouldGitIgnoreFile(path.join(projectRoot, 'node_modules/package/index.js'))).toBe(true);
110
+ });
111
+ it('should return false for non-git-ignored files', () => {
112
+ const service = new FileDiscoveryService(projectRoot);
113
+ expect(service.shouldGitIgnoreFile(path.join(projectRoot, 'src/index.ts'))).toBe(false);
114
+ });
115
+ it('should return true for llxprt-ignored files', () => {
116
+ const service = new FileDiscoveryService(projectRoot);
117
+ expect(service.shouldLlxprtIgnoreFile(path.join(projectRoot, 'debug.log'))).toBe(true);
85
118
  });
86
- it('should return false for non-ignored files', () => {
87
- expect(service.shouldGitIgnoreFile('src/index.ts')).toBe(false);
119
+ it('should return false for non-llxprt-ignored files', () => {
120
+ const service = new FileDiscoveryService(projectRoot);
121
+ expect(service.shouldLlxprtIgnoreFile(path.join(projectRoot, 'src/index.ts'))).toBe(false);
88
122
  });
89
123
  });
90
124
  describe('edge cases', () => {
91
- it('should handle relative project root paths', () => {
92
- const relativeService = new FileDiscoveryService('./relative/path');
93
- expect(relativeService).toBeInstanceOf(FileDiscoveryService);
125
+ it('should handle relative project root paths', async () => {
126
+ await fs.mkdir(path.join(projectRoot, '.git'));
127
+ await createTestFile('.gitignore', 'ignored.txt');
128
+ const service = new FileDiscoveryService(path.relative(process.cwd(), projectRoot));
129
+ expect(service.shouldGitIgnoreFile(path.join(projectRoot, 'ignored.txt'))).toBe(true);
130
+ expect(service.shouldGitIgnoreFile(path.join(projectRoot, 'not-ignored.txt'))).toBe(false);
94
131
  });
95
- it('should handle filterFiles with undefined options', () => {
96
- const files = ['src/index.ts'];
97
- const filtered = service.filterFiles(files, undefined);
98
- expect(filtered).toEqual(files);
132
+ it('should handle filterFiles with undefined options', async () => {
133
+ await fs.mkdir(path.join(projectRoot, '.git'));
134
+ await createTestFile('.gitignore', 'ignored.txt');
135
+ const service = new FileDiscoveryService(projectRoot);
136
+ const files = ['src/index.ts', 'ignored.txt'].map((f) => path.join(projectRoot, f));
137
+ expect(service.filterFiles(files, undefined)).toEqual([
138
+ path.join(projectRoot, 'src/index.ts'),
139
+ ]);
99
140
  });
100
141
  });
101
142
  });
@@ -1 +1 @@
1
- {"version":3,"file":"fileDiscoveryService.test.js","sourceRoot":"","sources":["../../../src/services/fileDiscoveryService.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AAEjD,2BAA2B;AAC3B,EAAE,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;AAEvC,uBAAuB;AACvB,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAEhC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,OAA6B,CAAC;IAClC,IAAI,mBAA4C,CAAC;IACjD,MAAM,eAAe,GAAG,eAAe,CAAC;IAExC,UAAU,CAAC,GAAG,EAAE;QACd,mBAAmB,GAAG;YACpB,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE;YACnB,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;YAClB,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE;YACrB,mBAA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