dsh-better-ask-user 0.2.0 → 0.3.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/README.md +23 -4
- package/lib/client.js +336 -258
- package/package.json +12 -12
- package/src/ask-tool.js +7 -1
- package/src/client/AskHistoryRow.module.css +20 -10
- package/src/client/AskHistoryRow.tsx +18 -6
- package/src/client/PlanReviewPanel.module.css +254 -38
- package/src/client/PlanReviewPanel.tsx +9 -3
- package/src/client/QuestionComposer.module.css +504 -77
- package/src/client/QuestionComposer.tsx +51 -27
- package/src/client/QuestionReplyView.module.css +95 -31
- package/src/client/QuestionReplyView.tsx +25 -15
- package/src/client/QuestionWaitBar.module.css +39 -19
- package/src/client/QuestionWaitBar.tsx +0 -2
- package/src/client/contract/slots.ts +19 -4
- package/src/client/index.ts +5 -5
- package/src/client/locales.ts +4 -0
- package/src/client/settings-locales.ts +22 -20
- package/src/client/settings.module.css +108 -108
- package/src/client/settings.tsx +101 -125
- package/src/index.js +2 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-better-ask-user",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Independent ask_user_question plugin: configurable wait, input-extended countdown, markdown/mobile card, native or default timeout behavior, and PTC deadline exemption.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": "
|
|
19
|
-
"dsh": "
|
|
18
|
+
"node": ">=24.9.0",
|
|
19
|
+
"dsh": "0.2.2-rc.1"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"pretest": "node scripts/build-client.mjs",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"build": "node scripts/build-client.mjs"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@deepseek-ai/schemastery": "~3.
|
|
28
|
-
"dsh-better-ptc": "0.
|
|
27
|
+
"@deepseek-ai/schemastery": "~3.19.0",
|
|
28
|
+
"dsh-better-ptc": "0.2.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@deepseek-ai/cordis": "~4.0
|
|
32
|
-
"@deepseek-ai/dsh-agent": "
|
|
33
|
-
"@deepseek-ai/dsh-llm": "
|
|
34
|
-
"@deepseek-ai/dsh-session": "
|
|
35
|
-
"@deepseek-ai/dsh-system-prompt": "
|
|
36
|
-
"@deepseek-ai/dsh-tools": "
|
|
37
|
-
"@deepseek-ai/dsh-user-questions": "
|
|
31
|
+
"@deepseek-ai/cordis": "~4.1.0",
|
|
32
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.1",
|
|
33
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.1",
|
|
34
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.1",
|
|
35
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.1",
|
|
36
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.1",
|
|
37
|
+
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.1",
|
|
38
38
|
"react": "^18.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/src/ask-tool.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** ask_user_question scope shadow: official contract plus the plugin-managed wait. */
|
|
2
2
|
import { ToolArgsError, validateJsonSchemaValue } from '@deepseek-ai/dsh-tools'
|
|
3
|
+
import { TIMED_WAIT_PARAMETER } from '@deepseek-ai/dsh-user-questions'
|
|
3
4
|
import { buildDefaultAnswer } from './default-answer.js'
|
|
4
5
|
|
|
5
6
|
/** Model-visible notice for the native pending result. */
|
|
@@ -44,10 +45,15 @@ function answerResult(result) {
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
/** Add the
|
|
48
|
+
/** Add detail and the next host marker used to replay pending questions. */
|
|
48
49
|
function parametersWithDetail(parameters) {
|
|
49
50
|
if (parameters === undefined) return parameters
|
|
50
51
|
const next = structuredClone(parameters)
|
|
52
|
+
// DSH classifies logged ask calls by this schema key, not by askTimed usage.
|
|
53
|
+
next.properties[TIMED_WAIT_PARAMETER] = {
|
|
54
|
+
type: 'integer',
|
|
55
|
+
description: 'Host continuation marker; omit. The plugin setting, not this argument, controls foreground wait duration.',
|
|
56
|
+
}
|
|
51
57
|
const properties = next?.properties?.questions?.items?.properties
|
|
52
58
|
if (properties !== undefined && properties.detail === undefined) {
|
|
53
59
|
properties.detail = {
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
.frame {
|
|
2
|
+
--cfg-line: var(--dsw-alias-border-l2);
|
|
3
|
+
--cfg-ink: var(--dsw-alias-label-primary);
|
|
4
|
+
--cfg-muted: var(--dsw-alias-label-secondary);
|
|
5
|
+
--cfg-accent: #3388bb;
|
|
6
|
+
--cfg-accent-text: #14587f;
|
|
7
|
+
--cfg-hover: var(--dsw-alias-interactive-bg-hover);
|
|
8
|
+
min-width: 0;
|
|
9
|
+
}
|
|
10
|
+
.row { appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; min-width: 0; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--cfg-muted); font: inherit; line-height: 20px; text-align: left; }
|
|
11
|
+
button.row { cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
|
|
12
|
+
button.row:hover { background: var(--cfg-hover); color: var(--cfg-ink); }
|
|
13
|
+
button.row:active { background: color-mix(in srgb, var(--cfg-accent) 9%, transparent); }
|
|
14
|
+
button.row:focus-visible { outline: 2px solid var(--cfg-accent); outline-offset: -2px; }
|
|
6
15
|
.icon { display: inline-flex; flex: none; color: var(--dsw-alias-label-tertiary); }
|
|
7
16
|
.icon svg { width: 14px; height: 14px; }
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
@media (max-width: 640px), (pointer: coarse) { .row { min-height: 44px; } }
|
|
17
|
+
.summary { min-width: 0; flex: 1; overflow: hidden; color: var(--cfg-ink); font-size: 13px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
|
|
18
|
+
.open { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--cfg-muted); font-size: 11px; line-height: 18px; white-space: nowrap; }
|
|
19
|
+
.error { display: block; padding: 4px 8px 4px 30px; color: var(--dsw-alias-state-error-primary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
|
|
20
|
+
@media (pointer: coarse) { .row { min-height: 44px; } }
|
|
13
21
|
@media (prefers-reduced-motion: reduce) { button.row { transition: none; } }
|
|
22
|
+
|
|
23
|
+
[data-ds-dark-theme] .frame { --cfg-accent: #4eb0e8; --cfg-accent-text: #6fc0ee; }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** History row for ask_user_question: compact summary plus a replay button. */
|
|
2
|
+
import { useState } from 'react'
|
|
2
3
|
import { IconChevronRightOutlineRegular, IconQuestionOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
3
4
|
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
|
|
4
5
|
import type { ToolCallViewProps, UserQuestionRecord } from '@deepseek-ai/dsh-client-ui-tool/client'
|
|
@@ -99,6 +100,7 @@ export function AskHistoryRow({
|
|
|
99
100
|
reviewPanel,
|
|
100
101
|
t,
|
|
101
102
|
}: AskHistoryRowProps): React.JSX.Element {
|
|
103
|
+
const [failedAction, setFailedAction] = useState<string | null>(null)
|
|
102
104
|
const argsRaw = 'kind' in block ? block.call?.argsRaw ?? '' : block.argsRaw
|
|
103
105
|
const output = 'kind' in block ? resultText(block.content) : undefined
|
|
104
106
|
const questions = questionList(argsRaw)
|
|
@@ -109,20 +111,30 @@ export function AskHistoryRow({
|
|
|
109
111
|
const summary = questions?.[0]?.question.split('\n').find(line => line.trim() !== '')?.trim() ?? t('history.title')
|
|
110
112
|
const review = record !== undefined
|
|
111
113
|
const action = review
|
|
112
|
-
? () =>
|
|
114
|
+
? () => reviewPanel(callId, record)
|
|
113
115
|
: isPending(output) || phase === 'start'
|
|
114
|
-
? () =>
|
|
116
|
+
? () => revealPanel(callId)
|
|
115
117
|
: undefined
|
|
116
118
|
|
|
119
|
+
const actionKey = `${callId}-${review ? 'review' : 'open'}`
|
|
120
|
+
|
|
117
121
|
const content = (
|
|
118
122
|
<>
|
|
119
123
|
<span className={css.icon} aria-hidden="true"><IconQuestionOutlineRegular /></span>
|
|
120
|
-
<span className={css.title}>{t('history.title')}</span>
|
|
121
124
|
<span className={css.summary} title={summary}>{summary}</span>
|
|
122
125
|
{action !== undefined && <span className={css.open}>{review ? t('history.review') : t('history.reopen')}<IconChevronRightOutlineRegular size={14} /></span>}
|
|
123
126
|
</>
|
|
124
127
|
)
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
return (
|
|
129
|
+
<div className={css.frame} role="group" aria-label={t('history.title')}>
|
|
130
|
+
{action === undefined
|
|
131
|
+
? <div className={css.row} data-question-history={callId}>{content}</div>
|
|
132
|
+
: <button
|
|
133
|
+
type="button" className={css.row} data-question-history={callId} data-history-action={review ? 'review' : 'open'}
|
|
134
|
+
onClick={() => { setFailedAction(action() ? null : actionKey) }}
|
|
135
|
+
aria-label={`${review ? t('history.review') : t('history.reopen')} · ${summary}`}
|
|
136
|
+
>{content}</button>}
|
|
137
|
+
{failedAction === actionKey && <span className={css.error} role="alert">{t('history.unavailable')}</span>}
|
|
138
|
+
</div>
|
|
139
|
+
)
|
|
128
140
|
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
.frame {
|
|
2
|
-
--
|
|
2
|
+
--cfg-line: var(--dsw-alias-border-l2);
|
|
3
|
+
--cfg-line-strong: var(--dsw-alias-border-l3);
|
|
4
|
+
--cfg-surface: var(--dsw-alias-bg-layer-2);
|
|
5
|
+
--cfg-sunken: color-mix(in srgb, var(--dsw-alias-label-primary) 4%, var(--dsw-alias-bg-layer-1));
|
|
6
|
+
--cfg-ink: var(--dsw-alias-label-primary);
|
|
7
|
+
--cfg-muted: var(--dsw-alias-label-secondary);
|
|
8
|
+
--cfg-accent: #3388bb;
|
|
9
|
+
--cfg-accent-text: #14587f;
|
|
10
|
+
--cfg-hover: var(--dsw-alias-interactive-bg-hover);
|
|
11
|
+
--cfg-danger: var(--dsw-alias-state-error-primary);
|
|
12
|
+
--cfg-solid: #20709e;
|
|
13
|
+
--cfg-solid-hover: #1c638d;
|
|
14
|
+
--cfg-on-solid: #fff;
|
|
3
15
|
display: flex;
|
|
4
16
|
justify-content: center;
|
|
5
|
-
padding:
|
|
17
|
+
padding: 6px calc(var(--dsh-composer-side-clearance) + 16px) calc(10px + env(safe-area-inset-bottom));
|
|
6
18
|
}
|
|
19
|
+
|
|
7
20
|
.card {
|
|
8
21
|
display: flex;
|
|
9
22
|
flex-direction: column;
|
|
@@ -13,46 +26,249 @@
|
|
|
13
26
|
max-height: min(75vh, 640px);
|
|
14
27
|
max-height: min(75dvh, 640px);
|
|
15
28
|
overflow: hidden;
|
|
16
|
-
border:
|
|
29
|
+
border: 1px solid var(--cfg-line);
|
|
30
|
+
border-top-color: var(--cfg-accent);
|
|
17
31
|
border-radius: 12px;
|
|
18
|
-
background: var(--
|
|
19
|
-
color: var(--
|
|
20
|
-
font-size: 13px;
|
|
21
|
-
line-height: 20px;
|
|
32
|
+
background: var(--cfg-surface);
|
|
33
|
+
color: var(--cfg-ink);
|
|
22
34
|
--dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
|
|
23
35
|
--dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
|
|
24
36
|
}
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
|
|
38
|
+
.card,
|
|
39
|
+
.card * {
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.strip {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
gap: 8px;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
padding: 8px 12px 8px 16px;
|
|
51
|
+
border-bottom: 1px solid var(--cfg-line);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.panelLabel {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
height: 20px;
|
|
58
|
+
padding: 0 7px;
|
|
59
|
+
border: 1px solid var(--cfg-line);
|
|
60
|
+
border-radius: 999px;
|
|
61
|
+
background: var(--cfg-sunken);
|
|
62
|
+
color: var(--cfg-muted);
|
|
63
|
+
font-size: 11px;
|
|
64
|
+
line-height: 18px;
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.previewActions {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
flex-wrap: wrap;
|
|
73
|
+
gap: 4px;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
margin-left: auto;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.summary {
|
|
79
|
+
min-width: 0;
|
|
80
|
+
min-height: 0;
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
overscroll-behavior: contain;
|
|
83
|
+
scrollbar-gutter: stable;
|
|
84
|
+
padding: 12px 16px;
|
|
85
|
+
}
|
|
86
|
+
|
|
30
87
|
.documentHeading { display: flex; align-items: flex-start; gap: 8px; }
|
|
31
88
|
.documentIcon { flex: none; width: 18px; height: 20px; color: var(--dsw-alias-label-tertiary); }
|
|
32
|
-
|
|
33
|
-
.title
|
|
34
|
-
.description {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
89
|
+
|
|
90
|
+
.title,
|
|
91
|
+
.description {
|
|
92
|
+
min-width: 0;
|
|
93
|
+
overflow-wrap: anywhere;
|
|
94
|
+
word-break: break-word;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.title {
|
|
98
|
+
margin: 0;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
line-height: 20px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.description {
|
|
105
|
+
display: -webkit-box;
|
|
106
|
+
-webkit-box-orient: vertical;
|
|
107
|
+
-webkit-line-clamp: 2;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
margin: 4px 0 0;
|
|
110
|
+
color: var(--cfg-muted);
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
line-height: 18px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.footer {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: flex-end;
|
|
119
|
+
flex-shrink: 0;
|
|
120
|
+
flex-wrap: wrap;
|
|
121
|
+
gap: 8px 12px;
|
|
122
|
+
padding: 8px 12px;
|
|
123
|
+
border-top: 1px solid var(--cfg-line);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.feedback {
|
|
127
|
+
flex: 1;
|
|
128
|
+
min-width: 0;
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 6px;
|
|
132
|
+
color: var(--cfg-muted);
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
line-height: 18px;
|
|
135
|
+
overflow-wrap: anywhere;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.feedback[data-error] { color: var(--cfg-danger); }
|
|
139
|
+
|
|
140
|
+
.discuss, .primary, .decline {
|
|
141
|
+
appearance: none;
|
|
142
|
+
display: inline-flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
height: 32px;
|
|
146
|
+
padding: 0 12px;
|
|
147
|
+
border: 1px solid var(--cfg-line);
|
|
148
|
+
border-radius: 8px;
|
|
149
|
+
background: var(--cfg-surface);
|
|
150
|
+
color: var(--cfg-ink);
|
|
151
|
+
box-shadow: none;
|
|
152
|
+
font: inherit;
|
|
153
|
+
font-size: 13px;
|
|
154
|
+
font-weight: 500;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
|
|
157
|
+
}
|
|
158
|
+
.discuss:hover:not(:disabled) { background: var(--cfg-hover); }
|
|
159
|
+
.primary { border-color: transparent; background: var(--cfg-solid); color: var(--cfg-on-solid); }
|
|
160
|
+
.primary:hover:not(:disabled) { background: var(--cfg-solid-hover); }
|
|
161
|
+
.spinner { flex: none; width: 12px; height: 12px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
|
|
162
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
163
|
+
|
|
164
|
+
.feedback:empty {
|
|
165
|
+
display: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.actions {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
flex-wrap: wrap;
|
|
172
|
+
gap: 8px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.decline {
|
|
176
|
+
min-height: 32px;
|
|
177
|
+
padding: 0 12px;
|
|
178
|
+
border: 0;
|
|
179
|
+
border-radius: 8px;
|
|
180
|
+
background: transparent;
|
|
181
|
+
color: var(--cfg-muted);
|
|
182
|
+
font: inherit;
|
|
183
|
+
font-size: 13px;
|
|
184
|
+
line-height: 20px;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.decline:hover:not(:disabled),
|
|
189
|
+
.decline:active:not(:disabled) {
|
|
190
|
+
background: var(--cfg-hover);
|
|
191
|
+
color: var(--cfg-ink);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.discuss {
|
|
195
|
+
gap: 6px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.card button:focus-visible {
|
|
199
|
+
outline: 2px solid var(--cfg-accent);
|
|
200
|
+
outline-offset: -2px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.card button:disabled {
|
|
204
|
+
opacity: 0.4;
|
|
205
|
+
cursor: default;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.srOnly {
|
|
209
|
+
position: absolute;
|
|
210
|
+
width: 1px;
|
|
211
|
+
height: 1px;
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
padding: 0;
|
|
214
|
+
border: 0;
|
|
215
|
+
clip-path: inset(50%);
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
}
|
|
218
|
+
|
|
50
219
|
@media (max-width: 720px) {
|
|
51
|
-
.card {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
|
|
220
|
+
.card {
|
|
221
|
+
max-height: calc(100vh - 160px);
|
|
222
|
+
max-height: calc(100dvh - 160px);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.strip {
|
|
226
|
+
padding: 8px 12px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.summary {
|
|
230
|
+
padding: 12px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.footer {
|
|
234
|
+
padding: 8px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.feedback {
|
|
238
|
+
flex: 1 1 100%;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@media (max-width: 420px) {
|
|
243
|
+
.actions {
|
|
244
|
+
display: grid;
|
|
245
|
+
grid-template-columns: 1fr 1fr;
|
|
246
|
+
width: 100%;
|
|
247
|
+
gap: 8px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.decline {
|
|
251
|
+
grid-column: 1 / -1;
|
|
252
|
+
justify-content: flex-start;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.actions > button {
|
|
256
|
+
flex: none;
|
|
257
|
+
width: 100%;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.discuss, .primary, .decline {
|
|
261
|
+
white-space: nowrap;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@media (pointer: coarse) { .card button { min-height: 44px; } }
|
|
266
|
+
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
|
|
267
|
+
|
|
268
|
+
[data-ds-dark-theme] .frame {
|
|
269
|
+
--cfg-accent: #4eb0e8;
|
|
270
|
+
--cfg-accent-text: #6fc0ee;
|
|
271
|
+
--cfg-solid: #4eb0e8;
|
|
272
|
+
--cfg-solid-hover: #6fc0ee;
|
|
273
|
+
--cfg-on-solid: #0e1014;
|
|
274
|
+
}
|
|
@@ -99,11 +99,17 @@ export function PlanReviewPanel({ pending, review, t, renderSlot, useQuestionCar
|
|
|
99
99
|
</div>
|
|
100
100
|
<QuestionWaitBar card={card} t={t} busy={busy} onTakeTime={() => { pending.takeTime() }} />
|
|
101
101
|
<div className={css.summary} data-plan-document>
|
|
102
|
-
<div className={css.documentHeading}
|
|
102
|
+
<div className={css.documentHeading}>
|
|
103
|
+
<svg className={css.documentIcon} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" aria-hidden="true"><path d="M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8zM14 3v5h5M9 12h6M9 16h6" /></svg>
|
|
104
|
+
<h3 className={css.title}>{summary.title}</h3>
|
|
105
|
+
</div>
|
|
103
106
|
{summary.description !== '' && <p className={css.description}>{summary.description}</p>}
|
|
104
107
|
</div>
|
|
105
108
|
<div className={css.footer} data-plan-decision>
|
|
106
|
-
<div className={css.feedback} role=
|
|
109
|
+
<div className={css.feedback} role={error === null ? 'status' : 'alert'} aria-atomic="true" data-error={error !== null || undefined}>
|
|
110
|
+
{busy && <span className={css.spinner} aria-hidden="true" />}
|
|
111
|
+
{error ?? (busy ? t('submitting') : null)}
|
|
112
|
+
</div>
|
|
107
113
|
<div className={css.actions}>
|
|
108
114
|
{decline !== undefined && (
|
|
109
115
|
<button
|
|
@@ -121,7 +127,7 @@ export function PlanReviewPanel({ pending, review, t, renderSlot, useQuestionCar
|
|
|
121
127
|
{t('plan.discuss')}
|
|
122
128
|
</Button>
|
|
123
129
|
<Button
|
|
124
|
-
variant="primary" className={css.
|
|
130
|
+
variant="primary" className={css.primary} {...tooltip(review.approve.description)}
|
|
125
131
|
aria-describedby={review.approve.description === undefined ? undefined : `plan-approve-${pending.key}`}
|
|
126
132
|
disabled={busy || !canDecide} onClick={() => { decide(review.approve.label) }}
|
|
127
133
|
>
|