feat: add support for code context in more commands (#1162)
* feat: add support for claude code context - code context for: - add-task - update-subtask - update-task - update * feat: fix CI and format + refactor * chore: format * chore: fix broken tests * chore: fix test
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
markMigrationForNotice
|
||||
} from '../utils.js';
|
||||
import { generateObjectService } from '../ai-services-unified.js';
|
||||
import { getDefaultPriority } from '../config-manager.js';
|
||||
import { getDefaultPriority, isClaudeCode } from '../config-manager.js';
|
||||
import { getPromptManager } from '../prompt-manager.js';
|
||||
import ContextGatherer from '../utils/contextGatherer.js';
|
||||
import generateTaskFiles from './generate-task-files.js';
|
||||
@@ -425,7 +425,9 @@ async function addTask(
|
||||
contextFromArgs,
|
||||
useResearch,
|
||||
priority: effectivePriority,
|
||||
dependencies: numericDependencies
|
||||
dependencies: numericDependencies,
|
||||
isClaudeCode: isClaudeCode(useResearch, projectRoot),
|
||||
projectRoot: projectRoot
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ import {
|
||||
getDebugFlag,
|
||||
getProjectName,
|
||||
getMainProvider,
|
||||
getResearchProvider
|
||||
getResearchProvider,
|
||||
isClaudeCode
|
||||
} from '../config-manager.js';
|
||||
import { getPromptManager } from '../prompt-manager.js';
|
||||
import {
|
||||
@@ -415,16 +416,12 @@ async function analyzeTaskComplexity(options, context = {}) {
|
||||
const promptManager = getPromptManager();
|
||||
|
||||
// Check if Claude Code is being used as the provider
|
||||
const currentProvider = useResearch
|
||||
? getResearchProvider(projectRoot)
|
||||
: getMainProvider(projectRoot);
|
||||
const isClaudeCode = currentProvider === CUSTOM_PROVIDERS.CLAUDE_CODE;
|
||||
|
||||
const promptParams = {
|
||||
tasks: tasksData.tasks,
|
||||
gatheredContext: gatheredContext || '',
|
||||
useResearch: useResearch,
|
||||
isClaudeCode: isClaudeCode,
|
||||
isClaudeCode: isClaudeCode(useResearch, projectRoot),
|
||||
projectRoot: projectRoot || ''
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
flattenTasksWithSubtasks
|
||||
} from '../utils.js';
|
||||
import { generateTextService } from '../ai-services-unified.js';
|
||||
import { getDebugFlag } from '../config-manager.js';
|
||||
import { getDebugFlag, isClaudeCode } from '../config-manager.js';
|
||||
import { getPromptManager } from '../prompt-manager.js';
|
||||
import generateTaskFiles from './generate-task-files.js';
|
||||
import { ContextGatherer } from '../utils/contextGatherer.js';
|
||||
@@ -231,7 +231,9 @@ async function updateSubtaskById(
|
||||
currentDetails: subtask.details || '(No existing details)',
|
||||
updatePrompt: prompt,
|
||||
useResearch: useResearch,
|
||||
gatheredContext: gatheredContext || ''
|
||||
gatheredContext: gatheredContext || '',
|
||||
isClaudeCode: isClaudeCode(useResearch, projectRoot),
|
||||
projectRoot: projectRoot
|
||||
};
|
||||
|
||||
const variantKey = useResearch ? 'research' : 'default';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
} from '../ui.js';
|
||||
|
||||
import { generateTextService } from '../ai-services-unified.js';
|
||||
import { getDebugFlag, isApiKeySet } from '../config-manager.js';
|
||||
import { getDebugFlag, isApiKeySet, isClaudeCode } from '../config-manager.js';
|
||||
import { getPromptManager } from '../prompt-manager.js';
|
||||
import { ContextGatherer } from '../utils/contextGatherer.js';
|
||||
import { FuzzyTaskSearch } from '../utils/fuzzyTaskSearch.js';
|
||||
@@ -453,7 +453,9 @@ async function updateTaskById(
|
||||
appendMode: appendMode,
|
||||
useResearch: useResearch,
|
||||
currentDetails: taskToUpdate.details || '(No existing details)',
|
||||
gatheredContext: gatheredContext || ''
|
||||
gatheredContext: gatheredContext || '',
|
||||
isClaudeCode: isClaudeCode(useResearch, projectRoot),
|
||||
projectRoot: projectRoot
|
||||
};
|
||||
|
||||
const variantKey = appendMode
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
displayAiUsageSummary
|
||||
} from '../ui.js';
|
||||
|
||||
import { getDebugFlag } from '../config-manager.js';
|
||||
import { getDebugFlag, isClaudeCode } from '../config-manager.js';
|
||||
import { getPromptManager } from '../prompt-manager.js';
|
||||
import generateTaskFiles from './generate-task-files.js';
|
||||
import { generateTextService } from '../ai-services-unified.js';
|
||||
@@ -435,7 +435,9 @@ async function updateTasks(
|
||||
tasks: tasksToUpdate,
|
||||
updatePrompt: prompt,
|
||||
useResearch,
|
||||
projectContext: gatheredContext
|
||||
projectContext: gatheredContext,
|
||||
isClaudeCode: isClaudeCode(useResearch, projectRoot),
|
||||
projectRoot: projectRoot
|
||||
}
|
||||
);
|
||||
// --- End Build Prompts ---
|
||||
|
||||
Reference in New Issue
Block a user