mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
- Settings: new Providers tab with full CRUD, activation, and connectivity test; Model tab shows active provider name; General tab simplified - Tasks: new CLI Tasks page displaying task lists from ~/.claude/tasks/ with status, owner, and dependency (blocks/blockedBy) visualization - NewTaskModal: add Advanced options (model, permission mode, working dir) - Backend: fix TaskService to parse CLI V2 task format; extend /api/tasks with /lists endpoint for grouped queries - Fix ModelInfo.context type from number to string Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
864 B
TypeScript
29 lines
864 B
TypeScript
import { api } from './client'
|
|
import type { CLITask, TaskListSummary } from '../types/cliTask'
|
|
|
|
type TaskListsResponse = { lists: TaskListSummary[] }
|
|
type TasksResponse = { tasks: CLITask[] }
|
|
type TaskResponse = { task: CLITask }
|
|
|
|
export const cliTasksApi = {
|
|
/** List all task lists with summaries */
|
|
listTaskLists() {
|
|
return api.get<TaskListsResponse>('/api/tasks/lists')
|
|
},
|
|
|
|
/** Get all tasks for a specific task list */
|
|
getTasksForList(taskListId: string) {
|
|
return api.get<TasksResponse>(`/api/tasks/lists/${encodeURIComponent(taskListId)}`)
|
|
},
|
|
|
|
/** Get a single task */
|
|
getTask(taskListId: string, taskId: string) {
|
|
return api.get<TaskResponse>(`/api/tasks/lists/${encodeURIComponent(taskListId)}/${taskId}`)
|
|
},
|
|
|
|
/** List all tasks across all task lists */
|
|
listAll() {
|
|
return api.get<TasksResponse>('/api/tasks')
|
|
},
|
|
}
|