@fish-under-sea/dsh-client-ui-task-board-fish 1.0.2 → 2.0.0
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/NOTICE +1 -1
- package/README.en.md +6 -4
- package/README.md +6 -4
- package/README.zh.md +6 -4
- package/icon.png +0 -0
- package/lib/client.js +4428 -1508
- package/lib/client.js.map +1 -1
- package/lib/index.js +2670 -496
- package/lib/types/client/CardDefaultPresetField.d.ts +35 -0
- package/lib/types/client/PluginSettingsCard.d.ts +130 -19
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/TaskBoardSettingsCard.d.ts +63 -0
- package/lib/types/client/board/AttachmentField.d.ts +70 -0
- package/lib/types/client/board/ExecutionLog.d.ts +24 -0
- package/lib/types/client/board/ReasoningEffortField.d.ts +25 -0
- package/lib/types/client/board/TaskForm.d.ts +4 -0
- package/lib/types/client/board/VerificationReport.d.ts +2 -15
- package/lib/types/client/board/model-options.d.ts +87 -0
- package/lib/types/client/board/preset-label.d.ts +21 -0
- package/lib/types/client/board/preset-roster.d.ts +45 -0
- package/lib/types/client/board/source-group.d.ts +27 -0
- package/lib/types/client/body-mutations.d.ts +45 -0
- package/lib/types/client/host-api.d.ts +25 -0
- package/lib/types/client/locales.d.ts +87 -9
- package/lib/types/client/pending-verify.d.ts +47 -0
- package/lib/types/client/plugin-card-seat.d.ts +3 -1
- package/lib/types/client/service.d.ts +4 -1
- package/lib/types/client/settings-form.d.ts +73 -51
- package/lib/types/core/attachment.d.ts +132 -0
- package/lib/types/core/card-defaults.d.ts +78 -0
- package/lib/types/core/controller.d.ts +57 -8
- package/lib/types/core/execution-summary.d.ts +52 -0
- package/lib/types/core/extension.d.ts +116 -0
- package/lib/types/core/launch-width.d.ts +31 -0
- package/lib/types/core/reasoning-effort.d.ts +57 -0
- package/lib/types/core/session-reuse.d.ts +7 -1
- package/lib/types/core/spend-budget.d.ts +28 -0
- package/lib/types/core/subtask.d.ts +100 -37
- package/lib/types/core/tasks.d.ts +94 -10
- package/lib/types/core/use-cases/task-create.d.ts +10 -5
- package/lib/types/core/use-cases/task-tag.d.ts +36 -0
- package/lib/types/core/use-cases/task-update.d.ts +22 -1
- package/lib/types/core/wire-projection.d.ts +35 -0
- package/lib/types/core/workspace-target.d.ts +23 -3
- package/lib/types/host/attachments.d.ts +250 -0
- package/lib/types/host/extension-registry.d.ts +40 -0
- package/lib/types/host/launch-admission.d.ts +71 -0
- package/lib/types/host-ledger.d.ts +114 -47
- package/lib/types/host-routes.d.ts +63 -0
- package/lib/types/host-runner.d.ts +164 -18
- package/lib/types/host-service.d.ts +182 -46
- package/lib/types/host-spend.d.ts +52 -0
- package/lib/types/index.d.ts +173 -54
- package/lib/types/loopback.d.ts +41 -1
- package/lib/types/protocol.d.ts +52 -11
- package/lib/types/tool-surface.d.ts +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +36 -29
- package/src/client/CardDefaultPresetField.tsx +101 -0
- package/src/client/PluginSettingsCard.tsx +385 -111
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/TaskBoardSettingsCard.tsx +332 -37
- package/src/client/board/AttachmentField.tsx +383 -0
- package/src/client/board/EditTaskModal.tsx +63 -0
- package/src/client/board/ExecutionLog.tsx +154 -0
- package/src/client/board/LinkSubtaskModal.tsx +1 -1
- package/src/client/board/NewTaskModal.tsx +154 -45
- package/src/client/board/ReasoningEffortField.tsx +50 -0
- package/src/client/board/TagManagerModal.tsx +151 -2
- package/src/client/board/TaskBoard.tsx +47 -10
- package/src/client/board/TaskCard.tsx +45 -23
- package/src/client/board/TaskDetail.tsx +468 -258
- package/src/client/board/TaskForm.tsx +19 -4
- package/src/client/board/VerificationReport.tsx +143 -104
- package/src/client/board/model-options.ts +208 -0
- package/src/client/board/preset-label.ts +32 -0
- package/src/client/board/preset-roster.ts +58 -0
- package/src/client/board/source-group.ts +94 -0
- package/src/client/board/task-markdown.module.css +11 -8
- package/src/client/board-settings.module.css +35 -7
- package/src/client/board.module.css +1044 -105
- package/src/client/body-mutations.ts +133 -0
- package/src/client/host-api.ts +70 -0
- package/src/client/index.ts +109 -95
- package/src/client/locales.ts +205 -48
- package/src/client/pending-verify.ts +90 -0
- package/src/client/plugin-card-seat.ts +8 -2
- package/src/client/service.ts +24 -0
- package/src/client/settings-card.module.css +466 -89
- package/src/client/settings-entry-form.ts +0 -1
- package/src/client/settings-form.ts +102 -60
- package/src/core/attachment.ts +287 -0
- package/src/core/card-defaults.ts +132 -0
- package/src/core/controller.ts +90 -11
- package/src/core/execution-summary.ts +96 -0
- package/src/core/extension.ts +120 -0
- package/src/core/launch-width.ts +38 -0
- package/src/core/reasoning-effort.ts +92 -0
- package/src/core/session-reuse.ts +7 -1
- package/src/core/spend-budget.ts +35 -0
- package/src/core/store.ts +19 -1
- package/src/core/subtask.ts +144 -68
- package/src/core/tasks.ts +117 -10
- package/src/core/use-cases/task-create.ts +27 -16
- package/src/core/use-cases/task-tag.ts +56 -0
- package/src/core/use-cases/task-update.ts +33 -5
- package/src/core/wire-projection.ts +81 -0
- package/src/core/workspace-target.ts +27 -3
- package/src/host/agent-tools.ts +33 -21
- package/src/host/attachments.ts +650 -0
- package/src/host/extension-registry.ts +150 -5
- package/src/host/launch-admission.ts +139 -0
- package/src/host-ledger.ts +248 -117
- package/src/host-routes.ts +233 -15
- package/src/host-runner.ts +395 -61
- package/src/host-service.ts +512 -139
- package/src/host-spend.ts +105 -0
- package/src/index.ts +312 -92
- package/src/loopback.ts +57 -1
- package/src/protocol.ts +83 -18
- package/src/tool-surface.ts +1 -0
- package/icon.svg +0 -3
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default-agent-preset picker of the settings card's new-card-defaults
|
|
3
|
+
* topic.
|
|
4
|
+
*
|
|
5
|
+
* It renders the rows the create dialog's own mode picker renders — built-in
|
|
6
|
+
* presets first, then user presets, each labelled with its default and
|
|
7
|
+
* unavailable suffixes (board/preset-label.ts owns both) — and it renders a
|
|
8
|
+
* preset that cannot compose a session as a row that is visible but NOT
|
|
9
|
+
* selectable, so the board never stores a default no session could be composed
|
|
10
|
+
* from.
|
|
11
|
+
*
|
|
12
|
+
* The shared ChoiceField cannot express that: its choices carry no disabled
|
|
13
|
+
* state, and a stored pin the roster no longer serves would render as an empty
|
|
14
|
+
* trigger rather than as the unavailable preset it is. Both need a native
|
|
15
|
+
* `<select>` (the fallback the shared SelectField itself takes under an
|
|
16
|
+
* appearance skin), styled with the settings card's own field classes so the
|
|
17
|
+
* control stays a sibling of the fields beside it.
|
|
18
|
+
*/
|
|
19
|
+
import type { ExecutionPresetOption } from '../core/controller.ts'
|
|
20
|
+
import { inheritPresetLabel, presetChoiceRows } from './board/preset-label.ts'
|
|
21
|
+
import { t } from './locales.ts'
|
|
22
|
+
import type { FieldProps } from './PluginSettingsCard.tsx'
|
|
23
|
+
import css from './settings-card.module.css'
|
|
24
|
+
|
|
25
|
+
/** Props of the default-preset field: the shared field contract plus the roster. */
|
|
26
|
+
export interface CardDefaultPresetFieldProps extends FieldProps {
|
|
27
|
+
/**
|
|
28
|
+
* The deployment's agent-preset roster, or undefined while its runtime read
|
|
29
|
+
* has not answered: an unread roster offers the inherit choice alone instead
|
|
30
|
+
* of calling every stored pin "removed".
|
|
31
|
+
*/
|
|
32
|
+
presets: readonly ExecutionPresetOption[] | undefined
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Render the default-preset select.
|
|
37
|
+
* @param props - the field contract and the roster to list.
|
|
38
|
+
* @returns the field.
|
|
39
|
+
*/
|
|
40
|
+
export function CardDefaultPresetField(props: CardDefaultPresetFieldProps) {
|
|
41
|
+
const presets = props.presets
|
|
42
|
+
const rows = presetChoiceRows(presets ?? [])
|
|
43
|
+
// A stored pin the roster no longer serves stays visible and pickable: it is
|
|
44
|
+
// what the board currently holds, so the control must show it rather than
|
|
45
|
+
// silently reading as the inherit choice.
|
|
46
|
+
const unlisted = props.text !== '' && presets !== undefined && !presets.some(preset => preset.id === props.text)
|
|
47
|
+
return (
|
|
48
|
+
<div className={css.field}>
|
|
49
|
+
<div className={css.head}>
|
|
50
|
+
<label className={css.label} htmlFor={props.id}>{props.label}</label>
|
|
51
|
+
{props.overridden
|
|
52
|
+
? (
|
|
53
|
+
<span className={css.badges}>
|
|
54
|
+
<span className={css.badge}>{props.overriddenLabel}</span>
|
|
55
|
+
<button
|
|
56
|
+
type="button"
|
|
57
|
+
className={css.reset}
|
|
58
|
+
disabled={props.disabled}
|
|
59
|
+
onClick={props.onReset}
|
|
60
|
+
>
|
|
61
|
+
{props.resetLabel}
|
|
62
|
+
</button>
|
|
63
|
+
</span>
|
|
64
|
+
)
|
|
65
|
+
: null}
|
|
66
|
+
</div>
|
|
67
|
+
<select
|
|
68
|
+
id={props.id}
|
|
69
|
+
className={css.select}
|
|
70
|
+
value={props.text}
|
|
71
|
+
disabled={props.disabled}
|
|
72
|
+
aria-invalid={props.invalid || undefined}
|
|
73
|
+
onChange={(event) => { props.onEdit(event.target.value) }}
|
|
74
|
+
>
|
|
75
|
+
<option value="">{inheritPresetLabel(presets ?? [])}</option>
|
|
76
|
+
{unlisted ? <option value={props.text}>{props.text}{t('exec.mode.removed')}</option> : null}
|
|
77
|
+
{rows.builtin.length > 0
|
|
78
|
+
? (
|
|
79
|
+
<optgroup label={t('exec.mode.builtinGroup')}>
|
|
80
|
+
{rows.builtin.map(row => (
|
|
81
|
+
<option key={row.id} value={row.id} disabled={row.disabled}>{row.label}</option>
|
|
82
|
+
))}
|
|
83
|
+
</optgroup>
|
|
84
|
+
)
|
|
85
|
+
: null}
|
|
86
|
+
{rows.custom.length > 0
|
|
87
|
+
? (
|
|
88
|
+
<optgroup label={t('exec.mode.customGroup')}>
|
|
89
|
+
{rows.custom.map(row => (
|
|
90
|
+
<option key={row.id} value={row.id} disabled={row.disabled}>{row.label}</option>
|
|
91
|
+
))}
|
|
92
|
+
</optgroup>
|
|
93
|
+
)
|
|
94
|
+
: null}
|
|
95
|
+
</select>
|
|
96
|
+
<p className={props.invalid ? css.invalid : css.hint} title={props.hintTitle}>
|
|
97
|
+
{props.invalid ? props.invalidLabel : props.hint}
|
|
98
|
+
</p>
|
|
99
|
+
</div>
|
|
100
|
+
)
|
|
101
|
+
}
|