codehere 0.4.0 → 0.5.0-alpha.0
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 +7 -0
- package/dist/application/agents/execution-agent.js +2 -2
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +16 -8
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/validation-agent.js +2 -2
- package/dist/application/agents/validation-agent.js.map +1 -1
- package/dist/application/services/dependency-container.d.ts +30 -6
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +75 -43
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +6 -3
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/domain/entities/task.d.ts.map +1 -1
- package/dist/domain/entities/task.js +1 -1
- package/dist/domain/entities/task.js.map +1 -1
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.d.ts +4 -10
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.js +7 -22
- package/dist/domain/services/environment-mode-manager.js.map +1 -1
- package/dist/domain/services/risk-tier-detector.d.ts +8 -9
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -1
- package/dist/domain/services/risk-tier-detector.js +53 -40
- package/dist/domain/services/risk-tier-detector.js.map +1 -1
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/index.js +308 -48
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +3 -3
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/provider-ai-service.js +6 -6
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.js +40 -112
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
- package/dist/infrastructure/cache/response-cache.d.ts +10 -78
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/response-cache.js +22 -198
- package/dist/infrastructure/cache/response-cache.js.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.js +25 -102
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/bash-completion.js +11 -87
- package/dist/infrastructure/completion/bash-completion.js.map +1 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/fish-completion.js +15 -58
- package/dist/infrastructure/completion/fish-completion.js.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.js +18 -73
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
- package/dist/infrastructure/config/config-manager.js +2 -2
- package/dist/infrastructure/config/config-manager.js.map +1 -1
- package/dist/infrastructure/context/conversation-context.d.ts +27 -31
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -1
- package/dist/infrastructure/context/conversation-context.js +94 -136
- package/dist/infrastructure/context/conversation-context.js.map +1 -1
- package/dist/infrastructure/context/session-manager.d.ts +27 -11
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -1
- package/dist/infrastructure/context/session-manager.js +69 -73
- package/dist/infrastructure/context/session-manager.js.map +1 -1
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -1
- package/dist/infrastructure/providers/cohere-provider.js +102 -17
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -1
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +399 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +37 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/plan-repository.js +36 -73
- package/dist/infrastructure/storage/plan-repository.js.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +11 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -1
- package/dist/infrastructure/storage/task-helpers.js +47 -7
- package/dist/infrastructure/storage/task-helpers.js.map +1 -1
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/task-repository.js.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.d.ts +9 -37
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.js +23 -148
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -1
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +12 -54
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -1
- package/dist/infrastructure/ux/comprehensive-formatter.js +87 -182
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.js +5 -181
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.d.ts +15 -31
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.js +30 -166
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +3 -5
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +34 -49
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.js +33 -80
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +25 -89
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.js +32 -204
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -1
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +53 -53
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -1
- package/dist/infrastructure/validation/agent-validation-helper.js +110 -61
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -1
- package/dist/infrastructure/validation/review-handler.d.ts +13 -41
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -1
- package/dist/infrastructure/validation/review-handler.js +23 -189
- package/dist/infrastructure/validation/review-handler.js.map +1 -1
- package/dist/infrastructure/validation/summary-aggregator.d.ts +25 -22
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -1
- package/dist/infrastructure/validation/summary-aggregator.js +47 -133
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -1
- package/dist/infrastructure/validation/summary-extractor.d.ts +13 -48
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -1
- package/dist/infrastructure/validation/summary-extractor.js +32 -89
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -1
- package/dist/infrastructure/validation/trace-summary.d.ts +30 -57
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -1
- package/dist/infrastructure/validation/trace-summary.js +37 -356
- package/dist/infrastructure/validation/trace-summary.js.map +1 -1
- package/dist/monitoring.d.ts +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +12 -9
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +124 -45
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +185 -128
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/config-command.js +8 -6
- package/dist/presentation/cli/commands/config-command.js.map +1 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +3 -1
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/docs-command.js +13 -184
- package/dist/presentation/cli/commands/docs-command.js.map +1 -1
- package/dist/presentation/cli/commands/fix-command.d.ts +2 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/fix-command.js +25 -281
- package/dist/presentation/cli/commands/fix-command.js.map +1 -1
- package/dist/presentation/cli/commands/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +15 -7
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +9 -6
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +6 -4
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/product-command.js +12 -178
- package/dist/presentation/cli/commands/product-command.js.map +1 -1
- package/dist/presentation/cli/commands/review-command.d.ts +7 -7
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/review-command.js +148 -16
- package/dist/presentation/cli/commands/review-command.js.map +1 -1
- package/dist/presentation/cli/commands/run-command.d.ts +6 -8
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/run-command.js +182 -23
- package/dist/presentation/cli/commands/run-command.js.map +1 -1
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/setup-command.js +15 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +1 -1
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +3 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/status-command.js +147 -156
- package/dist/presentation/cli/commands/status-command.js.map +1 -1
- package/dist/presentation/cli/commands/suggest-command.d.ts +3 -5
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/suggest-command.js +132 -19
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/dist/ui.d.ts +6 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +35 -1
- package/dist/ui.js.map +1 -1
- package/package.json +8 -3
|
@@ -1,196 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Docs
|
|
3
3
|
* Generate documentation (README, API docs) using DocumentationAgent
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
4
6
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { colors, sectionHeader, formatPath, success, error, warning, newline, createBanner, createSpinner, createTable, } from '../../../ui.js';
|
|
7
|
-
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
8
|
-
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
7
|
+
import { colors, warning, newline } from '../../../ui.js';
|
|
9
8
|
import { displayError } from '../error-display.js';
|
|
10
|
-
|
|
11
|
-
import { traceSummaryFormatter } from '../../../infrastructure/validation/trace-summary.js';
|
|
12
|
-
import { reviewHandler } from '../../../infrastructure/validation/review-handler.js';
|
|
13
|
-
export async function executeDocsCommand(type, options = {}) {
|
|
14
|
-
// Validate type
|
|
15
|
-
const validTypes = ['readme', 'api', 'all'];
|
|
16
|
-
if (!validTypes.includes(type)) {
|
|
17
|
-
console.error(error(`Invalid type: ${type}. Must be one of: ${validTypes.join(', ')}`));
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
// Detect codebase context
|
|
21
|
-
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
22
|
-
const runId = executionTracer.startRun('docs', {
|
|
23
|
-
query: `generate ${type}`,
|
|
24
|
-
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
25
|
-
});
|
|
26
|
-
console.log(createBanner('Documentation Generator', 'Auto-generate documentation from codebase'));
|
|
27
|
-
newline();
|
|
28
|
-
if (codebaseInfo) {
|
|
29
|
-
console.log(colors.dim(`Codebase: ${codebaseInfo.rootPath} (${codebaseInfo.type})`));
|
|
30
|
-
newline();
|
|
31
|
-
}
|
|
32
|
-
const spinner = createSpinner(`Generating ${type} documentation...`);
|
|
33
|
-
spinner.start();
|
|
9
|
+
export async function executeDocsCommand(type, options) {
|
|
34
10
|
try {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
updateExisting: options.updateExisting || false,
|
|
42
|
-
outputPath: options.outputPath,
|
|
43
|
-
},
|
|
44
|
-
context: {
|
|
45
|
-
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
46
|
-
sessionId: codebaseInfo?.rootPath || 'default-session',
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
spinner.stop();
|
|
50
|
-
// Get current run before ending (so we can use it for summary)
|
|
51
|
-
const currentRunId = executionTracer.getCurrentRunId();
|
|
52
|
-
// End trace to finalize run context and save to disk
|
|
53
|
-
executionTracer.endRun();
|
|
54
|
-
// Get finalized run context from disk
|
|
55
|
-
// Small delay to ensure file is written (could be improved with callback)
|
|
56
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
57
|
-
const run = executionTracer.getRun(runId);
|
|
58
|
-
const startTime = run?.startTime || Date.now();
|
|
59
|
-
// Create trace summary
|
|
60
|
-
let summary = traceSummaryFormatter.createSummary(run || {
|
|
61
|
-
runId,
|
|
62
|
-
startTime,
|
|
63
|
-
endTime: Date.now(),
|
|
64
|
-
operation: 'docs',
|
|
65
|
-
query: `generate ${type}`,
|
|
66
|
-
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
67
|
-
traces: [],
|
|
68
|
-
}, undefined, 'documentation-agent');
|
|
69
|
-
// Update summary with actual results
|
|
70
|
-
if (result.success && result.documents.length > 0) {
|
|
71
|
-
summary.filesCreated = result.documents.map(doc => doc.path);
|
|
72
|
-
summary.metrics.filesAnalyzed = result.stats?.filesAnalyzed;
|
|
73
|
-
}
|
|
74
|
-
if (result.errors && result.errors.length > 0) {
|
|
75
|
-
summary.errors = result.errors;
|
|
76
|
-
}
|
|
77
|
-
// Get review decision - single source of truth for userAction
|
|
78
|
-
// All CLI commands use this same pattern: getReviewDecision() → use decision.userAction
|
|
79
|
-
const reviewRequested = Boolean(options.review);
|
|
80
|
-
const decision = await reviewHandler.getReviewDecision(summary, reviewRequested);
|
|
81
|
-
if (!decision.approved) {
|
|
82
|
-
console.log(warning('Operation cancelled by user.'));
|
|
83
|
-
// Record feedback for rejection
|
|
84
|
-
agentFeedbackManager.recordFeedback({
|
|
85
|
-
runId,
|
|
86
|
-
agentName: 'documentation-agent',
|
|
87
|
-
operation: `generate ${type}`,
|
|
88
|
-
query: `generate ${type}`,
|
|
89
|
-
outcome: 'cancelled',
|
|
90
|
-
userAction: decision.userAction,
|
|
91
|
-
filesCreated: result.documents.map(doc => doc.path),
|
|
92
|
-
errors: result.errors,
|
|
93
|
-
metrics: {
|
|
94
|
-
filesAnalyzed: result.stats?.filesAnalyzed,
|
|
95
|
-
duration: run ? (run.endTime - run.startTime) : 0,
|
|
96
|
-
},
|
|
97
|
-
validationChecks: summary.validationChecks.map(check => ({
|
|
98
|
-
check: check.check,
|
|
99
|
-
passed: check.passed,
|
|
100
|
-
message: check.message,
|
|
101
|
-
})),
|
|
102
|
-
});
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const finalOutcome = result.success ? 'success' : 'failure';
|
|
106
|
-
// Record feedback with userAction from review decision
|
|
107
|
-
agentFeedbackManager.recordFeedback({
|
|
108
|
-
runId,
|
|
109
|
-
agentName: 'documentation-agent',
|
|
110
|
-
operation: `generate ${type}`,
|
|
111
|
-
query: `generate ${type}`,
|
|
112
|
-
outcome: finalOutcome,
|
|
113
|
-
userAction: decision.userAction,
|
|
114
|
-
filesCreated: result.documents.map(doc => doc.path),
|
|
115
|
-
errors: result.errors,
|
|
116
|
-
metrics: {
|
|
117
|
-
filesAnalyzed: result.stats?.filesAnalyzed,
|
|
118
|
-
duration: run ? (run.endTime - run.startTime) : 0,
|
|
119
|
-
},
|
|
120
|
-
validationChecks: summary.validationChecks.map(check => ({
|
|
121
|
-
check: check.check,
|
|
122
|
-
passed: check.passed,
|
|
123
|
-
message: check.message,
|
|
124
|
-
})),
|
|
125
|
-
});
|
|
126
|
-
if (result.success) {
|
|
127
|
-
newline();
|
|
128
|
-
sectionHeader('Generated Documentation');
|
|
129
|
-
// Display generated documents
|
|
130
|
-
if (result.documents.length > 0) {
|
|
131
|
-
const rows = result.documents.map((doc) => [
|
|
132
|
-
formatPath(doc.path),
|
|
133
|
-
colors.cyan(doc.type),
|
|
134
|
-
colors.dim(doc.contentPreview.substring(0, 80) + '...'),
|
|
135
|
-
]);
|
|
136
|
-
const table = createTable(['File', 'Type', 'Preview'], rows);
|
|
137
|
-
console.log(table.toString());
|
|
138
|
-
newline();
|
|
139
|
-
}
|
|
140
|
-
// Display stats
|
|
141
|
-
if (result.stats) {
|
|
142
|
-
sectionHeader('Statistics');
|
|
143
|
-
console.log(` Files Analyzed: ${colors.cyan(String(result.stats.filesAnalyzed))}`);
|
|
144
|
-
if (result.stats.symbolsDocumented > 0) {
|
|
145
|
-
console.log(` Symbols Documented: ${colors.cyan(String(result.stats.symbolsDocumented))}`);
|
|
146
|
-
}
|
|
147
|
-
console.log(` Lines Generated: ${colors.cyan(String(result.stats.linesGenerated))}`);
|
|
148
|
-
newline();
|
|
149
|
-
}
|
|
150
|
-
// Display trace summary if requested or if review was needed
|
|
151
|
-
if (options.review || summary.reviewNeeded.required) {
|
|
152
|
-
newline();
|
|
153
|
-
console.log(traceSummaryFormatter.formatSummary(summary));
|
|
154
|
-
newline();
|
|
155
|
-
}
|
|
156
|
-
console.log(success(`Documentation generated successfully!`));
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
spinner.stop();
|
|
160
|
-
newline();
|
|
161
|
-
console.log(error('Failed to generate documentation'));
|
|
162
|
-
if (result.errors && result.errors.length > 0) {
|
|
163
|
-
sectionHeader('Errors');
|
|
164
|
-
result.errors.forEach((err) => {
|
|
165
|
-
console.log(` ${colors.red('✗')} ${err}`);
|
|
166
|
-
});
|
|
167
|
-
newline();
|
|
168
|
-
}
|
|
169
|
-
if (result.documents.length > 0) {
|
|
170
|
-
console.log(warning('Some documents were generated despite errors:'));
|
|
171
|
-
result.documents.forEach((doc) => {
|
|
172
|
-
console.log(` ${colors.yellow('○')} ${formatPath(doc.path)}`);
|
|
173
|
-
});
|
|
174
|
-
newline();
|
|
175
|
-
}
|
|
176
|
-
displayError(new Error('Documentation generation completed with errors'), {
|
|
177
|
-
operation: 'docs',
|
|
178
|
-
query: `generate ${type}`,
|
|
179
|
-
showSuggestions: true,
|
|
180
|
-
});
|
|
11
|
+
// In alpha, this is a stub
|
|
12
|
+
// Can be enhanced later with DocumentationAgent
|
|
13
|
+
console.log(warning('Documentation generation is not yet fully implemented in v0.5.0-alpha.0'));
|
|
14
|
+
console.log(colors.dim(`Requested type: ${type}`));
|
|
15
|
+
if (options?.target) {
|
|
16
|
+
console.log(colors.dim(`Target: ${options.target}`));
|
|
181
17
|
}
|
|
182
18
|
}
|
|
183
19
|
catch (err) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
operation: 'docs',
|
|
187
|
-
query: `generate ${type}`,
|
|
188
|
-
showSuggestions: true,
|
|
189
|
-
});
|
|
190
|
-
throw err;
|
|
191
|
-
}
|
|
192
|
-
finally {
|
|
193
|
-
// Run already ended after execution, no need to end again
|
|
20
|
+
displayError(err);
|
|
21
|
+
process.exit(1);
|
|
194
22
|
}
|
|
23
|
+
newline();
|
|
195
24
|
}
|
|
196
25
|
//# sourceMappingURL=docs-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/docs-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"docs-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/docs-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAkB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAuB,EACvB,OAKC;IAED,IAAI,CAAC;QACH,2BAA2B;QAC3B,gDAAgD;QAChD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,yEAAyE,CAAC,CAAC,CAAC;QAChG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC,CAAC;QACnD,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,YAAY,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fix-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/fix-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fix-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/fix-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
|
|
@@ -1,309 +1,53 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Fix/Edit
|
|
3
3
|
* Apply AI-generated code edits to a file with review support
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
4
6
|
*/
|
|
5
7
|
import { container } from '../../../application/services/dependency-container.js';
|
|
6
|
-
import { colors,
|
|
7
|
-
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
8
|
-
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
8
|
+
import { colors, error, success, newline, isMinimalStyle } from '../../../ui.js';
|
|
9
9
|
import { displayError } from '../error-display.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import { createRunTask, updateTaskStatus, updateTaskWithResults } from '../../../infrastructure/storage/task-helpers.js';
|
|
16
|
-
import { TaskStatus } from '../../../domain/entities/task.js';
|
|
17
|
-
export async function executeFixCommand(file, instruction, options = {}) {
|
|
18
|
-
// TODO: Create task (convenience alias for run with single file)
|
|
19
|
-
// Task mode: RUN
|
|
20
|
-
// Status: CREATED → RUNNING → COMPLETED/NEEDS_REVIEW
|
|
21
|
-
// Risk tier: Detect from file/operation
|
|
22
|
-
// Goal: "<instruction> on <file>"
|
|
23
|
-
// See: docs/ARCHITECTURE/TASK_MODEL.md
|
|
24
|
-
// Start execution tracing
|
|
25
|
-
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
26
|
-
const runId = executionTracer.startRun('fix', {
|
|
27
|
-
query: `${instruction} (file: ${file})`,
|
|
28
|
-
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
29
|
-
});
|
|
30
|
-
// Create task (non-breaking, silent failure)
|
|
31
|
-
let taskId = null;
|
|
32
|
-
try {
|
|
33
|
-
taskId = await createRunTask({
|
|
34
|
-
goal: instruction,
|
|
35
|
-
filePath: file,
|
|
36
|
-
codebaseInfo,
|
|
37
|
-
runId,
|
|
38
|
-
files: [file],
|
|
39
|
-
});
|
|
40
|
-
// Update to RUNNING when execution starts
|
|
41
|
-
if (taskId) {
|
|
42
|
-
await updateTaskStatus(taskId, TaskStatus.RUNNING, {
|
|
43
|
-
executionStartedAt: Date.now(),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
10
|
+
export async function executeFixCommand(file, instruction, options) {
|
|
11
|
+
const minimal = isMinimalStyle();
|
|
12
|
+
// Header
|
|
13
|
+
if (minimal) {
|
|
14
|
+
console.log(colors.cyan('codehere fix') + colors.dim(' ▸ ') + file);
|
|
46
15
|
}
|
|
47
|
-
|
|
48
|
-
|
|
16
|
+
else {
|
|
17
|
+
console.log(colors.bold('Fix/Edit'));
|
|
18
|
+
console.log(colors.dim(`File: ${file}`));
|
|
49
19
|
}
|
|
50
|
-
console.log(
|
|
51
|
-
newline();
|
|
52
|
-
// Display edit info
|
|
53
|
-
console.log(colors.bold('File:') + ' ' + formatPath(file));
|
|
54
|
-
console.log(colors.bold('Instruction:') + ' ' + colors.cyan(instruction));
|
|
20
|
+
console.log(colors.dim(`Instruction: ${instruction}`));
|
|
55
21
|
newline();
|
|
56
|
-
// Check if file exists
|
|
57
|
-
const fullPath = join(process.cwd(), file);
|
|
58
|
-
if (!existsSync(fullPath)) {
|
|
59
|
-
displayError(new Error(`File not found: ${file}`), {
|
|
60
|
-
operation: 'edit',
|
|
61
|
-
query: instruction,
|
|
62
|
-
filepath: file,
|
|
63
|
-
showSuggestions: true,
|
|
64
|
-
});
|
|
65
|
-
console.log(info(`Looking for: ${fullPath}`));
|
|
66
|
-
console.log(info('Tip: Use a relative path from your current directory'));
|
|
67
|
-
newline();
|
|
68
|
-
executionTracer.endRun();
|
|
69
|
-
process.exit(1);
|
|
70
|
-
}
|
|
71
|
-
// Start validation context
|
|
72
|
-
const validationContext = agentValidationHelper.startAgentOperation('edit-file-use-case', 'execute', {
|
|
73
|
-
query: instruction,
|
|
74
|
-
codebaseId: codebaseInfo?.codebaseId,
|
|
75
|
-
});
|
|
76
|
-
const spinner = createSpinner('Generating code changes...');
|
|
77
|
-
spinner.start();
|
|
78
22
|
try {
|
|
79
|
-
// Use
|
|
23
|
+
// Use edit-file-use-case
|
|
80
24
|
const editUseCase = container.editFileUseCase;
|
|
81
25
|
const result = await editUseCase.execute({
|
|
82
26
|
filepath: file,
|
|
83
27
|
instruction,
|
|
84
|
-
requirements: [],
|
|
85
|
-
});
|
|
86
|
-
spinner.stop();
|
|
87
|
-
// Create validation summary from edit result
|
|
88
|
-
const filesChanged = result.edit?.filepath ? [result.edit.filepath] : [];
|
|
89
|
-
const filesCreated = result.edit && !result.edit.oldContent ? [result.edit.filepath] : [];
|
|
90
|
-
const filesDeleted = [];
|
|
91
|
-
// Create basic trace summary for review
|
|
92
|
-
const validationResult = await agentValidationHelper.completeAgentOperation(validationContext, result, {
|
|
93
|
-
outcome: result.success ? 'success' : 'failure',
|
|
94
|
-
filesChanged,
|
|
95
|
-
filesCreated,
|
|
96
|
-
filesDeleted,
|
|
97
|
-
errors: result.error ? [result.error] : undefined,
|
|
98
|
-
validationChecks: [
|
|
99
|
-
{
|
|
100
|
-
check: 'Edit applied',
|
|
101
|
-
passed: result.success,
|
|
102
|
-
message: result.success ? 'Edit applied successfully' : result.error,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
check: 'Verification',
|
|
106
|
-
passed: result.verification?.success ?? true,
|
|
107
|
-
message: result.verification?.success
|
|
108
|
-
? 'Verification passed'
|
|
109
|
-
: result.verification?.errors?.join(', ') || 'Verification not performed',
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
metrics: {},
|
|
113
|
-
additionalContext: {
|
|
114
|
-
query: instruction,
|
|
115
|
-
codebaseId: codebaseInfo?.codebaseId,
|
|
116
|
-
filepath: file,
|
|
117
|
-
},
|
|
118
|
-
}).catch(() => {
|
|
119
|
-
// Non-blocking
|
|
120
|
-
return null;
|
|
121
28
|
});
|
|
122
|
-
// Get review decision - single source of truth for userAction
|
|
123
|
-
// Note: EditFileUseCase applies changes immediately, so we review after execution
|
|
124
|
-
// If rejected, we'll rollback using the backup system
|
|
125
|
-
// All CLI commands use this same pattern: getReviewDecision() → use decision.userAction
|
|
126
|
-
const reviewRequested = Boolean(options.review);
|
|
127
|
-
const decision = validationResult
|
|
128
|
-
? await reviewHandler.getReviewDecision(validationResult.summary, reviewRequested)
|
|
129
|
-
: { approved: true, proceed: true, userAction: 'not_required' };
|
|
130
|
-
if (!decision.approved && result.success) {
|
|
131
|
-
console.log(warning('Operation cancelled by user. Rolling back changes...'));
|
|
132
|
-
// Rollback the file changes
|
|
133
|
-
try {
|
|
134
|
-
const { rollbackFile, findLatestBackup } = await import('../../../verification/backup.js');
|
|
135
|
-
const backupPath = await findLatestBackup(fullPath);
|
|
136
|
-
if (backupPath) {
|
|
137
|
-
await rollbackFile(fullPath, backupPath);
|
|
138
|
-
console.log(success('Changes rolled back successfully.'));
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
console.log(warning('⚠️ No backup found - file may have been modified.'));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
catch (rollbackError) {
|
|
145
|
-
console.log(error(`Failed to rollback: ${rollbackError instanceof Error ? rollbackError.message : String(rollbackError)}`));
|
|
146
|
-
console.log(warning('⚠️ Manual intervention may be required.'));
|
|
147
|
-
}
|
|
148
|
-
// Record feedback for rejection
|
|
149
|
-
if (validationResult) {
|
|
150
|
-
agentFeedbackManager.recordFeedback({
|
|
151
|
-
runId: validationContext.runId,
|
|
152
|
-
agentName: 'edit-file-use-case',
|
|
153
|
-
operation: 'execute',
|
|
154
|
-
query: instruction,
|
|
155
|
-
outcome: 'cancelled',
|
|
156
|
-
userAction: decision.userAction,
|
|
157
|
-
filesChanged,
|
|
158
|
-
filesCreated,
|
|
159
|
-
filesDeleted,
|
|
160
|
-
errors: result.error ? [result.error] : undefined,
|
|
161
|
-
validationChecks: validationResult.summary.validationChecks.map(check => ({
|
|
162
|
-
check: check.check,
|
|
163
|
-
passed: check.passed,
|
|
164
|
-
message: check.message,
|
|
165
|
-
})),
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
newline();
|
|
169
|
-
// Update task to REJECTED (non-breaking, silent failure)
|
|
170
|
-
try {
|
|
171
|
-
if (taskId) {
|
|
172
|
-
await updateTaskStatus(taskId, TaskStatus.REJECTED, {
|
|
173
|
-
executionCompletedAt: Date.now(),
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
catch {
|
|
178
|
-
// Silent failure
|
|
179
|
-
}
|
|
180
|
-
executionTracer.endRun();
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
// Record feedback with userAction from review decision
|
|
184
|
-
// Note: validation helper no longer records feedback, so we record it here with proper userAction
|
|
185
|
-
let feedbackId;
|
|
186
|
-
if (validationResult) {
|
|
187
|
-
feedbackId = agentFeedbackManager.recordFeedback({
|
|
188
|
-
runId: validationContext.runId,
|
|
189
|
-
agentName: 'edit-file-use-case',
|
|
190
|
-
operation: 'execute',
|
|
191
|
-
query: instruction,
|
|
192
|
-
outcome: result.success ? 'success' : 'failure',
|
|
193
|
-
userAction: decision.userAction,
|
|
194
|
-
filesChanged,
|
|
195
|
-
filesCreated,
|
|
196
|
-
filesDeleted,
|
|
197
|
-
errors: result.error ? [result.error] : undefined,
|
|
198
|
-
validationChecks: validationResult.summary.validationChecks.map(check => ({
|
|
199
|
-
check: check.check,
|
|
200
|
-
passed: check.passed,
|
|
201
|
-
message: check.message,
|
|
202
|
-
})),
|
|
203
|
-
metrics: {
|
|
204
|
-
duration: Date.now() - (validationContext.startTime || Date.now()),
|
|
205
|
-
},
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
// Update task with results (non-breaking, silent failure)
|
|
209
|
-
try {
|
|
210
|
-
if (taskId) {
|
|
211
|
-
const finalStatus = result.success
|
|
212
|
-
? (decision.userAction === 'approved' || decision.userAction === 'not_required'
|
|
213
|
-
? TaskStatus.COMPLETED
|
|
214
|
-
: TaskStatus.NEEDS_REVIEW)
|
|
215
|
-
: TaskStatus.FAILED;
|
|
216
|
-
await updateTaskWithResults(taskId, {
|
|
217
|
-
filesChanged,
|
|
218
|
-
filesCreated,
|
|
219
|
-
filesDeleted,
|
|
220
|
-
status: finalStatus,
|
|
221
|
-
executionCompletedAt: Date.now(),
|
|
222
|
-
agentFeedbackId: feedbackId,
|
|
223
|
-
error: result.error ? {
|
|
224
|
-
type: 'execution',
|
|
225
|
-
message: result.error,
|
|
226
|
-
file: file,
|
|
227
|
-
} : undefined,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
catch {
|
|
232
|
-
// Silent failure
|
|
233
|
-
}
|
|
234
|
-
newline();
|
|
235
29
|
if (result.success) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
if (result.
|
|
239
|
-
|
|
240
|
-
const criticalFindings = result.securityFindings.filter((f) => f.severity === 'critical' || f.severity === 'high');
|
|
241
|
-
if (criticalFindings.length > 0) {
|
|
242
|
-
console.log(warning(`⚠️ ${criticalFindings.length} security finding(s) detected:`));
|
|
243
|
-
criticalFindings.slice(0, 3).forEach((finding) => {
|
|
244
|
-
console.log(colors.yellow(` • ${finding.message || finding.description}`));
|
|
245
|
-
});
|
|
246
|
-
newline();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
// Display license findings if any
|
|
250
|
-
if (result.licenseFindings && result.licenseFindings.length > 0) {
|
|
251
|
-
sectionHeader('License Scan');
|
|
252
|
-
const criticalFindings = result.licenseFindings.filter((f) => f.severity === 'critical' || f.severity === 'high');
|
|
253
|
-
if (criticalFindings.length > 0) {
|
|
254
|
-
console.log(warning(`⚠️ ${criticalFindings.length} license conflict(s) detected:`));
|
|
255
|
-
criticalFindings.slice(0, 3).forEach((finding) => {
|
|
256
|
-
console.log(colors.yellow(` • ${finding.license} license detected`));
|
|
257
|
-
});
|
|
258
|
-
newline();
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
console.log(success('Edit applied successfully'));
|
|
262
|
-
if (result.edit?.filepath) {
|
|
263
|
-
console.log(colors.dim(`File: ${formatPath(result.edit.filepath)}`));
|
|
30
|
+
console.log(colors.bold('Changes:'));
|
|
31
|
+
console.log(success(`✓ Applied changes to ${file}`));
|
|
32
|
+
if (result.edit) {
|
|
33
|
+
console.log(colors.dim(result.edit));
|
|
264
34
|
}
|
|
265
35
|
newline();
|
|
36
|
+
console.log(colors.dim('Note: Changes have been applied. Use "codehere undo" to revert if needed.'));
|
|
266
37
|
}
|
|
267
38
|
else {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
executionCompletedAt: Date.now(),
|
|
273
|
-
error: {
|
|
274
|
-
type: 'execution',
|
|
275
|
-
message: result.error || 'Edit failed',
|
|
276
|
-
file: file,
|
|
277
|
-
},
|
|
278
|
-
});
|
|
279
|
-
}
|
|
39
|
+
console.log(colors.bold('Result:'));
|
|
40
|
+
console.log(error(`✗ Failed to edit ${file}`));
|
|
41
|
+
if (result.error) {
|
|
42
|
+
console.log(error(result.error));
|
|
280
43
|
}
|
|
281
|
-
catch {
|
|
282
|
-
// Silent failure
|
|
283
|
-
}
|
|
284
|
-
displayError(new Error(result.error || 'Edit failed'), {
|
|
285
|
-
operation: 'edit',
|
|
286
|
-
query: instruction,
|
|
287
|
-
filepath: file,
|
|
288
|
-
showSuggestions: true,
|
|
289
|
-
});
|
|
290
|
-
executionTracer.endRun();
|
|
291
|
-
process.exit(1);
|
|
292
44
|
}
|
|
293
45
|
}
|
|
294
46
|
catch (err) {
|
|
295
|
-
|
|
296
|
-
displayError(err
|
|
297
|
-
operation: 'edit',
|
|
298
|
-
query: instruction,
|
|
299
|
-
filepath: file,
|
|
300
|
-
showSuggestions: true,
|
|
301
|
-
});
|
|
302
|
-
executionTracer.endRun();
|
|
47
|
+
console.log(colors.bold('Result:'));
|
|
48
|
+
displayError(err);
|
|
303
49
|
process.exit(1);
|
|
304
50
|
}
|
|
305
|
-
|
|
306
|
-
executionTracer.endRun();
|
|
307
|
-
}
|
|
51
|
+
newline();
|
|
308
52
|
}
|
|
309
53
|
//# sourceMappingURL=fix-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fix-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/fix-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fix-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/fix-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAW,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAY,EACZ,WAAmB,EACnB,OAEC;IAED,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IAEjC,SAAS;IACT,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,WAAW,EAAE,CAAC,CAAC,CAAC;IACvD,OAAO,EAAE,CAAC;IAEV,IAAI,CAAC;QACH,yBAAyB;QACzB,MAAM,WAAW,GAAG,SAAS,CAAC,eAAe,CAAC;QAE9C,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC;YACvC,QAAQ,EAAE,IAAI;YACd,WAAW;SACZ,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC,CAAC;YACrD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YACvC,CAAC;YACD,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC,CAAC;QACvG,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC;YAC/C,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;gBACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QACpC,YAAY,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Models Command
|
|
3
|
+
* List, search, and get info about available AI models
|
|
4
|
+
*/
|
|
5
|
+
export interface ModelsCommandOptions {
|
|
6
|
+
list?: boolean;
|
|
7
|
+
search?: string;
|
|
8
|
+
info?: string;
|
|
9
|
+
provider?: string;
|
|
10
|
+
json?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function executeModelsCommand(options: ModelsCommandOptions): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=models-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/models-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BvF"}
|