dsh-taskboard 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -4
- package/lib/client.js +255 -28
- package/lib/host/execution.js +5 -3
- package/lib/host/execution.js.map +1 -1
- package/lib/host/templates.js +21 -1
- package/lib/host/templates.js.map +1 -1
- package/lib/host/tools.js +7 -3
- package/lib/host/tools.js.map +1 -1
- package/lib/shared/api.js.map +1 -1
- package/lib/shared/protocol.js +10 -7
- package/lib/shared/protocol.js.map +1 -1
- package/package.json +1 -1
- package/src/client/board/TaskBoard.tsx +2 -0
- package/src/client/board/TaskCard.tsx +43 -1
- package/src/client/board/TaskDetail.tsx +32 -6
- package/src/client/board/TaskFormModal.tsx +116 -8
- package/src/client/board/TemplateManager.tsx +4 -1
- package/src/client/controller.ts +29 -5
- package/src/client/index.ts +36 -5
- package/src/client/styles.ts +86 -8
- package/src/host/execution.ts +13 -5
- package/src/host/templates.ts +17 -1
- package/src/host/tools.ts +4 -3
- package/src/shared/api.ts +5 -5
- package/src/shared/protocol.ts +12 -8
- package/src/shared/version.ts +1 -1
package/src/shared/protocol.ts
CHANGED
|
@@ -378,6 +378,8 @@ export type ExecutionRecord = {
|
|
|
378
378
|
export type TaskModel = {
|
|
379
379
|
provider: string
|
|
380
380
|
model: string
|
|
381
|
+
/** Thinking intensity / reasoning effort (optional; e.g. 'low', 'medium', 'high', 'none'). */
|
|
382
|
+
reasoningEffort?: string
|
|
381
383
|
}
|
|
382
384
|
|
|
383
385
|
/** One task on the board. */
|
|
@@ -385,7 +387,7 @@ export type TaskRecord = {
|
|
|
385
387
|
id: string
|
|
386
388
|
title: string
|
|
387
389
|
description: string
|
|
388
|
-
/**
|
|
390
|
+
/** Extra execution prompt; the execution session receives title+description+prompt. */
|
|
389
391
|
prompt: string
|
|
390
392
|
/** Owning project: a DSH workspace id. */
|
|
391
393
|
workspaceId: string
|
|
@@ -598,13 +600,14 @@ export function normalizeExecution(
|
|
|
598
600
|
}
|
|
599
601
|
|
|
600
602
|
/**
|
|
601
|
-
* The effective prompt of a task:
|
|
603
|
+
* The effective prompt of a task: title+description, with the explicit
|
|
604
|
+
* prompt appended when set — title+description+prompt.
|
|
602
605
|
* @param task - the task.
|
|
603
606
|
*/
|
|
604
607
|
export function effectivePrompt(task: TaskRecord): string {
|
|
605
|
-
if (task.prompt.length > 0) return task.prompt
|
|
606
608
|
const head = task.title
|
|
607
|
-
|
|
609
|
+
const body = task.description.length > 0 ? `${head}\n\n${task.description}` : head
|
|
610
|
+
return task.prompt.length > 0 ? `${body}\n\n${task.prompt}` : body
|
|
608
611
|
}
|
|
609
612
|
|
|
610
613
|
/**
|
|
@@ -637,8 +640,8 @@ export function syncClaim(task: TaskRecord, to: TaskStatus, now: number, holder?
|
|
|
637
640
|
}
|
|
638
641
|
|
|
639
642
|
/**
|
|
640
|
-
* Validate and normalize a pinned model: `{ provider, model }`,
|
|
641
|
-
* non-empty trimmed strings.
|
|
643
|
+
* Validate and normalize a pinned model: `{ provider, model, reasoningEffort? }`,
|
|
644
|
+
* provider and model must be non-empty trimmed strings.
|
|
642
645
|
* @param raw - the raw input.
|
|
643
646
|
* @returns the normalized model.
|
|
644
647
|
* @throws when the shape or the fields are invalid.
|
|
@@ -647,7 +650,7 @@ export function normalizeModel(raw: unknown): TaskModel {
|
|
|
647
650
|
if (typeof raw !== 'object' || raw === null) {
|
|
648
651
|
throw new Error('model must be { provider: string, model: string }')
|
|
649
652
|
}
|
|
650
|
-
const { provider, model } = raw as { provider?: unknown; model?: unknown }
|
|
653
|
+
const { provider, model, reasoningEffort } = raw as { provider?: unknown; model?: unknown; reasoningEffort?: unknown }
|
|
651
654
|
if (typeof provider !== 'string' || typeof model !== 'string') {
|
|
652
655
|
throw new Error('model must be { provider: string, model: string }')
|
|
653
656
|
}
|
|
@@ -656,7 +659,8 @@ export function normalizeModel(raw: unknown): TaskModel {
|
|
|
656
659
|
if (p.length === 0 || m.length === 0) {
|
|
657
660
|
throw new Error('model.provider and model.model must be non-empty strings')
|
|
658
661
|
}
|
|
659
|
-
|
|
662
|
+
const eff = typeof reasoningEffort === 'string' && reasoningEffort.trim().length > 0 ? reasoningEffort.trim() : undefined
|
|
663
|
+
return { provider: p, model: m, ...(eff !== undefined ? { reasoningEffort: eff } : {}) }
|
|
660
664
|
}
|
|
661
665
|
|
|
662
666
|
// ---------------------------------------------------------------------------
|
package/src/shared/version.ts
CHANGED