mirror of
https://github.com/eyaltoledano/claude-task-master.git
synced 2026-01-30 06:12:05 +00:00
fix: get storage type better with tm-core (#1347)
This commit is contained in:
@@ -127,10 +127,8 @@ export class NextCommand extends Command {
|
||||
const task = await this.tmCore.tasks.getNext(options.tag);
|
||||
|
||||
// Get storage type and active tag
|
||||
const storageType = this.tmCore.config.getStorageConfig().type;
|
||||
if (storageType === 'auto') {
|
||||
throw new Error('Storage type must be resolved before use');
|
||||
}
|
||||
const storageType = this.tmCore.tasks.getStorageType();
|
||||
|
||||
const activeTag = options.tag || this.tmCore.config.getActiveTag();
|
||||
|
||||
return {
|
||||
|
||||
@@ -164,10 +164,7 @@ export class SetStatusCommand extends Command {
|
||||
this.lastResult = {
|
||||
success: true,
|
||||
updatedTasks,
|
||||
storageType: this.tmCore.config.getStorageConfig().type as Exclude<
|
||||
StorageType,
|
||||
'auto'
|
||||
>
|
||||
storageType: this.tmCore.tasks.getStorageType()
|
||||
};
|
||||
|
||||
// Display results
|
||||
|
||||
@@ -156,7 +156,7 @@ export class ShowCommand extends Command {
|
||||
const result = await this.tmCore.tasks.get(taskId);
|
||||
|
||||
// Get storage type
|
||||
const storageType = this.tmCore.config.getStorageConfig().type;
|
||||
const storageType = this.tmCore.tasks.getStorageType();
|
||||
|
||||
return {
|
||||
task: result.task,
|
||||
@@ -189,13 +189,13 @@ export class ShowCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
// Get storage type
|
||||
const storageType = this.tmCore.config.getStorageConfig().type;
|
||||
// Get storage type (resolved, not config value)
|
||||
const storageType = this.tmCore.tasks.getStorageType();
|
||||
|
||||
return {
|
||||
tasks,
|
||||
notFound,
|
||||
storageType: storageType as Exclude<StorageType, 'auto'>
|
||||
storageType
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -144,10 +144,10 @@ export class StartCommand extends Command {
|
||||
await this.executeChildProcess(coreResult.command);
|
||||
}
|
||||
|
||||
// Convert core result to CLI result with storage type
|
||||
// Convert core result to CLI result with storage type (resolved, not config value)
|
||||
const result: StartCommandResult = {
|
||||
...coreResult,
|
||||
storageType: this.tmCore?.config.getStorageConfig().type
|
||||
storageType: this.tmCore?.tasks.getStorageType()
|
||||
};
|
||||
|
||||
// Store result for programmatic access
|
||||
|
||||
Reference in New Issue
Block a user