Compare commits

...

3 Commits

Author SHA1 Message Date
Ralph Khreish
d482bee358 chore: fix tests 2025-08-22 18:15:30 +02:00
Ralph Khreish
fa5de356da chore: fix format 2025-08-22 18:07:32 +02:00
Ralph Khreish
ade9f94e73 fix: temporarily disable streaming 2025-08-22 17:01:59 +02:00
5 changed files with 37 additions and 49 deletions

View File

@@ -0,0 +1,5 @@
---
"task-master-ai": patch
---
Temporarily disable streaming for improved model compatibility - will be re-enabled in upcoming release

View File

@@ -9,17 +9,9 @@
"engines": { "engines": {
"vscode": "^1.93.0" "vscode": "^1.93.0"
}, },
"categories": [ "categories": ["AI", "Visualization", "Education", "Other"],
"AI",
"Visualization",
"Education",
"Other"
],
"main": "./dist/extension.js", "main": "./dist/extension.js",
"activationEvents": [ "activationEvents": ["onStartupFinished", "workspaceContains:.taskmaster/**"],
"onStartupFinished",
"workspaceContains:.taskmaster/**"
],
"contributes": { "contributes": {
"viewsContainers": { "viewsContainers": {
"activitybar": [ "activitybar": [
@@ -147,11 +139,7 @@
}, },
"taskmaster.ui.theme": { "taskmaster.ui.theme": {
"type": "string", "type": "string",
"enum": [ "enum": ["auto", "light", "dark"],
"auto",
"light",
"dark"
],
"default": "auto", "default": "auto",
"description": "UI theme preference" "description": "UI theme preference"
}, },
@@ -212,12 +200,7 @@
}, },
"taskmaster.debug.logLevel": { "taskmaster.debug.logLevel": {
"type": "string", "type": "string",
"enum": [ "enum": ["error", "warn", "info", "debug"],
"error",
"warn",
"info",
"debug"
],
"default": "info", "default": "info",
"description": "Logging level" "description": "Logging level"
}, },

View File

@@ -9,10 +9,7 @@
"task-master-mcp": "mcp-server/server.js", "task-master-mcp": "mcp-server/server.js",
"task-master-ai": "mcp-server/server.js" "task-master-ai": "mcp-server/server.js"
}, },
"workspaces": [ "workspaces": ["apps/*", "."],
"apps/*",
"."
],
"scripts": { "scripts": {
"test": "node --experimental-vm-modules node_modules/.bin/jest", "test": "node --experimental-vm-modules node_modules/.bin/jest",
"test:fails": "node --experimental-vm-modules node_modules/.bin/jest --onlyFailures", "test:fails": "node --experimental-vm-modules node_modules/.bin/jest --onlyFailures",

View File

@@ -63,8 +63,15 @@ export class PrdParseConfig {
this.targetTag = this.tag || getCurrentTag(this.projectRoot) || 'master'; this.targetTag = this.tag || getCurrentTag(this.projectRoot) || 'master';
this.isMCP = !!this.mcpLog; this.isMCP = !!this.mcpLog;
this.outputFormat = this.isMCP && !this.reportProgress ? 'json' : 'text'; this.outputFormat = this.isMCP && !this.reportProgress ? 'json' : 'text';
// Feature flag: Temporarily disable streaming, use generateObject instead
// TODO: Re-enable streaming once issues are resolved
const ENABLE_STREAMING = false;
this.useStreaming = this.useStreaming =
typeof this.reportProgress === 'function' || this.outputFormat === 'text'; ENABLE_STREAMING &&
(typeof this.reportProgress === 'function' ||
this.outputFormat === 'text');
} }
/** /**

View File

@@ -795,7 +795,7 @@ describe('parsePRD', () => {
}); });
describe('Streaming vs Non-Streaming Modes', () => { describe('Streaming vs Non-Streaming Modes', () => {
test('should use streaming when reportProgress function is provided', async () => { test('should use non-streaming when reportProgress function is provided (streaming disabled)', async () => {
// Setup mocks to simulate normal conditions (no existing output file) // Setup mocks to simulate normal conditions (no existing output file)
fs.default.existsSync.mockImplementation((path) => { fs.default.existsSync.mockImplementation((path) => {
if (path === 'tasks/tasks.json') return false; // Output file doesn't exist if (path === 'tasks/tasks.json') return false; // Output file doesn't exist
@@ -815,23 +815,20 @@ describe('parsePRD', () => {
}; };
JSONParser.mockReturnValue(mockParser); JSONParser.mockReturnValue(mockParser);
// Call the function with reportProgress to trigger streaming path // Call the function with reportProgress - with streaming disabled, should use non-streaming
const result = await parsePRD('path/to/prd.txt', 'tasks/tasks.json', 3, { const result = await parsePRD('path/to/prd.txt', 'tasks/tasks.json', 3, {
reportProgress: mockReportProgress reportProgress: mockReportProgress
}); });
// Verify streamObjectService was called (streaming path) // With streaming disabled, should use generateObjectService instead
expect(streamObjectService).toHaveBeenCalled(); expect(generateObjectService).toHaveBeenCalled();
// Verify generateObjectService was NOT called (non-streaming path) // Verify streamObjectService was NOT called (streaming is disabled)
expect(generateObjectService).not.toHaveBeenCalled(); expect(streamObjectService).not.toHaveBeenCalled();
// Verify progress reporting was called // Verify progress reporting was still called
expect(mockReportProgress).toHaveBeenCalled(); expect(mockReportProgress).toHaveBeenCalled();
// We no longer use parseStream with streamObject
// expect(parseStream).toHaveBeenCalled();
// Verify result structure // Verify result structure
expect(result).toEqual({ expect(result).toEqual({
success: true, success: true,
@@ -840,7 +837,7 @@ describe('parsePRD', () => {
}); });
}); });
test('should fallback to non-streaming when streaming fails with specific errors', async () => { test.skip('should fallback to non-streaming when streaming fails with specific errors (streaming disabled)', async () => {
// Setup mocks to simulate normal conditions (no existing output file) // Setup mocks to simulate normal conditions (no existing output file)
fs.default.existsSync.mockImplementation((path) => { fs.default.existsSync.mockImplementation((path) => {
if (path === 'tasks/tasks.json') return false; // Output file doesn't exist if (path === 'tasks/tasks.json') return false; // Output file doesn't exist
@@ -954,7 +951,7 @@ describe('parsePRD', () => {
}); });
}); });
test('should handle research flag with streaming', async () => { test('should handle research flag with non-streaming (streaming disabled)', async () => {
// Setup mocks to simulate normal conditions // Setup mocks to simulate normal conditions
fs.default.existsSync.mockImplementation((path) => { fs.default.existsSync.mockImplementation((path) => {
if (path === 'tasks/tasks.json') return false; // Output file doesn't exist if (path === 'tasks/tasks.json') return false; // Output file doesn't exist
@@ -965,19 +962,19 @@ describe('parsePRD', () => {
// Mock progress reporting function // Mock progress reporting function
const mockReportProgress = jest.fn(() => Promise.resolve()); const mockReportProgress = jest.fn(() => Promise.resolve());
// Call with streaming + research // Call with reportProgress + research - with streaming disabled, should use non-streaming
await parsePRD('path/to/prd.txt', 'tasks/tasks.json', 3, { await parsePRD('path/to/prd.txt', 'tasks/tasks.json', 3, {
reportProgress: mockReportProgress, reportProgress: mockReportProgress,
research: true research: true
}); });
// Verify streaming path was used with research role // With streaming disabled, should use generateObjectService with research role
expect(streamObjectService).toHaveBeenCalledWith( expect(generateObjectService).toHaveBeenCalledWith(
expect.objectContaining({ expect.objectContaining({
role: 'research' role: 'research'
}) })
); );
expect(generateObjectService).not.toHaveBeenCalled(); expect(streamObjectService).not.toHaveBeenCalled();
}); });
test('should handle research flag with non-streaming', async () => { test('should handle research flag with non-streaming', async () => {
@@ -1009,7 +1006,7 @@ describe('parsePRD', () => {
expect(streamObjectService).not.toHaveBeenCalled(); expect(streamObjectService).not.toHaveBeenCalled();
}); });
test('should use streaming for CLI text mode even without reportProgress', async () => { test('should use non-streaming for CLI text mode (streaming disabled)', async () => {
// Setup mocks to simulate normal conditions // Setup mocks to simulate normal conditions
fs.default.existsSync.mockImplementation((path) => { fs.default.existsSync.mockImplementation((path) => {
if (path === 'tasks/tasks.json') return false; // Output file doesn't exist if (path === 'tasks/tasks.json') return false; // Output file doesn't exist
@@ -1020,13 +1017,12 @@ describe('parsePRD', () => {
// Call without mcpLog and without reportProgress (CLI text mode) // Call without mcpLog and without reportProgress (CLI text mode)
const result = await parsePRD('path/to/prd.txt', 'tasks/tasks.json', 3); const result = await parsePRD('path/to/prd.txt', 'tasks/tasks.json', 3);
// Verify streaming path was used (no mcpLog means CLI text mode, which should use streaming) // With streaming disabled, should use generateObjectService even in CLI text mode
expect(streamObjectService).toHaveBeenCalled(); expect(generateObjectService).toHaveBeenCalled();
expect(generateObjectService).not.toHaveBeenCalled(); expect(streamObjectService).not.toHaveBeenCalled();
// Verify progress tracker components were called for CLI mode // Progress tracker components may still be called for CLI mode display
expect(createParsePrdTracker).toHaveBeenCalled(); // but the actual parsing uses non-streaming
expect(displayParsePrdStart).toHaveBeenCalled();
expect(result).toEqual({ expect(result).toEqual({
success: true, success: true,