@lisa.ai/agent 1.0.6 → 1.0.8
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.
|
@@ -46,8 +46,9 @@ async function coverageCommand(command, modelProvider, attempt = 1, maxRetries =
|
|
|
46
46
|
let executionPassed = true;
|
|
47
47
|
try {
|
|
48
48
|
// 1. Run the test command which should ideally produce coverage-summary.json
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
// Use 'inherit' so that long-running test commands (like Angular/Karma) print their progress
|
|
50
|
+
// in real-time directly to the user's terminal instead of appearing frozen.
|
|
51
|
+
(0, child_process_1.execSync)(command, { encoding: 'utf-8', stdio: 'inherit' });
|
|
51
52
|
console.log(`\n✅ [Lisa.ai Coverage] Tests passed successfully on attempt ${attempt}.`);
|
|
52
53
|
}
|
|
53
54
|
catch (error) {
|
|
@@ -79,11 +79,6 @@ ${fileContent}
|
|
|
79
79
|
2. Do not suppress TypeScript errors with @ts-ignore or any type assertions unless absolutely unavoidable.
|
|
80
80
|
3. Fix the underlying type or logic issue.
|
|
81
81
|
4. Return the code wrapped in a markdown code block (\`\`\`typescript ... \`\`\`). Do not include any explanation or intro text.`;
|
|
82
|
-
// Provide a mock bypass if keys are not present to test the Git loop
|
|
83
|
-
if (!process.env.GOOGLE_GENERATIVE_AI_API_KEY && !process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY) {
|
|
84
|
-
console.log(`[Lisa.ai Warning] No API keys found in environment. Using mock LLM fix for testing.`);
|
|
85
|
-
return `const missingImportStr: string = "42";\nconsole.log(missingImportStr);\n`;
|
|
86
|
-
}
|
|
87
82
|
const { text } = await (0, ai_1.generateText)({
|
|
88
83
|
model,
|
|
89
84
|
prompt,
|
|
@@ -105,10 +100,6 @@ ${sourceFileContent}
|
|
|
105
100
|
2. Do not include any explanation or intro text.
|
|
106
101
|
3. Include all necessary imports assuming Jest is available.
|
|
107
102
|
4. Aim for 100% logic coverage.`;
|
|
108
|
-
// Provide a mock bypass if keys are not present
|
|
109
|
-
if (!process.env.GOOGLE_GENERATIVE_AI_API_KEY && !process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY) {
|
|
110
|
-
return `import { something } from './${path.basename(sourceFilePath, '.ts')}';\n\ndescribe('Auto-Generated Test', () => { \n it('should pass dynamically', () => { \n expect(true).toBe(true); \n }); \n});\n`;
|
|
111
|
-
}
|
|
112
103
|
const { text } = await (0, ai_1.generateText)({
|
|
113
104
|
model,
|
|
114
105
|
prompt,
|