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

View File

@@ -9,10 +9,7 @@
"task-master-mcp": "mcp-server/server.js",
"task-master-ai": "mcp-server/server.js"
},
"workspaces": [
"apps/*",
"."
],
"workspaces": ["apps/*", "."],
"scripts": {
"test": "node --experimental-vm-modules node_modules/.bin/jest",
"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.isMCP = !!this.mcpLog;
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 =
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', () => {
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)
fs.default.existsSync.mockImplementation((path) => {
if (path === 'tasks/tasks.json') return false; // Output file doesn't exist
@@ -815,23 +815,20 @@ describe('parsePRD', () => {
};
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, {
reportProgress: mockReportProgress
});
// Verify streamObjectService was called (streaming path)
expect(streamObjectService).toHaveBeenCalled();
// With streaming disabled, should use generateObjectService instead
expect(generateObjectService).toHaveBeenCalled();
// Verify generateObjectService was NOT called (non-streaming path)
expect(generateObjectService).not.toHaveBeenCalled();
// Verify streamObjectService was NOT called (streaming is disabled)
expect(streamObjectService).not.toHaveBeenCalled();
// Verify progress reporting was called
// Verify progress reporting was still called
expect(mockReportProgress).toHaveBeenCalled();
// We no longer use parseStream with streamObject
// expect(parseStream).toHaveBeenCalled();
// Verify result structure
expect(result).toEqual({
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)
fs.default.existsSync.mockImplementation((path) => {
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
fs.default.existsSync.mockImplementation((path) => {
if (path === 'tasks/tasks.json') return false; // Output file doesn't exist
@@ -965,19 +962,19 @@ describe('parsePRD', () => {
// Mock progress reporting function
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, {
reportProgress: mockReportProgress,
research: true
});
// Verify streaming path was used with research role
expect(streamObjectService).toHaveBeenCalledWith(
// With streaming disabled, should use generateObjectService with research role
expect(generateObjectService).toHaveBeenCalledWith(
expect.objectContaining({
role: 'research'
})
);
expect(generateObjectService).not.toHaveBeenCalled();
expect(streamObjectService).not.toHaveBeenCalled();
});
test('should handle research flag with non-streaming', async () => {
@@ -1009,7 +1006,7 @@ describe('parsePRD', () => {
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
fs.default.existsSync.mockImplementation((path) => {
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)
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)
expect(streamObjectService).toHaveBeenCalled();
expect(generateObjectService).not.toHaveBeenCalled();
// With streaming disabled, should use generateObjectService even in CLI text mode
expect(generateObjectService).toHaveBeenCalled();
expect(streamObjectService).not.toHaveBeenCalled();
// Verify progress tracker components were called for CLI mode
expect(createParsePrdTracker).toHaveBeenCalled();
expect(displayParsePrdStart).toHaveBeenCalled();
// Progress tracker components may still be called for CLI mode display
// but the actual parsing uses non-streaming
expect(result).toEqual({
success: true,