@contraagent/ui 0.8.0 → 0.9.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 +1 -1
- package/custom-elements.json +104 -78
- package/dist/adapters/journal-columns.d.ts +2 -0
- package/dist/adapters/journal-columns.d.ts.map +1 -1
- package/dist/adapters/journal-columns.js +19 -6
- package/dist/adapters/journal-columns.js.map +1 -1
- package/dist/adapters/kpi-tiles.d.ts +8 -3
- package/dist/adapters/kpi-tiles.d.ts.map +1 -1
- package/dist/adapters/kpi-tiles.js +35 -15
- package/dist/adapters/kpi-tiles.js.map +1 -1
- package/dist/adapters/transcript/sections.d.ts +5 -0
- package/dist/adapters/transcript/sections.d.ts.map +1 -1
- package/dist/adapters/transcript/sections.js +7 -1
- package/dist/adapters/transcript/sections.js.map +1 -1
- package/dist/contraagent-ui.js +689 -700
- package/dist/elements/lists/ca-contracts.d.ts +3 -4
- package/dist/elements/lists/ca-contracts.d.ts.map +1 -1
- package/dist/elements/lists/ca-contracts.js +25 -19
- package/dist/elements/lists/ca-contracts.js.map +1 -1
- package/dist/elements/overview/ca-kpis.d.ts +3 -1
- package/dist/elements/overview/ca-kpis.d.ts.map +1 -1
- package/dist/elements/overview/ca-kpis.js +7 -2
- package/dist/elements/overview/ca-kpis.js.map +1 -1
- package/dist/elements/overview/ca-model-usage.d.ts +2 -1
- package/dist/elements/overview/ca-model-usage.d.ts.map +1 -1
- package/dist/elements/overview/ca-model-usage.js +3 -2
- package/dist/elements/overview/ca-model-usage.js.map +1 -1
- package/dist/elements/overview/ca-overview.d.ts +1 -5
- package/dist/elements/overview/ca-overview.d.ts.map +1 -1
- package/dist/elements/overview/ca-overview.js +53 -77
- package/dist/elements/overview/ca-overview.js.map +1 -1
- package/dist/elements/overview/ca-pipeline-graph.d.ts +8 -1
- package/dist/elements/overview/ca-pipeline-graph.d.ts.map +1 -1
- package/dist/elements/overview/ca-pipeline-graph.js +11 -6
- package/dist/elements/overview/ca-pipeline-graph.js.map +1 -1
- package/dist/elements/overview/ca-run-driver.d.ts.map +1 -1
- package/dist/elements/overview/ca-run-driver.js +6 -5
- package/dist/elements/overview/ca-run-driver.js.map +1 -1
- package/dist/elements/overview/ca-workers.js +1 -1
- package/dist/elements/overview/pipeline-graph/strings.js +3 -3
- package/dist/elements/overview/pipeline-graph/strings.js.map +1 -1
- package/dist/elements/shared/ca-definition.d.ts.map +1 -1
- package/dist/elements/shared/ca-definition.js +1 -2
- package/dist/elements/shared/ca-definition.js.map +1 -1
- package/dist/elements/shell/ca-hosts.d.ts.map +1 -1
- package/dist/elements/shell/ca-hosts.js +1 -2
- package/dist/elements/shell/ca-hosts.js.map +1 -1
- package/dist/elements/shell/ca-monitor.d.ts +3 -1
- package/dist/elements/shell/ca-monitor.d.ts.map +1 -1
- package/dist/elements/shell/ca-monitor.js +20 -9
- package/dist/elements/shell/ca-monitor.js.map +1 -1
- package/dist/elements/shell/ca-run-picker.js +1 -1
- package/dist/elements/shell/ca-run-picker.js.map +1 -1
- package/dist/elements/shell/ca-theme-switch.d.ts.map +1 -1
- package/dist/elements/shell/ca-theme-switch.js +6 -1
- package/dist/elements/shell/ca-theme-switch.js.map +1 -1
- package/dist/elements/task/ca-task-view.js +2 -2
- package/dist/elements/task/ca-task-view.js.map +1 -1
- package/dist/elements/task/ca-transcript.d.ts +3 -0
- package/dist/elements/task/ca-transcript.d.ts.map +1 -1
- package/dist/elements/task/ca-transcript.js +9 -2
- package/dist/elements/task/ca-transcript.js.map +1 -1
- package/dist/elements/task/header.d.ts +3 -0
- package/dist/elements/task/header.d.ts.map +1 -1
- package/dist/elements/task/header.js +22 -13
- package/dist/elements/task/header.js.map +1 -1
- package/dist/elements/task/panes/io.d.ts +1 -1
- package/dist/elements/task/panes/io.d.ts.map +1 -1
- package/dist/elements/task/panes/io.js +14 -21
- package/dist/elements/task/panes/io.js.map +1 -1
- package/dist/elements/trends/ca-trends.d.ts.map +1 -1
- package/dist/elements/trends/ca-trends.js +2 -1
- package/dist/elements/trends/ca-trends.js.map +1 -1
- package/dist/locales/ja.d.ts +16 -29
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +16 -29
- package/dist/locales/ja.js.map +1 -1
- package/dist/words/quota.d.ts +2 -0
- package/dist/words/quota.d.ts.map +1 -1
- package/dist/words/quota.js +4 -0
- package/dist/words/quota.js.map +1 -1
- package/dist/words/run-line.d.ts +5 -3
- package/dist/words/run-line.d.ts.map +1 -1
- package/dist/words/run-line.js +6 -4
- package/dist/words/run-line.js.map +1 -1
- package/dist/words/trends.d.ts +2 -2
- package/dist/words/trends.d.ts.map +1 -1
- package/dist/words/trends.js +5 -3
- package/dist/words/trends.js.map +1 -1
- package/package.json +3 -3
- package/src/adapters/journal-columns.ts +20 -6
- package/src/adapters/kpi-tiles.ts +37 -16
- package/src/adapters/transcript/sections.ts +10 -2
- package/src/elements/lists/ca-contracts.ts +25 -19
- package/src/elements/overview/ca-kpis.ts +4 -2
- package/src/elements/overview/ca-model-usage.ts +3 -2
- package/src/elements/overview/ca-overview.ts +49 -79
- package/src/elements/overview/ca-pipeline-graph.ts +11 -6
- package/src/elements/overview/ca-run-driver.ts +5 -6
- package/src/elements/overview/ca-workers.ts +1 -1
- package/src/elements/overview/pipeline-graph/strings.ts +3 -3
- package/src/elements/shared/ca-definition.ts +1 -2
- package/src/elements/shell/ca-hosts.ts +1 -2
- package/src/elements/shell/ca-monitor.ts +19 -8
- package/src/elements/shell/ca-run-picker.ts +1 -1
- package/src/elements/shell/ca-theme-switch.ts +6 -1
- package/src/elements/task/ca-task-view.ts +2 -2
- package/src/elements/task/ca-transcript.ts +7 -2
- package/src/elements/task/header.ts +24 -14
- package/src/elements/task/panes/io.ts +14 -21
- package/src/elements/trends/ca-trends.ts +2 -1
- package/src/locales/ja.ts +16 -29
- package/src/words/quota.ts +6 -0
- package/src/words/run-line.ts +8 -5
- package/src/words/trends.ts +5 -3
|
@@ -8,7 +8,7 @@ import { pill } from '@contraagent/elements/primitives';
|
|
|
8
8
|
import { facts, fmtDur, kindUnit, listText, localTime, tokenCount, unreadEvents, usageUnknown, usageUnknownWords, usd } from '../../words/format.js';
|
|
9
9
|
import { attemptNames, deferredText, changedFiles, changedFilesTip, changeLabel, credentialLabel, credentialTip, locksLabel, locksTip, modelSwitch, outcomeLabel, priorityText, priorityTip, replayedLabel, replayedTip, stopLabel, workingDirectoryText, workingDirectoryTip, type ChangeKind } from '../../words/index.js';
|
|
10
10
|
import { contextWarnedText, contextWarnedTip, peakContextLine, peakContextTip, peakTry } from '../../words/context.js';
|
|
11
|
-
import { readingShort, readingTip } from '../../words/quota.js';
|
|
11
|
+
import { readingChange, readingShort, readingTip } from '../../words/quota.js';
|
|
12
12
|
import { safetyStopCount, safetyStopLine, safetyStopTip } from '../../words/safety.js';
|
|
13
13
|
import { customColumnTip, customValues } from '../../words/row-extras.js';
|
|
14
14
|
import { divergenceTip, divergenceWord, rerunLine, rerunOf } from '../../words/rerun.js';
|
|
@@ -92,7 +92,7 @@ function verdict(c: TaskContext): [text: string, tone: Tone] {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/** The model of the latest round, as its launch named it (`--model`). */
|
|
95
|
-
function streamModel(c: TaskContext): string {
|
|
95
|
+
function streamModel(c: Pick<TaskContext, 'launches'>): string {
|
|
96
96
|
for (let i = c.launches.length - 1; i >= 0; i--) {
|
|
97
97
|
const l = c.launches[i];
|
|
98
98
|
const m = l ? launchWho(l).model : '';
|
|
@@ -105,6 +105,19 @@ function streamModel(c: TaskContext): string {
|
|
|
105
105
|
* The header of task `key`. `onSearch(query, nth)` is called when the reader
|
|
106
106
|
* picks one of its web searches (the nth with that query).
|
|
107
107
|
*/
|
|
108
|
+
/** Who ran the task, as its header names it: the running session's agent, model and role, else the latest attempt's. */
|
|
109
|
+
export function taskWho(c: Pick<TaskContext, 'detail' | 'launches'>): Who {
|
|
110
|
+
const { rows, launches } = c.detail;
|
|
111
|
+
const lastRow = rows.slice().sort((a, b) => String(a.ts).localeCompare(String(b.ts)))[rows.length - 1];
|
|
112
|
+
const lc0 = launches[0];
|
|
113
|
+
return {
|
|
114
|
+
agent: agentLabel(lc0?.cmd ? lc0.cmd.split(' ')[0] : lastRow?.agent),
|
|
115
|
+
// The journal may not name the model (an agent that does not report it): fall back to the one the transcript shows.
|
|
116
|
+
model: lc0?.model || lastRow?.model || streamModel(c),
|
|
117
|
+
role: lc0?.role || '',
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
108
121
|
export function taskHeader(c: TaskContext, key: string, onSearch: (query: string, nth: number) => void): TemplateResult {
|
|
109
122
|
const d = c.detail;
|
|
110
123
|
const live = c.live;
|
|
@@ -112,14 +125,7 @@ export function taskHeader(c: TaskContext, key: string, onSearch: (query: string
|
|
|
112
125
|
const py = isPy(d);
|
|
113
126
|
const session = hadSession(d);
|
|
114
127
|
const byTs = rows.slice().sort((a, b) => String(a.ts).localeCompare(String(b.ts)));
|
|
115
|
-
const
|
|
116
|
-
const lc0 = launches[0];
|
|
117
|
-
const who: Who = {
|
|
118
|
-
agent: agentLabel(lc0?.cmd ? lc0.cmd.split(' ')[0] : lastRow?.agent),
|
|
119
|
-
// The journal may not name the model (an agent that does not report it): fall back to the one the transcript shows.
|
|
120
|
-
model: lc0?.model || lastRow?.model || streamModel(c),
|
|
121
|
-
role: lc0?.role || '',
|
|
122
|
-
};
|
|
128
|
+
const who = taskWho(c);
|
|
123
129
|
const otherModels = session ? [...new Set(byTs.map((r) => r.model).filter((x): x is string => !!x && x !== who.model))] : [];
|
|
124
130
|
const first = rows[0];
|
|
125
131
|
const tries = rows.filter(isLaunched);
|
|
@@ -168,7 +174,7 @@ export function taskHeader(c: TaskContext, key: string, onSearch: (query: string
|
|
|
168
174
|
${changesFold(tries)}
|
|
169
175
|
${safetyFold(tries)}
|
|
170
176
|
${unreadEvents(tries)
|
|
171
|
-
? html`<div class="meta unread" title=${msg('
|
|
177
|
+
? html`<div class="meta unread" title=${msg('Events this contraagent version could not read (unread_events)')}>
|
|
172
178
|
<span aria-hidden="true">⚠</span> ${msg(str`Unrecognized events: ${unreadEvents(tries)}`)}
|
|
173
179
|
</div>`
|
|
174
180
|
: nothing}
|
|
@@ -285,10 +291,14 @@ function quotaLine(c: TaskContext, tries: JournalRow[]) {
|
|
|
285
291
|
const start = first ? tryQuota(first, readings).start : null;
|
|
286
292
|
if (!start || !last) return nothing;
|
|
287
293
|
const next = tryQuota(last, readings).next;
|
|
288
|
-
// The identity chip names the account; both readings are that account's.
|
|
294
|
+
// The identity chip names the account; both readings are that account's. One line: each window from the first reading to the next.
|
|
295
|
+
const tip = [
|
|
296
|
+
msg(str`Usage at session start: ${readingShort(start)}`),
|
|
297
|
+
readingTip(start),
|
|
298
|
+
...(next ? ['', msg(str`Usage after this task: ${readingShort(next)}`), readingTip(next)] : []),
|
|
299
|
+
].join('\n');
|
|
289
300
|
return html`<div class="spend quota">
|
|
290
|
-
<span title=${
|
|
291
|
-
${next ? html`<span title=${readingTip(next)}>${msg(str`Usage after this task: ${readingShort(next)}`)}</span>` : nothing}
|
|
301
|
+
<span title=${tip}>${msg(str`Usage: ${readingChange(start, next)}`)}</span>
|
|
292
302
|
</div>`;
|
|
293
303
|
}
|
|
294
304
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The input and output panes of `ca-task-view`: what the task read (parameters,
|
|
2
2
|
// files, earlier tasks, the prompt) and what it wrote (files against their
|
|
3
|
-
// contracts,
|
|
3
|
+
// contracts, tokens and cost, later tasks).
|
|
4
4
|
import {
|
|
5
5
|
isLaunched,
|
|
6
6
|
isPython,
|
|
@@ -19,10 +19,10 @@ import { msg, str } from '@lit/localize';
|
|
|
19
19
|
import { html, nothing, type TemplateResult } from 'lit';
|
|
20
20
|
import { pill } from '@contraagent/elements/primitives';
|
|
21
21
|
import '@contraagent/elements/json-tree/define';
|
|
22
|
-
import { facts,
|
|
22
|
+
import { facts, kindUnit, tokenCount, usd } from '../../../words/format.js';
|
|
23
23
|
import { attemptLabel, attemptNames, credentialLabel, credentialTip, outcomeLabel, stopLabel } from '../../../words/index.js';
|
|
24
24
|
import { accountReading, readingShort, readingTip } from '../../../words/quota.js';
|
|
25
|
-
import { outcomeMark, outcomeTone
|
|
25
|
+
import { outcomeMark, outcomeTone } from '../../../lib/tone.js';
|
|
26
26
|
import { executorIcon } from '../../../words/executor.js';
|
|
27
27
|
import { promptText } from '../../shared/prompt-text.js';
|
|
28
28
|
import { contractChip } from '../../shared/contract-parts.js';
|
|
@@ -31,7 +31,7 @@ import { taskChip } from '../../shared/task-chip.js';
|
|
|
31
31
|
import { inputView, notPassed, type EarlierTask, type InputFile } from '../inputs.js';
|
|
32
32
|
import { roundLabel, roundWhy } from '../../../words/rounds.js';
|
|
33
33
|
import { inputFileCheckWord, inputRootPath, inputRootTip, lineageTip, lineageWord } from '../../../words/lineage.js';
|
|
34
|
-
import {
|
|
34
|
+
import { hadSession, isPy, producerOf, stateOf, taskLink, type TaskContext } from '../context.js';
|
|
35
35
|
|
|
36
36
|
const valueText = (v: unknown): string => (typeof v === 'string' ? v : JSON.stringify(v) ?? String(v));
|
|
37
37
|
const sameJson = (a: unknown, b: unknown): boolean => {
|
|
@@ -56,6 +56,8 @@ export function inputPane(c: TaskContext): TemplateResult {
|
|
|
56
56
|
const params = Object.entries(io.params);
|
|
57
57
|
const { files, earlier } = inputView(io);
|
|
58
58
|
const source = (v: unknown) => io.upstream.find((u) => u.outputs.some((o) => o.file.exists && sameJson(o.file.content, v)));
|
|
59
|
+
// An earlier task a parameter names ("From prepare · a") is given its output there: its row below does not say it again.
|
|
60
|
+
const givenAbove = new Set(params.map(([, v]) => source(v)?.key).filter((k): k is string => !!k));
|
|
59
61
|
return html`<h4 class="sect-h">${msg('Parameters')}</h4>
|
|
60
62
|
${params.length
|
|
61
63
|
? html`<table class="ct-fields params">
|
|
@@ -76,7 +78,7 @@ export function inputPane(c: TaskContext): TemplateResult {
|
|
|
76
78
|
${files.map((f) => inputCard(c, f))}`
|
|
77
79
|
: nothing}
|
|
78
80
|
<h4 class="sect-h">${msg('Earlier tasks')}</h4>
|
|
79
|
-
${earlier.length ? earlier.map((e) => earlierTask(c, e)) : html`<div class="meta">${msg('No earlier tasks')}</div>`}
|
|
81
|
+
${earlier.length ? earlier.map((e) => earlierTask(c, e, givenAbove.has(e.task.key))) : html`<div class="meta">${msg('No earlier tasks')}</div>`}
|
|
80
82
|
${isPy(d) ? nothing : promptSection(c)}`;
|
|
81
83
|
}
|
|
82
84
|
|
|
@@ -120,9 +122,10 @@ function inputCard(c: TaskContext, f: InputFile) {
|
|
|
120
122
|
/**
|
|
121
123
|
* One earlier task: its status, how this task is joined to it (its lineage, in the words of
|
|
122
124
|
* the graph's edges), how many of its output files this task reads, and the others folded
|
|
123
|
-
* under it (open when one did not pass).
|
|
125
|
+
* under it (open when one did not pass). `givenAbove`: a parameter's "From" names it,
|
|
126
|
+
* so its lineage leaves out "given output" and keeps the rest.
|
|
124
127
|
*/
|
|
125
|
-
function earlierTask(c: TaskContext, e: EarlierTask) {
|
|
128
|
+
function earlierTask(c: TaskContext, e: EarlierTask, givenAbove: boolean) {
|
|
126
129
|
const u = e.task;
|
|
127
130
|
const kindName = isPython(u) ? msg('Python task') : msg('Agent task');
|
|
128
131
|
const state = c.outcomes.get(u.key)?.outcome;
|
|
@@ -134,7 +137,7 @@ function earlierTask(c: TaskContext, e: EarlierTask) {
|
|
|
134
137
|
${executorIcon(isPython(u), kindName)}
|
|
135
138
|
${taskLink(c, u)}
|
|
136
139
|
${state ? outcomeChip(state) : nothing}
|
|
137
|
-
${lineageTags(u.lineage ?? [])}
|
|
140
|
+
${lineageTags((u.lineage ?? []).filter((l) => !(givenAbove && l === 'given_from')))}
|
|
138
141
|
<span class="meta">${summary}</span>
|
|
139
142
|
</div>`;
|
|
140
143
|
if (!e.rest.length) return html`<div class="upstream">${head}</div>`;
|
|
@@ -214,24 +217,14 @@ function usageTable(c: TaskContext, rows: JournalRow[]) {
|
|
|
214
217
|
</table></div>`;
|
|
215
218
|
}
|
|
216
219
|
|
|
217
|
-
/** What the task wrote: its output files,
|
|
220
|
+
/** What the task wrote: its output files, tokens and cost, and the later tasks. */
|
|
218
221
|
export function outputPane(c: TaskContext): TemplateResult {
|
|
219
222
|
const d = c.detail;
|
|
220
223
|
const io = d.io;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return html`<h4 class="sect-h">${msg('Output files')}</h4>
|
|
224
|
-
${io.outputs.length
|
|
224
|
+
// The header above names the attempts and how each ended, and the tab names the files: the pane starts with them.
|
|
225
|
+
return html`${io.outputs.length
|
|
225
226
|
? io.outputs.map((o) => ioFileCard(o, 'output', c.run, { producerOf: producerOf(c) }))
|
|
226
227
|
: html`<div class="meta">${msg('No output files')}</div>`}
|
|
227
|
-
${last
|
|
228
|
-
? html`<h4 class="sect-h">${msg('Outcome')}</h4>
|
|
229
|
-
<div class="ct-in">
|
|
230
|
-
${pill({ text: stopLabel(last.stop, last.reason), tone: stopTone(last.stop) })}
|
|
231
|
-
${isLaunched(last) ? html`<span class="meta">${facts(attemptLabel(last.attempt), fmtDur(last.wall_s), correctionsOf(last))}</span>` : nothing}
|
|
232
|
-
|
|
233
|
-
</div>`
|
|
234
|
-
: nothing}
|
|
235
228
|
${usageTable(c, d.rows)}
|
|
236
229
|
<h4 class="sect-h">${msg('Later tasks')}</h4>
|
|
237
230
|
${io.downstream.length ? laterTasks(c, io.downstream) : html`<div class="meta">${msg('No later tasks')}</div>`}`;
|
|
@@ -150,7 +150,8 @@ export class CaTrends extends LitElement {
|
|
|
150
150
|
/** The period, its time zone and the run group: links of the page's address. */
|
|
151
151
|
private controls() {
|
|
152
152
|
const data = this.view?.data;
|
|
153
|
-
|
|
153
|
+
// The time zone control names the zone; an export has none, so its period names it.
|
|
154
|
+
const period = data ? html`<span class="period">${periodLabel(data.period.from, data.period.to, this.exported ? data.period.tz : '')}</span>` : nothing;
|
|
154
155
|
if (this.exported) return html`<div class="controls"><span class="meta">${exportedPeriod()}</span>${period}</div>`;
|
|
155
156
|
const choice = this.days ? String(this.days) : 'dates';
|
|
156
157
|
const today = data?.period.to || new Date().toISOString().slice(0, 10);
|
package/src/locales/ja.ts
CHANGED
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
's051e95917479e3a4': `実行中のエージェントのセッション`,
|
|
53
53
|
's05548eaadd7b3e53': `選択中の項目`,
|
|
54
54
|
's05fd532bd52adeae': `認証エラー`,
|
|
55
|
-
's061a40d8b1403d96': `OutputContract`,
|
|
56
55
|
's0622a6e6cb77254b': `トランスクリプト`,
|
|
57
56
|
's0668067982f84dcb': `ユニットごとのステージとステップ(CursorStore)`,
|
|
58
57
|
's066d70cf9d5e2915': `出力`,
|
|
@@ -108,19 +107,17 @@
|
|
|
108
107
|
's168ae294e3e72ce4': `検証のタイミング`,
|
|
109
108
|
's1703f5cfa8ed0cc9': str`実行されず ${0} 件`,
|
|
110
109
|
's1725258e65a9f38f': str`同じフローの実行 ${0} から見込んだ、この実行がまだ作成していないタスク(forecast)`,
|
|
111
|
-
's179ba9809bdf35c7': `アカウントごと、最初の値 → 最後の値`,
|
|
112
110
|
's17d7937260be87a6': `利用率のルール`,
|
|
113
111
|
's17ee023c53dcd83c': `書き込み待ち(タスクが待機中)`,
|
|
114
112
|
's18d4d02c2e47cf0f': str`ループ内の ${0}`,
|
|
115
113
|
's19785bbda7e548bc': `利用できるモデルなし`,
|
|
116
114
|
's19ed92a422ad7e4c': `上限: max_concurrent`,
|
|
117
115
|
's1a20210c3f1e40c9': str`スキップ ${0} 件`,
|
|
116
|
+
's1a2c5a8f76ad9fe3': str`5 時間枠 ${0} → ${1}`,
|
|
118
117
|
's1a3bf4da26280428': `種別 · ユニット`,
|
|
119
118
|
's1a4311a6ff81c6ec': `モデルごとの、エージェントのセッションの使用量。モデル切り替えの前後は別々に集計(Plan.models)`,
|
|
120
119
|
's1ac8c23d19212c8a': `エディタのテーマ`,
|
|
121
|
-
's1acc85c236fed879': `書き込まれていない出力 1 件(タスクが未実行)`,
|
|
122
120
|
's1b20c3bebd6687ca': str`種別 ${0}`,
|
|
123
|
-
's1bb7c4234aa7d213': `すべてのタスクが開始済み`,
|
|
124
121
|
's1bf54dcd1c885a20': `実行中のプロセスなし`,
|
|
125
122
|
's1c0f7e3a9a6bce79': `パラメータ`,
|
|
126
123
|
's1c2af4de03b03b48': `タスクが選択されていません`,
|
|
@@ -134,7 +131,6 @@
|
|
|
134
131
|
's1e9a9d076c64051d': str`プロンプト(${0} 文字、ほか ${1} 文字は未保存)`,
|
|
135
132
|
's1ebbae8f5810b65b': `入力`,
|
|
136
133
|
's1f25e1e20469a9ea': `削除`,
|
|
137
|
-
's1f53dce0721a5fdc': str`所要時間 ${0}`,
|
|
138
134
|
's2043c2041d0a5142': `安全分類器による停止`,
|
|
139
135
|
's20e04bdc808a6442': str`リセットまで ${0}`,
|
|
140
136
|
's20f936012bd51f12': `依存先タスクが実行されなかった`,
|
|
@@ -149,7 +145,6 @@
|
|
|
149
145
|
's23ba00b0f333e17e': str`${0} 回の試行がすべて失敗: ${1}`,
|
|
150
146
|
's23f40d3ffdd352a6': `定義はまだありません`,
|
|
151
147
|
's2413de2aeb2cad27': str`完了 ${0}`,
|
|
152
|
-
's2575361362fcf642': `OutputContract・InputContract を宣言したタスクはありません`,
|
|
153
148
|
's25f66969239538c1': str`まだ登録されていない種別: ${0}`,
|
|
154
149
|
's26012de2ae38a284': `API 呼び出し 1 回`,
|
|
155
150
|
's26bae2d058ab07f8': `ユニットなし`,
|
|
@@ -160,7 +155,7 @@
|
|
|
160
155
|
's27d5ef7cf527424b': `フローの構成`,
|
|
161
156
|
's28a2fc439aac9783': `リプレイ`,
|
|
162
157
|
's28add9c74fb1b7ef': `曜日と時刻ごと(期間のタイムゾーン)`,
|
|
163
|
-
'
|
|
158
|
+
's29b5ddbe5c1003ee': str`${1} タスク中 ${0} 件`,
|
|
164
159
|
's29b6d46649a71377': str`最大コンテキスト: ${0}`,
|
|
165
160
|
's2a2e8a5afcc8d89a': `現在`,
|
|
166
161
|
's2c0c7686db4c5c18': str`パラメータ ${0}`,
|
|
@@ -173,7 +168,6 @@
|
|
|
173
168
|
's2e422519ed38f7d8': `周`,
|
|
174
169
|
's2f3435308f48080e': str`${0} 周`,
|
|
175
170
|
's2f3c9db4daa3e192': `問題なし`,
|
|
176
|
-
's2f4e0fd086ad4b96': `すべての出力`,
|
|
177
171
|
's2f54740b39931f87': `定義なし`,
|
|
178
172
|
's2faec8a0d7db08dd': str`5 時間枠の利用率 ${0}(リセット ${1})`,
|
|
179
173
|
's2fe3f0ef38a252c7': `ツール`,
|
|
@@ -200,6 +194,7 @@
|
|
|
200
194
|
's3786b7768c22d7fd': `検証エラーの後に、同じエージェントのセッションで続けるラウンド(rounds)`,
|
|
201
195
|
's37da018e1fe6a0d7': `スキーマ以外の検証(validators)`,
|
|
202
196
|
's3841eba6a1c038af': str`${0} を展開`,
|
|
197
|
+
's3850065925d06b86': `各タスクが読み込むファイル(InputContract)`,
|
|
203
198
|
's3850111242895c2f': str`修正ラウンド ${0}`,
|
|
204
199
|
's387a4a41718122cb': str`検索結果 ${0} 件`,
|
|
205
200
|
's38e65cca012f316f': `修正依頼のプロンプトに含めて送信`,
|
|
@@ -209,6 +204,7 @@
|
|
|
209
204
|
's3a72e9d65b4a1ccb': str`上限: ${0}`,
|
|
210
205
|
's3aa67b8233b5ecd0': `出力ファイルなし`,
|
|
211
206
|
's3b32dd23d086c992': `プロセスツリー`,
|
|
207
|
+
's3b8db9525c909688': `アカウント全体の値 | アカウントごとの最初と最後の値 | エージェントのセッション開始時に取得`,
|
|
212
208
|
's3b9cab5f0aaad29d': str`${0} にモニター API がありません: ${1}`,
|
|
213
209
|
's3bde79a5267baa21': str`task_detail コールバックが失敗: ${0}`,
|
|
214
210
|
's3c6c1ae328e812d5': `実行した試行の回数`,
|
|
@@ -220,10 +216,10 @@
|
|
|
220
216
|
's3d99e317c3b7b422': `検証エラー後の、同じエージェントのセッション`,
|
|
221
217
|
's3d9b2f1277134dfc': `テキストファイル`,
|
|
222
218
|
's3dd137f6b70ab45f': `ネットワークエラーで応答なし`,
|
|
223
|
-
's3f18b1a78ce1a960': `各タスクが書き込むファイル`,
|
|
224
219
|
's3f7074a6bbbd7726': `修正依頼`,
|
|
225
220
|
's3fd6bd99e3f6a5be': `開始`,
|
|
226
221
|
's3fda7269dc9d47ba': `このタスクの出力が後続タスクのパラメータに含まれる(given_from)`,
|
|
222
|
+
's3ffb8ae91df75075': str`認証情報: ${0}`,
|
|
227
223
|
's40750d44c5ea3271': str`${0}: 入力`,
|
|
228
224
|
's4085b471de2e2215': `週の利用率`,
|
|
229
225
|
's4134711b0b981089': `Tab: 次のノード`,
|
|
@@ -235,7 +231,6 @@
|
|
|
235
231
|
's451bb7dd42aaf221': `料金の高いタスク`,
|
|
236
232
|
's454c0dcbb0dffc2f': str`${0} のループの各周`,
|
|
237
233
|
's45de7528c20a0792': str`${0}(カスタムビュー)`,
|
|
238
|
-
's46694c626352a2a7': `モデル切り替えのあったタスク 1 件`,
|
|
239
234
|
's467ceab5071e77a3': str`1 周: ${0}`,
|
|
240
235
|
's473bad4c26a1a663': `キャッシュ読み込み`,
|
|
241
236
|
's478b912874fef59f': `検証対象のファイル(OutputContract、InputContract)`,
|
|
@@ -270,13 +265,12 @@
|
|
|
270
265
|
's525b03a82e5421df': `失敗の後の、次のモデルでの新しいエージェントのセッション(Router のホップ)`,
|
|
271
266
|
's525c011dcf23c207': `記録から再生した試行(replayed)`,
|
|
272
267
|
's529efbcb1a0cf166': str`上限 ${0}`,
|
|
273
|
-
's52bd9d64b4c399df': `このバージョンの contraagent が対応していないイベント種別(unread_events)`,
|
|
274
|
-
's52c75c50315f2111': `次の周`,
|
|
275
268
|
's52cce0c30a5db40c': str`${0} の締め切りと仕上げの猶予を過ぎた`,
|
|
276
269
|
's52cfd5bdf53cbac3': `カスタムビュー`,
|
|
277
270
|
's535a5e9dfeb308f0': `種別`,
|
|
278
271
|
's53c57cf5a0992de1': str`${0}: 未実行`,
|
|
279
272
|
's53c8c76220414382': `不可`,
|
|
273
|
+
's53ebfdf5583cbe71': `次の周`,
|
|
280
274
|
's5410888308ba73df': `開始できず`,
|
|
281
275
|
's54393bfa280ea55b': `プロンプト`,
|
|
282
276
|
's552240946fb80e49': str`フロー呼び出し ${0}`,
|
|
@@ -310,6 +304,7 @@
|
|
|
310
304
|
's5cfa1889ee16f534': `値なし`,
|
|
311
305
|
's5d0bd939d106436c': `実行中にこのタスクが占有する名前(claims)`,
|
|
312
306
|
's5d4b0dd369b6083e': str`${0} 回目で完了 | 失敗 ${1} 回`,
|
|
307
|
+
's5d51d4e0b343cf54': str`利用率: ${0}`,
|
|
313
308
|
's5da52af9b083c29a': `モデル`,
|
|
314
309
|
's5de9d2dc62f214f9': `依存先タスク`,
|
|
315
310
|
's5e30a7b87ccdc74f': `書き込みなし(タスクが未実行)`,
|
|
@@ -325,6 +320,7 @@
|
|
|
325
320
|
's60147fb4fa4a8e0c': `実行中`,
|
|
326
321
|
's605757aea05668c5': str`未実行の後続タスク ${0} 件`,
|
|
327
322
|
's62035be5de828c62': `キャッシュ書き込み`,
|
|
323
|
+
's620484486a1868e2': str`このバージョンの contraagent が読めなかったイベント(unread_events): ${0}`,
|
|
328
324
|
's629576c6b305d539': `任意`,
|
|
329
325
|
's647582a62a567663': `応答が JSON ではなく HTML`,
|
|
330
326
|
's649816288746372b': `後続タスク`,
|
|
@@ -389,7 +385,6 @@
|
|
|
389
385
|
's79a4abd140c07a19': str`未対応のイベント: ${0}`,
|
|
390
386
|
's79faeb77f29174c8': str`5 時間枠の利用率 ${0}`,
|
|
391
387
|
's7a14301773287a5c': `エラーで終了したフロー呼び出し 1 件`,
|
|
392
|
-
's7a30a0774744040b': `出力ファイル`,
|
|
393
388
|
's7a4c9d94aaf75c45': `権限エラー`,
|
|
394
389
|
's7b16665b242b03f9': `入力ファイルなし`,
|
|
395
390
|
's7b1cef9707986270': `修正依頼のあった試行`,
|
|
@@ -407,8 +402,8 @@
|
|
|
407
402
|
's803ce7e1a2294d50': `ファイル`,
|
|
408
403
|
's8076e2fb2b749dd1': `実行 1 件`,
|
|
409
404
|
's80c0e9fb2bb2e230': `1 行`,
|
|
410
|
-
's8162d2730a5efc31': `モデル切り替えなし`,
|
|
411
405
|
's81729579ad44c896': `変更したファイル 1 件`,
|
|
406
|
+
's81a4ee43fe0936ee': `各タスクが書き込むファイル(OutputContract)`,
|
|
412
407
|
's822f38a61c9dbabc': str`以前の試行のモデル: ${0}`,
|
|
413
408
|
's826d5aa7edf4f1db': `エージェントのセッションが使ったモデル`,
|
|
414
409
|
's8273cf03c84a59ef': `認証情報が休止中`,
|
|
@@ -464,7 +459,6 @@
|
|
|
464
459
|
's90e8d2050eab6478': `ほかの種別が実装する種別(base_kind)`,
|
|
465
460
|
's90f3ce6dfe4ed0ce': `認証エラー`,
|
|
466
461
|
's9147091d090a92d4': str`最大 ${0} 周`,
|
|
467
|
-
's915525f01e5ebdb9': str`モデル ${0} 種類`,
|
|
468
462
|
's919d209719302bd3': str`${0}d ${1}h`,
|
|
469
463
|
's91d2138e1db80125': `順序のみの依存先`,
|
|
470
464
|
's9246c889a0392130': str`モデル ${0}`,
|
|
@@ -489,7 +483,6 @@
|
|
|
489
483
|
's98b1cb8fb62909ec': `グループ`,
|
|
490
484
|
's98fc8cf0000154d3': `入力ファイルなし`,
|
|
491
485
|
's9976b5befb314c64': str`${0} 日間`,
|
|
492
|
-
's9a23fee499e1a22d': `すべてのプロセス`,
|
|
493
486
|
's9a44f95f7acf28e0': str`失敗: ${0}`,
|
|
494
487
|
's9a629cca97d7a771': str`Web 検索 ${0} 回`,
|
|
495
488
|
's9aa7daedb08fe44c': `API 呼び出し 1 回あたりの入力の最大値。キャッシュ読み込みとキャッシュ書き込みを含む(peak_context)`,
|
|
@@ -528,9 +521,8 @@
|
|
|
528
521
|
'sa390213ff60c0fd9': str`実行中のエージェントのセッションの新しいイベント ${0} 件を表示`,
|
|
529
522
|
'sa3c9339de23c1752': `形式`,
|
|
530
523
|
'sa3d3f3845c4fa2c4': str`週の利用率 ${0}(リセット ${1})`,
|
|
524
|
+
'sa3db40076838d4d7': `エージェント・モデル`,
|
|
531
525
|
'sa3deee7949f9fece': `停止`,
|
|
532
|
-
'sa3ed6953c910cb53': `アカウント全体の値 | エージェントのセッション開始時に取得`,
|
|
533
|
-
'sa3f961297cb9207f': `各タスクが読み込むファイル`,
|
|
534
526
|
'sa434ad4d2100f245': `作成元`,
|
|
535
527
|
'sa48318e1513f445c': `コマンドライン`,
|
|
536
528
|
'sa4f4addc6a836fcf': str`最大 ${0} 回`,
|
|
@@ -538,7 +530,6 @@
|
|
|
538
530
|
'sa50a6326530d8a0d': `折りたたむ`,
|
|
539
531
|
'sa5441ff1c4c71a32': `API 呼び出しごとのトークンは不明`,
|
|
540
532
|
'sa57b5e86ecb7d735': `権限エラーになったツール呼び出し`,
|
|
541
|
-
'sa58fd816ed43f98e': `周回数`,
|
|
542
533
|
'sa6295f265bf36f55': str`${0}: トランスクリプト`,
|
|
543
534
|
'sa66db52d0401c35d': str`前の ${0} 行を表示`,
|
|
544
535
|
'sa6ab5184d6315895': `開始日`,
|
|
@@ -555,6 +546,7 @@
|
|
|
555
546
|
'sa9dbdda88ddccf5c': `報告なし`,
|
|
556
547
|
'saa08e9b351f629c4': `書き込み待ち(タスクが実行中)`,
|
|
557
548
|
'saa29a2ac03cd9d19': `理由`,
|
|
549
|
+
'saa9614e57f673c62': `OutputContract・InputContract を宣言したタスクなし`,
|
|
558
550
|
'saaaf4d8d7823ecc2': `5 時間枠の利用率`,
|
|
559
551
|
'saab875d8cfcfe712': `テーマ`,
|
|
560
552
|
'sab5bbfc5ec1101a1': str`${0} 行目`,
|
|
@@ -577,6 +569,7 @@
|
|
|
577
569
|
'sb05ee36313adad06': `エラー`,
|
|
578
570
|
'sb067d7b999cdf867': `実行履歴の修正依頼のあった試行`,
|
|
579
571
|
'sb0c5ebf2450daf53': `サブスクリプションの利用率`,
|
|
572
|
+
'sb0cc319c72ab8ad8': str`週 ${0} → ${1}`,
|
|
580
573
|
'sb0fd4b074f0dc196': `Python タスク 1 回`,
|
|
581
574
|
'sb105a27af3c34dd9': str`未実行: ${0}`,
|
|
582
575
|
'sb1068f146c4596c3': `検索語`,
|
|
@@ -592,7 +585,6 @@
|
|
|
592
585
|
'sb31160f9d54a1178': str`プロンプト(${0} 文字)`,
|
|
593
586
|
'sb34b61edb59f7b62': str`変更したファイル ${0} 件`,
|
|
594
587
|
'sb38cfd00b497faae': `ツール呼び出し`,
|
|
595
|
-
'sb45a9b8907f0b38a': `リトライしたタスク 1 件`,
|
|
596
588
|
'sb4d67c0a20dacf94': `トランスクリプトなし`,
|
|
597
589
|
'sb51d4fbebeb0e2ec': `パイプラインのプロセス内`,
|
|
598
590
|
'sb53f7a197981b790': `はい`,
|
|
@@ -600,8 +592,10 @@
|
|
|
600
592
|
'sb594f8019b3bf708': str`コンテキストの上限に接近(${0}%)`,
|
|
601
593
|
'sb5ae7a6b849639af': `未実行`,
|
|
602
594
|
'sb6bb16aa7550533d': `タスク実行中の書き込みが必須`,
|
|
595
|
+
'sb7471868c78302d7': `下の階層あり`,
|
|
603
596
|
'sb76f9199c15fe03c': str`${0} に停止`,
|
|
604
597
|
'sb8127ffb12a5fb54': `実行したエージェントのセッションのトークンは不明(usage_unknown)`,
|
|
598
|
+
'sb8878a0ec9a8c292': `このバージョンの contraagent が読めなかったイベント(unread_events)`,
|
|
605
599
|
'sb89b16909f010061': `エージェントのセッション 1 回`,
|
|
606
600
|
'sb945184259a5d73c': str`5 時間枠(${0})`,
|
|
607
601
|
'sb9724d1e7908c74c': `コンテキストの上限に接近`,
|
|
@@ -612,9 +606,7 @@
|
|
|
612
606
|
'sba781480d2e52d6a': `ほかの出力 1 件`,
|
|
613
607
|
'sba8659178319945b': `検証を通るファイルを書き込む前に、タスクが失敗`,
|
|
614
608
|
'sbaf87689cccc53eb': `要素 1 個`,
|
|
615
|
-
'sbb0f058643587149': str`このバージョンの contraagent が対応していないイベント種別(unread_events): ${0}`,
|
|
616
609
|
'sbb202211084591ed': `開始時の利用率`,
|
|
617
|
-
'sbb77dd1d4c08e701': str`${1} タスク中 ${0} 件が未完了`,
|
|
618
610
|
'sbb99d4ec27fbb263': `終了`,
|
|
619
611
|
'sbbe1ac88d71c2fec': `入力元`,
|
|
620
612
|
'sbc65d1b9648966de': str`${0} 周: ${1}`,
|
|
@@ -644,11 +636,11 @@
|
|
|
644
636
|
'sc53249f5adb55c77': `休止した認証情報`,
|
|
645
637
|
'sc54183a104e8da25': str`${0} の締め切りを過ぎた`,
|
|
646
638
|
'sc5751344f7cedf0f': str`入力 ${0} に検証エラー`,
|
|
639
|
+
'sc59982d9c1f538fa': str`${2} 年 ${0}〜${1}`,
|
|
647
640
|
'sc5b9f26a8c698f76': `次のモデルでの新しいエージェントのセッション`,
|
|
648
641
|
'sc61813a1424783fc': str`週 ${0}`,
|
|
649
642
|
'sc65ea2cf2f21a13a': `縮小`,
|
|
650
643
|
'sc683c10250a1b719': `日時`,
|
|
651
|
-
'sc6c0d07e39170334': str`書き込まれていない出力 ${0} 件(タスクが未実行)`,
|
|
652
644
|
'sc6e4815e573036bd': `締め切りまでに終わらない`,
|
|
653
645
|
'sc6fd207e5b80c46e': str`エラーで終了したフロー呼び出し ${0} 件`,
|
|
654
646
|
'sc732f2e2fbe9f15e': `開始`,
|
|
@@ -668,6 +660,7 @@
|
|
|
668
660
|
'scb862deeee160b4a': `終了(未完了のタスク 1 件)`,
|
|
669
661
|
'scb967cb2ce8bd344': `最終試行の終了時刻`,
|
|
670
662
|
'scbd3558d2cfc7dc3': `全文`,
|
|
663
|
+
'scbfbd1c90da088a2': str`試行 ${1} 回中 ${0} 回`,
|
|
671
664
|
'sccad21b77f9a317c': str`最も高い種別: ${0}`,
|
|
672
665
|
'sccce3de7b4abfdfe': `モデルが応答を拒否`,
|
|
673
666
|
'scd16bc5ac18bdf91': `モデルの応答`,
|
|
@@ -718,14 +711,11 @@
|
|
|
718
711
|
'sdb80a6330c0fa072': `出力に検証エラー`,
|
|
719
712
|
'sdc40078597054827': str`実行グループ ${0}`,
|
|
720
713
|
'sdd178845f5450ded': `モニターから応答がありません`,
|
|
721
|
-
'sdd4a8ac67f7885c1': `モデル 1 種類`,
|
|
722
|
-
'sdd826d4b3e02f41b': `修正依頼なし`,
|
|
723
714
|
'sddf65e6dc438188d': `ビューを表示`,
|
|
724
715
|
'sde3961511d128fcd': str`作業ディレクトリ ${0}`,
|
|
725
716
|
'sde7cbc4291a82cc4': `履歴にほか 1 件`,
|
|
726
717
|
'sde88e8c24887ecfe': str`アカウント ${0}`,
|
|
727
718
|
'sdf14d39488c16f16': str`${0} 回目で完了 | 失敗 1 回 | 最初の失敗: ${1}`,
|
|
728
|
-
'sdf452c95fdeb4be0': `リトライなし`,
|
|
729
719
|
'sdf922ccc13491763': `リトライ後に完了`,
|
|
730
720
|
'se0e6bb970987cfb7': str`${0} から休止中`,
|
|
731
721
|
'se0edc9b6c4e14371': str`実行されず: ${0}`,
|
|
@@ -737,7 +727,6 @@
|
|
|
737
727
|
'se2cd8c3175e8f91f': str`期待する型: ${0}`,
|
|
738
728
|
'se3b4c857f91f80d7': `キーボードショートカット`,
|
|
739
729
|
'se414b08e593473b2': `作成、試行の失敗後も保持`,
|
|
740
|
-
'se4ba2b7d91bd3060': `修正依頼のあったタスク 1 件`,
|
|
741
730
|
'se55f1e3401225b3f': `エージェントのセッションの所要時間の合計`,
|
|
742
731
|
'se5ad61b61dc5c4f6': `モデル切り替え`,
|
|
743
732
|
'se5af45314a3a6b0f': str`修正ラウンド ${0}`,
|
|
@@ -747,7 +736,6 @@
|
|
|
747
736
|
'se61f0dc09b51fd35': `パイプラインのプロセス内の関数`,
|
|
748
737
|
'se66872955dc59191': `1 タスク`,
|
|
749
738
|
'se6982e1c5d0986ac': `後続タスクはこのタスクの完了を待つが、出力は受け取らない(after)`,
|
|
750
|
-
'se6de387a56331077': `下の階層あり`,
|
|
751
739
|
'se7102b7d5942a59c': str`${0} 回目`,
|
|
752
740
|
'se751edc73f4d0062': `リプレイと新しいセッション`,
|
|
753
741
|
'se7bc5096d48d4c1c': str`タスクの所要時間 ${0}`,
|
|
@@ -788,7 +776,6 @@
|
|
|
788
776
|
'sf14df172fd566bcc': `最初のエージェントのセッション`,
|
|
789
777
|
'sf260150b06ca44e5': str`実行 ${0} 件`,
|
|
790
778
|
'sf2b0c091b94a0303': `トークンの報告なし`,
|
|
791
|
-
'sf2c0a590370f775e': `すべての試行が完了`,
|
|
792
779
|
'sf2d62a5d815803af': str`関数 ${0}`,
|
|
793
780
|
'sf2e5c0d258c9b689': `定義`,
|
|
794
781
|
'sf39e43f2714690bc': `周回数`,
|
package/src/words/quota.ts
CHANGED
|
@@ -49,6 +49,12 @@ export function resetsIn(iso: string | null | undefined, now = Date.now()): stri
|
|
|
49
49
|
export const readingShort = (r: QuotaReading): string =>
|
|
50
50
|
facts(msg(str`weekly ${pct(r.seven_day_pct)}`), msg(str`5-hour ${pct(r.five_hour_pct)}`));
|
|
51
51
|
|
|
52
|
+
/** A reading and the next one, window by window ("weekly 41% → 43% | 5-hour 14% → 28%"); the first alone when there is no next. */
|
|
53
|
+
export const readingChange = (a: QuotaReading, b: QuotaReading | null | undefined): string =>
|
|
54
|
+
b
|
|
55
|
+
? facts(msg(str`weekly ${pct(a.seven_day_pct)} → ${pct(b.seven_day_pct)}`), msg(str`5-hour ${pct(a.five_hour_pct)} → ${pct(b.five_hour_pct)}`))
|
|
56
|
+
: readingShort(a);
|
|
57
|
+
|
|
52
58
|
/** A reading in full, for a tooltip: both windows, their resets, when it arrived. */
|
|
53
59
|
export function readingTip(r: QuotaReading): string {
|
|
54
60
|
const parts = [
|
package/src/words/run-line.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The monitor's one-line summaries of a run: the header's run line and the
|
|
2
|
-
//
|
|
3
|
-
import { deriveRun, elapsedS, runAccounts, spendOf, type RunDerived, type RunState, type RunSummary } from '@contraagent/api';
|
|
2
|
+
// list bar's count while a filter is on.
|
|
3
|
+
import { deriveRun, elapsedS, runAccounts, spendOf, type RunDerived, type RunState, type RunSummary, type TryCounts } from '@contraagent/api';
|
|
4
4
|
import { msg, str } from '@lit/localize';
|
|
5
5
|
import { facts, fmtDur, usd } from './format.js';
|
|
6
6
|
import { stateCount } from './outcome.js';
|
|
@@ -29,11 +29,14 @@ export function runLine(state: RunState, summary: RunSummary, derived: RunDerive
|
|
|
29
29
|
return facts(msg(str`${c.doneTotal} of ${c.total} tasks done`), notRun, tail);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/** The history bar's count,
|
|
33
|
-
export function
|
|
34
|
-
return facts(
|
|
32
|
+
/** The history bar's count while a filter is on: the attempts shown of all, and the tasks shown that did not start ("12 of 23 attempts | 1 not started"). */
|
|
33
|
+
export function shownTriesLine(shown: TryCounts, all: number): string {
|
|
34
|
+
return facts(msg(str`${shown.tries} of ${all} attempts`), shown.notStarted ? stateCount('not_started', shown.notStarted) : '');
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/** The tasks bar's count while a filter is on ("12 of 30 tasks"). */
|
|
38
|
+
export const shownTasksLine = (shown: number, all: number): string => msg(str`${shown} of ${all} tasks`);
|
|
39
|
+
|
|
37
40
|
/** A stub run's mark (`RunSummary.stub`): its tasks were played by the stub agent. */
|
|
38
41
|
export const stubLabel = (): string => msg('stub agent', { desc: 'A run whose tasks a coding agent with scripted replies played' });
|
|
39
42
|
|
package/src/words/trends.ts
CHANGED
|
@@ -16,10 +16,12 @@ export function dayLabel(day: string, locale: string = getLocale()): string {
|
|
|
16
16
|
return new Intl.DateTimeFormat(locale, { month: 'short', day: 'numeric', timeZone: 'UTC' }).format(d);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
/** The period in words: `Oct 1 to Oct 14, 2026
|
|
20
|
-
export function periodLabel(from: string, to: string, tz
|
|
19
|
+
/** The period in words: `Oct 1 to Oct 14, 2026`, and its time zone after it when given (`| Asia/Tokyo`: where no time zone control names it). */
|
|
20
|
+
export function periodLabel(from: string, to: string, tz = '', locale: string = getLocale()): string {
|
|
21
21
|
const year = to.slice(0, 4);
|
|
22
|
-
return
|
|
22
|
+
return tz
|
|
23
|
+
? msg(str`${dayLabel(from, locale)} to ${dayLabel(to, locale)}, ${year} | ${tz}`, { desc: 'The days the trends cover, and the time zone they are counted in' })
|
|
24
|
+
: msg(str`${dayLabel(from, locale)} to ${dayLabel(to, locale)}, ${year}`, { desc: 'The days the trends cover' });
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
/** A length of period ending today: `7 days`. */
|