refactor(tasks): consolidate task-list path resolution to use getTaskDir
This commit is contained in:
parent
ace2688186
commit
d66e39a887
@ -4,7 +4,7 @@ import { existsSync, readdirSync } from "fs"
|
||||
import type { OhMyOpenCodeConfig } from "../../config/schema"
|
||||
import type { TaskObject, TaskStatus } from "./types"
|
||||
import { TaskObjectSchema } from "./types"
|
||||
import { readJsonSafe } from "../../features/claude-tasks/storage"
|
||||
import { readJsonSafe, getTaskDir } from "../../features/claude-tasks/storage"
|
||||
|
||||
interface TaskSummary {
|
||||
id: string
|
||||
@ -23,9 +23,7 @@ For each task's blockedBy field, filters to only include unresolved (non-complet
|
||||
Returns summary format: id, subject, status, owner, blockedBy (not full description).`,
|
||||
args: {},
|
||||
execute: async (): Promise<string> => {
|
||||
const tasksConfig = config.sisyphus?.tasks
|
||||
const storagePath = tasksConfig?.storage_path ?? ".sisyphus/tasks"
|
||||
const taskDir = storagePath.startsWith("/") ? storagePath : join(process.cwd(), storagePath)
|
||||
const taskDir = getTaskDir(config)
|
||||
|
||||
if (!existsSync(taskDir)) {
|
||||
return JSON.stringify({ tasks: [] })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user