copilot-operator 0.1.42 → 0.1.43
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/dist/src/api/operator.controller.js +131 -0
- package/dist/src/api/operator.service.js +335 -3
- package/dist/src/api/server.js +16 -0
- package/dist/src/cli.js +12 -0
- package/dist/src/config/schema.js +10 -0
- package/dist/src/orchestrator/taskRunner.js +109 -38
- package/dist/src/plan/brief.js +57 -20
- package/dist/src/plan/changes.js +217 -0
- package/dist/src/plan/schema.js +1 -1
- package/dist/src/plan/systemGuide.js +597 -12
- package/dist/src/session/compose.js +15 -1
- package/dist/src/session/model.js +1 -1
- package/dist/src/session/store.js +60 -0
- package/dist/src/vcs/taskVcs.js +110 -1
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/WmzBz4QN36pcz4PL_cfEW/_buildManifest.js +1 -0
- package/dist/web/_next/static/chunks/499-751e0be9d4f86e2d.js +1 -0
- package/dist/web/_next/static/chunks/549-2415dd26f4e53d07.js +1 -0
- package/dist/web/_next/static/chunks/699-9d031f8c145a0465.js +1 -0
- package/dist/web/_next/static/chunks/867-aea30f560bc18eaf.js +1 -0
- package/dist/web/_next/static/chunks/897-5a34109533c3da50.js +1 -0
- package/dist/web/_next/static/chunks/app/defaults/page-56134fbb8cc7554f.js +1 -0
- package/dist/web/_next/static/chunks/app/history/{page-47973539ceff81d6.js → page-0bb537407fed5944.js} +1 -1
- package/dist/web/_next/static/chunks/app/import/{page-999d6cd958989723.js → page-8ef75fc08638e75f.js} +1 -1
- package/dist/web/_next/static/chunks/app/layout-dc602b727480a653.js +1 -0
- package/dist/web/_next/static/chunks/app/page-d73a8ff300862cd8.js +1 -0
- package/dist/web/_next/static/chunks/app/{page-e557d58476ae6383.js → sessions/page-28376d2e4a9b4738.js} +1 -1
- package/dist/web/_next/static/chunks/app/sessions/view/page-afc235a9171535d8.js +1 -0
- package/dist/web/_next/static/css/{0e55721108c300f2.css → 72c85e4322c21223.css} +1 -1
- package/dist/web/appearance.html +2 -2
- package/dist/web/appearance.txt +25 -28
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +25 -28
- package/dist/web/history.html +2 -2
- package/dist/web/history.txt +25 -28
- package/dist/web/import.html +2 -2
- package/dist/web/import.txt +25 -28
- package/dist/web/index.html +2 -2
- package/dist/web/index.txt +25 -28
- package/dist/web/level1.html +2 -2
- package/dist/web/level1.txt +25 -28
- package/dist/web/presets.html +3 -3
- package/dist/web/presets.txt +25 -28
- package/dist/web/sessions/view.html +2 -2
- package/dist/web/sessions/view.txt +25 -28
- package/dist/web/sessions.html +16 -0
- package/dist/web/sessions.txt +26 -0
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +25 -28
- package/package.json +4 -2
- package/dist/web/_next/static/chunks/204-db82ca47ff211e21.js +0 -1
- package/dist/web/_next/static/chunks/499-39b2c00bda3656f0.js +0 -1
- package/dist/web/_next/static/chunks/549-348b0a1404407e5a.js +0 -1
- package/dist/web/_next/static/chunks/867-7d86a692260006f1.js +0 -1
- package/dist/web/_next/static/chunks/app/defaults/page-a25c40436fc312db.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-6ee612d25e78b246.js +0 -1
- package/dist/web/_next/static/chunks/app/sessions/view/page-872d8b9fe8eedbbf.js +0 -1
- package/dist/web/_next/static/lDmqS7pWU_B_Ac5idPvdS/_buildManifest.js +0 -1
- /package/dist/web/_next/static/{lDmqS7pWU_B_Ac5idPvdS → WmzBz4QN36pcz4PL_cfEW}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { describeInterruption } from './interruption.js';
|
|
2
|
+
/** The operator's notes about a task, as the chat is given them: with the opening, or with a report while it runs. */
|
|
3
|
+
export function operatorNotesSection(notes, whileWorking) {
|
|
4
|
+
if (notes.length === 0)
|
|
5
|
+
return '';
|
|
6
|
+
return [
|
|
7
|
+
whileWorking
|
|
8
|
+
? `## ${notes.length > 1 ? 'Notes' : 'A note'} from the operator, while you work`
|
|
9
|
+
: `## ${notes.length > 1 ? 'Notes' : 'A note'} from the operator about this task`,
|
|
10
|
+
'',
|
|
11
|
+
'Take this into account from now on; where it and the task disagree, this wins.',
|
|
12
|
+
'',
|
|
13
|
+
...notes.map((n) => (notes.length > 1 ? `- ${n.text.trim().replace(/\n/g, '\n ')}` : n.text.trim())),
|
|
14
|
+
].join('\n');
|
|
15
|
+
}
|
|
2
16
|
const LEVEL2_HEADER = '## Project instructions (level 2)';
|
|
3
17
|
const TASK_HEADER = '## Task';
|
|
4
18
|
/**
|
|
@@ -11,7 +25,7 @@ const TASK_HEADER = '## Task';
|
|
|
11
25
|
* and a note that is empty simply leaves nothing behind.
|
|
12
26
|
*/
|
|
13
27
|
function runnerBlock(input) {
|
|
14
|
-
const notes = [input.workDirNote, input.readOnlyNote, input.scopeNote, input.approachesNote, input.vcsNote, input.shellNote, input.planNote].map((n) => (n ?? '').trim()).filter((n) => n.length > 0);
|
|
28
|
+
const notes = [input.workDirNote, input.readOnlyNote, input.scopeNote, input.approachesNote, input.vcsNote, input.shellNote, input.planNote, input.operatorNotes].map((n) => (n ?? '').trim()).filter((n) => n.length > 0);
|
|
15
29
|
return notes.length > 0 ? `${notes.join('\n\n')}\n\n` : '';
|
|
16
30
|
}
|
|
17
31
|
/**
|
|
@@ -12,7 +12,7 @@ export function tidyVcsPlan(plan) {
|
|
|
12
12
|
return undefined;
|
|
13
13
|
return { ...(branch ? { branch } : {}), ...(commitMessage ? { commitMessage } : {}) };
|
|
14
14
|
}
|
|
15
|
-
const clipText = (s, n) => {
|
|
15
|
+
export const clipText = (s, n) => {
|
|
16
16
|
const t = (s ?? '').trim();
|
|
17
17
|
if (!t)
|
|
18
18
|
return undefined;
|
|
@@ -108,6 +108,9 @@ export const TASK_FIELD_ON_RERUN = {
|
|
|
108
108
|
environment: 'archived',
|
|
109
109
|
handoff: 'archived',
|
|
110
110
|
plan: 'archived',
|
|
111
|
+
accepted: 'archived',
|
|
112
|
+
// Every note stays with the task; the ones not sent yet go out with the next attempt's opening.
|
|
113
|
+
notes: 'kept',
|
|
111
114
|
interruption: 'cleared',
|
|
112
115
|
finalReply: 'cleared',
|
|
113
116
|
firstMessage: 'cleared',
|
|
@@ -566,6 +569,61 @@ export class SessionStore {
|
|
|
566
569
|
...(text ? { instruction: text } : {}),
|
|
567
570
|
});
|
|
568
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* A note from the operator to the chat about this task (2026-10-14): it goes out with the next message the
|
|
574
|
+
* task sends — the opening of its next attempt, or the next report while it runs. See `Task.notes`.
|
|
575
|
+
*/
|
|
576
|
+
async addTaskNote(sessionId, taskId, text) {
|
|
577
|
+
const note = text.trim();
|
|
578
|
+
if (!note)
|
|
579
|
+
throw new Error('The note is empty.');
|
|
580
|
+
if (note.length > MAX_INSTRUCTION_CHARS)
|
|
581
|
+
throw new Error(`The note is ${note.length} characters; it can be at most ${MAX_INSTRUCTION_CHARS}.`);
|
|
582
|
+
let result;
|
|
583
|
+
await this.updateSession(sessionId, (s) => {
|
|
584
|
+
const t = s.tasks.find((x) => x.id === taskId);
|
|
585
|
+
if (!t)
|
|
586
|
+
throw new Error(`Task ${taskId} does not exist in session ${sessionId}.`);
|
|
587
|
+
t.notes = [...(t.notes ?? []), { id: newId('n-'), text: note, at: new Date().toISOString() }];
|
|
588
|
+
result = t;
|
|
589
|
+
});
|
|
590
|
+
return result;
|
|
591
|
+
}
|
|
592
|
+
/** Marks notes as sent with this attempt's message; returns the ones it marked. */
|
|
593
|
+
async takeUnsentNotes(sessionId, taskId) {
|
|
594
|
+
let taken = [];
|
|
595
|
+
await this.updateSession(sessionId, (s) => {
|
|
596
|
+
const t = s.tasks.find((x) => x.id === taskId);
|
|
597
|
+
if (!t?.notes?.some((n) => !n.sentAt))
|
|
598
|
+
return;
|
|
599
|
+
const at = new Date().toISOString();
|
|
600
|
+
taken = t.notes.filter((n) => !n.sentAt);
|
|
601
|
+
t.notes = t.notes.map((n) => (n.sentAt ? n : { ...n, sentAt: at, attempt: t.attempt ?? 1 }));
|
|
602
|
+
});
|
|
603
|
+
return taken;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* The operator accepts a task as done though it did not end so (2026-10-14): what it was is kept beside it,
|
|
607
|
+
* and the run's chain goes on past it as past any done task.
|
|
608
|
+
*/
|
|
609
|
+
async acceptTask(sessionId, taskId, note) {
|
|
610
|
+
const text = note?.trim() || undefined;
|
|
611
|
+
if (text && text.length > MAX_INSTRUCTION_CHARS)
|
|
612
|
+
throw new Error(`The note is ${text.length} characters; it can be at most ${MAX_INSTRUCTION_CHARS}.`);
|
|
613
|
+
let result;
|
|
614
|
+
await this.updateSession(sessionId, (s) => {
|
|
615
|
+
const t = s.tasks.find((x) => x.id === taskId);
|
|
616
|
+
if (!t)
|
|
617
|
+
throw new Error(`Task ${taskId} does not exist in session ${sessionId}.`);
|
|
618
|
+
if (!['failed', 'blocked', 'limit-reached', 'aborted'].includes(t.status)) {
|
|
619
|
+
throw new Error(t.status === 'done' ? 'This task is done already.' : 'Only a task that ended without being done can be accepted as done.');
|
|
620
|
+
}
|
|
621
|
+
t.accepted = { at: new Date().toISOString(), was: t.status, ...(t.reason ? { reason: t.reason } : {}), ...(text ? { note: text } : {}) };
|
|
622
|
+
t.status = 'done';
|
|
623
|
+
result = t;
|
|
624
|
+
});
|
|
625
|
+
return result;
|
|
626
|
+
}
|
|
569
627
|
/**
|
|
570
628
|
* What a new attempt does with each field of a task — see `TASK_FIELD_ON_RERUN`.
|
|
571
629
|
*/
|
|
@@ -621,6 +679,7 @@ export class SessionStore {
|
|
|
621
679
|
artifactsKept: t.artifactsKept,
|
|
622
680
|
vcs: t.vcs,
|
|
623
681
|
plan: t.plan,
|
|
682
|
+
accepted: t.accepted,
|
|
624
683
|
},
|
|
625
684
|
];
|
|
626
685
|
// An edit is applied only after the old attempt has been put beyond its reach.
|
|
@@ -654,6 +713,7 @@ export class SessionStore {
|
|
|
654
713
|
t.stats = undefined;
|
|
655
714
|
t.handoff = undefined;
|
|
656
715
|
t.plan = undefined;
|
|
716
|
+
t.accepted = undefined;
|
|
657
717
|
t.scopeReverted = undefined;
|
|
658
718
|
t.treeChanged = undefined;
|
|
659
719
|
t.inputsRestored = undefined;
|
package/dist/src/vcs/taskVcs.js
CHANGED
|
@@ -4,7 +4,7 @@ import { dirtyBesidesInputs, inputSettings, inputsNote, settleInputs } from './i
|
|
|
4
4
|
import { artifactPatterns, excludeArtifacts } from './artifacts.js';
|
|
5
5
|
import { workingTreePaths } from './git.js';
|
|
6
6
|
import { inScope } from './scope.js';
|
|
7
|
-
import { branchExists, branchNameFrom, describeUpdate, updateFromRemote, localBranches, commitAll, commitFiles, commitsBetween, commitSubject, createBranch, foreignCommits, isAncestor, checkoutExisting, freeBranchName, git, isValidBranchName, plannedBranchName, repoState } from './git.js';
|
|
7
|
+
import { branchExists, branchNameFrom, describeUpdate, updateFromRemote, localBranches, commitAll, commitFiles, commitsBetween, commitSubject, createBranch, foreignCommits, isAncestor, checkoutExisting, freeBranchName, git, isValidBranchName, plannedBranchName, repoState, RUNNER_EMAIL } from './git.js';
|
|
8
8
|
/** Which repository a session works in: its own setting, else the project it mirrors. */
|
|
9
9
|
export function repoDirOf(session) {
|
|
10
10
|
return (session.vcs?.repoDir?.trim() || session.projectDir?.trim() || '').trim();
|
|
@@ -1149,6 +1149,115 @@ export async function restoreToBase(session, task, bus) {
|
|
|
1149
1149
|
keptOn: preview.keptOn,
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
+
/** The line a per-session task's work is on now: the session's branch, or the existing branch it works on. */
|
|
1153
|
+
function sessionLine(session) {
|
|
1154
|
+
return session.vcs?.startFrom === 'existing-branch' && session.vcs.existingBranch?.trim()
|
|
1155
|
+
? session.vcs.existingBranch.trim()
|
|
1156
|
+
: sessionBranchName(session);
|
|
1157
|
+
}
|
|
1158
|
+
/** The runner's own commits of the task, newest first, as [sha, subject]; the operator's and captured inputs are left out. */
|
|
1159
|
+
async function ownCommits(dir, session, base, tip) {
|
|
1160
|
+
const r = await git(dir, ['log', '--format=%H%x09%ae%x09%s', `${base}..${tip}`]);
|
|
1161
|
+
if (!r.ok || !r.stdout)
|
|
1162
|
+
return [];
|
|
1163
|
+
const captured = (session.vcsStart?.inputs?.recaptured ?? []).map((c) => c.commit);
|
|
1164
|
+
return r.stdout
|
|
1165
|
+
.split('\n')
|
|
1166
|
+
.map((l) => l.split('\t'))
|
|
1167
|
+
.filter(([sha, email]) => !!sha && email === RUNNER_EMAIL && !captured.some((c) => c && (sha.startsWith(c) || c.startsWith(sha))))
|
|
1168
|
+
.map(([sha, , subject]) => [sha, subject ?? '']);
|
|
1169
|
+
}
|
|
1170
|
+
const DIRTY = (changed) => `There are uncommitted changes (${changed.slice(0, 3).join(', ')}${changed.length > 3 ? '…' : ''}). ` +
|
|
1171
|
+
'Undoing a task now would mix them in or lose them, and neither is this tool\'s decision to make. Commit or stash them first.';
|
|
1172
|
+
/** What "Undo only this task" would do, asked before anything is done. */
|
|
1173
|
+
export async function undoThisPreview(session, task) {
|
|
1174
|
+
const repoDir = repoDirOf(session);
|
|
1175
|
+
const files = (task.vcs?.files ?? []).map((f) => f.path);
|
|
1176
|
+
const empty = { ok: true, repoDir, commits: [], files, later: [] };
|
|
1177
|
+
if (!session.vcs?.enabled)
|
|
1178
|
+
return { ...empty, nothing: 'Version control is off for this session, so there is nothing in git to take out; the task is only queued again.' };
|
|
1179
|
+
if (session.vcs.branchMode === 'per-task') {
|
|
1180
|
+
const back = await restorePreview(session, task);
|
|
1181
|
+
if (!back.ok) {
|
|
1182
|
+
return back.baseCommit || back.problem?.startsWith('There are uncommitted')
|
|
1183
|
+
? { ...empty, ok: false, perTask: true, problem: back.problem }
|
|
1184
|
+
: { ...empty, perTask: true, nothing: back.problem ?? 'There is nothing to go back to.' };
|
|
1185
|
+
}
|
|
1186
|
+
return { ...empty, perTask: true, branch: task.vcs?.branch, baseCommit: back.baseCommit, later: [] };
|
|
1187
|
+
}
|
|
1188
|
+
const vcs = task.vcs;
|
|
1189
|
+
if (!vcs?.baseCommit || !vcs.commit || vcs.commit === vcs.baseCommit) {
|
|
1190
|
+
return { ...empty, nothing: 'This attempt committed nothing, so there is nothing in git to take out; the task is only queued again.' };
|
|
1191
|
+
}
|
|
1192
|
+
const state = await repoState(repoDir);
|
|
1193
|
+
if (!state.isRepo)
|
|
1194
|
+
return { ...empty, ok: false, problem: state.problem ?? 'The repository could not be read.' };
|
|
1195
|
+
if (state.dirty)
|
|
1196
|
+
return { ...empty, ok: false, problem: DIRTY(state.changed) };
|
|
1197
|
+
const line = sessionLine(session);
|
|
1198
|
+
if (!(await branchExists(repoDir, line)) || !(await isAncestor(repoDir, vcs.commit, line))) {
|
|
1199
|
+
return { ...empty, branch: line, nothing: `Its work is not on ${line}, the branch the session works on now (it was left on ${vcs.branch ?? 'another branch'}), so there is nothing to take out there; the task is only queued again.` };
|
|
1200
|
+
}
|
|
1201
|
+
const own = await ownCommits(repoDir, session, vcs.baseCommit, vcs.commit);
|
|
1202
|
+
if (own.length === 0)
|
|
1203
|
+
return { ...empty, branch: line, nothing: 'None of the commits since the task started are the runner\'s, so there is nothing of its own to take out; the task is only queued again.' };
|
|
1204
|
+
return {
|
|
1205
|
+
ok: true,
|
|
1206
|
+
repoDir,
|
|
1207
|
+
branch: line,
|
|
1208
|
+
commits: own.map(([sha, subject]) => `${sha.slice(0, 8)} ${subject}`),
|
|
1209
|
+
files,
|
|
1210
|
+
later: await commitsBetween(repoDir, vcs.commit, line),
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
/** Does it, in per-session mode: the task's commits reverted on its line, in one commit. */
|
|
1214
|
+
export async function revertTaskWork(session, task, bus) {
|
|
1215
|
+
const preview = await undoThisPreview(session, task);
|
|
1216
|
+
if (!preview.ok)
|
|
1217
|
+
return { ok: false, problem: preview.problem, reverted: [] };
|
|
1218
|
+
if (preview.nothing || preview.perTask)
|
|
1219
|
+
return { ok: true, reverted: [], ...(preview.nothing ? { nothing: preview.nothing } : {}) };
|
|
1220
|
+
const dir = preview.repoDir;
|
|
1221
|
+
const line = preview.branch;
|
|
1222
|
+
const vcs = task.vcs;
|
|
1223
|
+
const own = await ownCommits(dir, session, vcs.baseCommit, vcs.commit);
|
|
1224
|
+
const state = await repoState(dir);
|
|
1225
|
+
if (state.branch !== line) {
|
|
1226
|
+
const moved = await checkoutExisting(dir, line);
|
|
1227
|
+
if (!moved.ok)
|
|
1228
|
+
return { ok: false, problem: `${line} could not be checked out: ${moved.stderr || moved.stdout}`, reverted: [] };
|
|
1229
|
+
}
|
|
1230
|
+
const r = await git(dir, ['revert', '--no-commit', ...own.map(([sha]) => sha)]);
|
|
1231
|
+
if (!r.ok) {
|
|
1232
|
+
const conflicted = (await git(dir, ['diff', '--name-only', '--diff-filter=U'])).stdout.split('\n').filter(Boolean);
|
|
1233
|
+
await git(dir, ['revert', '--abort']);
|
|
1234
|
+
return {
|
|
1235
|
+
ok: false,
|
|
1236
|
+
reverted: [],
|
|
1237
|
+
problem: (conflicted.length > 0
|
|
1238
|
+
? `Taking it out conflicts with what came after it, in ${conflicted.slice(0, 5).join(', ')}${conflicted.length > 5 ? '…' : ''}`
|
|
1239
|
+
: `git could not take it out: ${(r.stderr || r.stdout).split('\n')[0]}`) +
|
|
1240
|
+
'. Nothing was changed. "Go back to before this task" puts the line back at its start instead, with the tasks after it queued again.',
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
const message = `Undo task ${session.tasks.findIndex((t) => t.id === task.id) + 1} "${task.title}"\n\nReverts ${own.map(([sha]) => sha.slice(0, 8)).join(', ')}, asked for by the operator.`;
|
|
1244
|
+
const done = await commitAll(dir, message);
|
|
1245
|
+
await git(dir, ['revert', '--quit']);
|
|
1246
|
+
if (!done.committed) {
|
|
1247
|
+
if (done.problem)
|
|
1248
|
+
return { ok: false, problem: done.problem, reverted: [] };
|
|
1249
|
+
return { ok: true, reverted: [], branch: line, nothing: 'Its changes are no longer in the code on this line, so nothing needed taking out; the task is only queued again.' };
|
|
1250
|
+
}
|
|
1251
|
+
bus.publish({
|
|
1252
|
+
sessionId: session.id,
|
|
1253
|
+
taskId: task.id,
|
|
1254
|
+
type: 'vcs-undone',
|
|
1255
|
+
level: 'info',
|
|
1256
|
+
message: `took the work of "${task.title}" out of ${line}: ${own.length} commit(s) reverted in ${done.commit?.slice(0, 8)}; ${preview.later.length > 0 ? `the ${preview.later.length} commit(s) after it stay` : 'nothing came after it'}`,
|
|
1257
|
+
data: { branch: line, commit: done.commit, reverted: own.map(([sha]) => sha), later: preview.later.length },
|
|
1258
|
+
});
|
|
1259
|
+
return { ok: true, commit: done.commit, branch: line, reverted: own.map(([sha]) => sha) };
|
|
1260
|
+
}
|
|
1152
1261
|
/** What the UI shows before a run: is version control going to work here? */
|
|
1153
1262
|
export async function vcsPreflight(session, allSessions = async () => []) {
|
|
1154
1263
|
const settings = session.vcs;
|
package/dist/web/404.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--WmzBz4QN36pcz4PL_cfEW--><html lang="en" data-theme="light" data-textsize="normal" data-contrast="normal" data-motion="normal" data-links="plain" data-focus="normal"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/72c85e4322c21223.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js"/><script src="/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js" async=""></script><script src="/_next/static/chunks/131-bae98f790a541679.js" async=""></script><script src="/_next/static/chunks/main-app-e3a5f713ba31557e.js" async=""></script><script src="/_next/static/chunks/197-f7c33a0114fc3db3.js" async=""></script><script src="/_next/static/chunks/867-aea30f560bc18eaf.js" async=""></script><script src="/_next/static/chunks/549-2415dd26f4e53d07.js" async=""></script><script src="/_next/static/chunks/499-751e0be9d4f86e2d.js" async=""></script><script src="/_next/static/chunks/app/layout-dc602b727480a653.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>copilot-operator</title><meta name="description" content="Runs task loops with Microsoft 365 Copilot on this machine."/><script>
|
|
2
2
|
(function () {
|
|
3
3
|
try {
|
|
4
4
|
var d = document.documentElement;
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
d.dataset.focus = a.strongFocus ? 'strong' : 'normal';
|
|
14
14
|
} catch (e) {}
|
|
15
15
|
})();
|
|
16
|
-
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8078,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"AppearanceProvider\"]\n3:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"LanguageProvider\"]\n4:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"DialogHost\"]\n5:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"SkipLink\"]\n6:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"\"]\n7:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"Nav\"]\n8:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"GlobalApprovals\"]\n9:I[3069,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\","])</script><script>self.__next_f.push([1,"\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"StartFailureBanner\"]\na:I[5204,[],\"\"]\nb:I[2642,[],\"\"]\nc:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"ScrollJump\"]\nd:I[1701,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7d86a692260006f1.js\",\"549\",\"static/chunks/549-348b0a1404407e5a.js\",\"499\",\"static/chunks/499-39b2c00bda3656f0.js\",\"177\",\"static/chunks/app/layout-6ee612d25e78b246.js\"],\"StartDialogHost\"]\ne:I[433,[],\"OutletBoundary\"]\n10:I[9884,[],\"AsyncMetadataOutlet\"]\n12:I[433,[],\"ViewportBoundary\"]\n14:I[433,[],\"MetadataBoundary\"]\n15:\"$Sreact.suspense\"\n17:I[3536,[],\"\"]\n:HL[\"/_next/static/css/0e55721108c300f2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"lDmqS7pWU_B_Ac5idPvdS\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/0e55721108c300f2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function () {\\n try {\\n var d = document.documentElement;\\n var raw = localStorage.getItem('cop.appearance');\\n var a = raw ? JSON.parse(raw) : {};\\n if (!a || typeof a !== 'object') a = {};\\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\\n d.dataset.textsize = [\\\"small\\\",\\\"normal\\\",\\\"large\\\",\\\"huge\\\",\\\"giant\\\"].indexOf(a.textSize) \u003e= 0 ? a.textSize : 'normal';\\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\\n } catch (e) {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L6\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L7\",null,{}]]}],[\"$\",\"$L8\",null,{}],[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$Lc\",null,{}],[\"$\",\"$Ld\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Le\",null,{\"children\":[\"$Lf\",[\"$\",\"$L10\",null,{\"promise\":\"$@11\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L12\",null,{\"children\":\"$L13\"}],null],[\"$\",\"$L14\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$15\",null,{\"fallback\":null,\"children\":\"$L16\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$17\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"13:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nf:null\n"])</script><script>self.__next_f.push([1,"11:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"16:\"$11:metadata\"\n"])</script></body></html>
|
|
16
|
+
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M3 4h18v16H3zM9 4v16M3 15h6" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Workbench</span></a><a href="/sessions"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8078,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"AppearanceProvider\"]\n3:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"LanguageProvider\"]\n4:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"DialogHost\"]\n5:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"SkipLink\"]\n6:I[966,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"Shell\"]\n7:I[5204,[],\"\"]\n8:I[2642,[],\"\"]\n9:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"ScrollJump\"]\na:I[1701,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-aea30f560bc18eaf.js\",\"549\",\"static/chunks/549-2415dd26f4e53d07.js\",\"499\",\"static/chunks/499-751e0be9d4f86e2d.js\",\"177\",\"static/chunks/app/layout-dc602b727480a653.js\"],\"StartDialogHost\"]\nb:I[433,[],\"OutletBoundary\"]\nd:I[9884,[],\"AsyncMetadataOutlet\"]\nf:I[433,[],\"ViewportBoundary\"]\n11:I[433,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14"])</script><script>self.__next_f.push([1,":I[3536,[],\"\"]\n:HL[\"/_next/static/css/72c85e4322c21223.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"WmzBz4QN36pcz4PL_cfEW\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/72c85e4322c21223.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function () {\\n try {\\n var d = document.documentElement;\\n var raw = localStorage.getItem('cop.appearance');\\n var a = raw ? JSON.parse(raw) : {};\\n if (!a || typeof a !== 'object') a = {};\\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\\n d.dataset.textsize = [\\\"small\\\",\\\"normal\\\",\\\"large\\\",\\\"huge\\\",\\\"giant\\\"].indexOf(a.textSize) \u003e= 0 ? a.textSize : 'normal';\\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\\n } catch (e) {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"13:\"$e:metadata\"\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:11,errorRate:1e-4,numBits:211,numHashes:14,bitArray:[1,0,0,1,r,e,r,r,e,e,e,r,r,e,r,e,e,e,r,e,r,e,e,e,e,r,e,e,e,e,e,e,r,r,e,e,r,r,r,r,r,e,e,e,e,r,r,r,r,e,r,r,e,r,e,e,e,r,r,e,e,e,e,r,e,r,r,r,e,r,e,r,r,r,r,e,r,r,r,e,e,r,r,r,r,e,r,e,r,e,e,e,r,r,e,e,r,e,r,r,r,e,r,r,e,r,r,r,e,r,e,r,r,e,e,r,e,r,e,r,e,r,e,e,r,e,e,e,r,e,r,e,e,r,r,r,r,e,r,e,e,e,r,r,e,r,r,e,r,r,r,r,r,e,e,e,e,r,r,e,r,r,r,e,e,e,r,r,r,r,e,e,e,e,r,e,r,e,e,r,r,e,e,e,e,r,r,e,r,e,r,e,r,e,e,r,e,r,r,e,e,r,r,e,r,e,e,e,e,e,e]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-abbab53f25ea29b0.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[499],{1035:(e,t,l)=>{l.d(t,{DialogHost:()=>d,Z:()=>o});var r=l(3365),n=l(1521),s=l(867),a=l(4969);let c=null,i=[];function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(l=>{var r;return r={kind:"confirm",message:e,...t,resolve:l},void(c?c(r):i.push(r))})}function d(e){var t,l;let{children:o}=e,{t:d}=(0,s.kj)(),[h,m]=(0,n.useState)([]),u=(0,n.useRef)(null),p=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(c=e=>m(t=>[...t,e]),i.length>0){let e=i.splice(0,i.length);m(t=>[...t,...e])}return()=>{c=null}},[]);let x=h[0],g=(0,n.useCallback)(e=>{x&&(x.resolve(e),m(e=>e.slice(1)))},[x]);return(0,a.V)(p,!!x,u),(0,n.useEffect)(()=>{if(!x)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),g(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x,g]),(0,r.jsxs)(r.Fragment,{children:[o,x&&(0,r.jsx)("div",{className:"modal-backdrop",onClick:()=>g(!1),role:"presentation",children:(0,r.jsxs)("div",{ref:p,className:"modal".concat(x.danger?" danger":""),role:"confirm"===x.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h2",{id:"modal-title",children:null!=(t=x.title)?t:d("confirm"===x.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,r.jsx)("div",{id:"modal-body",className:"modal-body",children:x.message}),(0,r.jsxs)("div",{className:"row modal-actions",children:["confirm"===x.kind&&(0,r.jsx)("button",{type:"button",className:"quiet",onClick:()=>g(!1),children:d("dialog.cancel")}),(0,r.jsx)("button",{ref:u,type:"button",className:x.danger?"danger":"primary",onClick:()=>g(!0),children:null!=(l=x.okLabel)?l:d("dialog.ok")})]})]})})]})}},1701:(e,t,l)=>{l.d(t,{L:()=>u,StartDialogHost:()=>p});var r=l(3365),n=l(1521),s=l(5549),a=l(867),c=l(4969),i=l(3486),o=l(3069);let d=null,h=[],m=1;function u(e){return new Promise(t=>{let l={...e,id:m++,resolve:t};d?d(l):h.push(l)})}function p(){let[e,t]=(0,n.useState)([]);(0,n.useEffect)(()=>{if(d=e=>t(t=>[...t,e]),h.length>0){let e=h.splice(0,h.length);t(t=>[...t,...e])}return()=>{d=null}},[]);let l=e[0];return l?(0,r.jsx)(g,{req:l,onDone:e=>{l.resolve(e),t(e=>e.slice(1))}},l.id):null}let x=e=>e.trim().replace(/[\\/]+$/,"").replace(/\//g,"\\").toLowerCase();function g(e){var t,l,d,h,m,u;let{req:p,onDone:g}=e,{t:f}=(0,a.kj)(),j=(0,a.W3)(),v=(0,n.useId)(),b=(0,n.useRef)(null),y=(0,n.useRef)(null),[k,w]=(0,n.useState)(null),[N,F]=(0,n.useState)(""),[B,C]=(0,n.useState)({}),[S,D]=(0,n.useState)({}),[E,T]=(0,n.useState)({kind:"choose"}),[H,O]=(0,n.useState)(""),[W,I]=(0,n.useState)(""),[L,R]=(0,n.useState)({}),[A,q]=(0,n.useState)([]),[P,z]=(0,n.useState)(!1),U=(0,n.useRef)(new Set),V=(0,n.useRef)(void 0),K=e=>g({started:e,...V.current?{reply:V.current}:{}}),_="fetching"===E.kind||"starting"===E.kind||""!==W,X=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s.FH.startOptions(p.sessionIds).then(t=>{w(t);let l={};for(let e of t.repos)l[x(e.repoDir)]=e;C(l);let r={};for(let e of t.sessions){if(!e.vcs||!e.repoDir||e.fixed&&!e.choice)continue;let t=function(e,t){var l,r,n,s,a,c,i;let o=null!=(a=null!=(s=null==t||null==(l=t.remotes.find(e=>"origin"===e.name))?void 0:l.name)?s:null==t||null==(r=t.remotes[0])?void 0:r.name)?a:"",d=null!=(i=null!=(c=null==t?void 0:t.current)?c:null==t||null==(n=t.local[0])?void 0:n.name)?i:"main";return e?"previous-session"===e.from?{from:"previous-session",local:d,remote:o,remoteBranch:d,onBranch:!1}:"local"===e.from?{from:"local",local:e.branch,remote:o,remoteBranch:e.branch,onBranch:!!e.onBranch}:{from:"remote",local:(null==t?void 0:t.local.some(t=>t.name===e.branch))?e.branch:d,remote:e.remote,remoteBranch:e.branch,onBranch:!!e.onBranch}:{from:"local",local:d,remote:o,remoteBranch:"main",onBranch:!1}}(e.choice,l[x(e.repoDir)]);r[e.id]=e.prepared||e.fixed?{...t,from:"keep"}:t}D(t=>e?{...r,...Object.fromEntries(Object.entries(t).filter(e=>{let[t]=e;return t in r}))}:r)}).catch(e=>F(e.message))};(0,n.useEffect)(()=>{X()},[p.sessionIds]),(0,c.V)(b,!0,y),(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&!e.defaultPrevented&&(e.preventDefault(),_||K(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[_,K]);let J=e=>e?B[x(e)]:void 0,M=(e,t)=>D(l=>({...l,[e]:{...l[e],...t}})),$=e=>{e&&C(t=>({...t,[x(e.repoDir)]:e}))},G=()=>{s.FH.runVcs(p.sessionIds).then(q).catch(()=>q([]))},Z=()=>{U.current.clear(),T({kind:"choose"})},Q=async function(){var e;let t,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O("");let r=(()=>{var e,t;let l={},r=new Map;for(let n of null!=(e=null==k?void 0:k.sessions)?e:[]){let e=S[n.id],s=J(n.repoDir);if(!e||!n.repoDir||!s||s.problem||"keep"===e.from)continue;let a=n.fixed?{rechoose:!0}:{};if("previous-session"===e.from)l[n.id]={from:"previous-session",...a};else if("current"===e.from){if(!s.current)return{problem:f("startdlg.needBranch",{name:n.name})};l[n.id]={from:"local",branch:s.current,...e.onBranch?{onBranch:!0}:{},...a}}else if("local"===e.from){if(!e.local||!s.local.some(t=>t.name===e.local))return{problem:f("startdlg.needBranch",{name:n.name})};l[n.id]={from:"local",branch:e.local,...e.onBranch?{onBranch:!0}:{},...a}}else{let c=e.remoteBranch.trim();if(!e.remote||!c)return{problem:f("startdlg.needBranch",{name:n.name})};l[n.id]={from:"remote",remote:e.remote,branch:c,...e.onBranch?{onBranch:!0}:{},...a};let i="".concat(x(n.repoDir),"|").concat(e.remote),o=null!=(t=r.get(i))?t:{key:i,dir:s.repoDir,remote:e.remote,branches:[]};o.branches.includes(c)||o.branches.push(c),r.set(i,o)}}return{starts:l,groups:[...r.values()].map(e=>({...e,key:"".concat(e.key,"|").concat([...e.branches].sort().join(","))}))}})();if("problem"in r)return void O(r.problem);if(!l.skipFetch)for(let e of r.groups){if(U.current.has(e.key))continue;T({kind:"fetching",what:e.branches.map(t=>"".concat(e.remote,"/").concat(t)).join(", ")});let t=await s.FH.startFetch(e.dir,e.remote,e.branches).catch(e=>({ok:!1,problem:e.message,missing:[]}));if($(t.repo),!t.ok)return void T({kind:"fetchFailed",group:e,result:t})}T({kind:"starting"});try{t=await p.start(r.starts)}catch(e){t={started:!1,reason:e.message}}if(V.current=t,t.started)return void K(!0);T({kind:"failed",reply:t}),(null==(e=t.failure)?void 0:e.stage)==="preflight"&&G()},Y=async(e,t)=>{I("".concat(x(e),"|").concat(t)),R(l=>({...l,[x(e)]:f("startdlg.fetching",{what:t})}));try{let l=await s.FH.startFetch(e,t);$(l.repo),R(r=>{var n,s,a,c;return{...r,[x(e)]:l.ok?"":"".concat(f("startdlg.fetchFailed",{what:t})," ").concat(null!=(c=null!=(a=l.problem)?a:null==(n=l.fetched)?void 0:n.detail)?c:"").concat((null==(s=l.fetched)?void 0:s.auth)?" ".concat(f("prep.fetchAuth")):"")}})}catch(t){R(l=>({...l,[x(e)]:t.message}))}finally{I("")}},ee=async e=>{try{await navigator.clipboard.writeText(e),z(!0),window.setTimeout(()=>z(!1),2500)}catch(e){O(f("plan.copyFailed"))}},et=Object.values(S).some(e=>"remote"===e.from),el=(null!=(h=null==k?void 0:k.sessions)?h:[]).filter(e=>e.vcs),er=1===el.length?(e=>{var t,l,r;let n=S[e.id],s=J(e.repoDir);if(!n||!s)return;let a=e=>e?" @ ".concat(e.slice(0,8)):"";return"keep"===n.from?e.fixed&&(null==(t=e.started)?void 0:t.branch)?"".concat(e.started.branch).concat(a(null!=(r=e.started.tipNow)?r:e.started.recorded)):void 0:"current"===n.from?s.current?"".concat(s.current).concat(a(s.head)):void 0:"local"===n.from?"".concat(n.local).concat(a(null==(l=s.local.find(e=>e.name===n.local))?void 0:l.commit)):"remote"===n.from&&n.remoteBranch.trim()?"".concat(n.remote,"/").concat(n.remoteBranch.trim()):void 0})(el[0]):void 0,en=er?f("unattended"===p.mode?"startdlg.goUnattendedOn":"startdlg.goStepOn",{where:er}):"unattended"===p.mode?f("startdlg.goUnattended"):f("startdlg.goStep");return(0,r.jsx)("div",{className:"modal-backdrop",role:"presentation",onClick:()=>!_&&K(!1),children:(0,r.jsxs)("div",{ref:b,className:"modal wide start-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"".concat(v,"-title"),onClick:e=>e.stopPropagation(),style:{overflowWrap:"anywhere"},children:[(0,r.jsx)("h2",{id:"".concat(v,"-title"),children:f("startdlg.title")}),(0,r.jsxs)("p",{className:"small muted",style:{marginTop:0},children:[f("startdlg.intro")," ",k&&"choose"===E.kind&&(0,r.jsx)("button",{type:"button",className:"quiet",onClick:()=>void X(!0),disabled:_,children:f("startdlg.refresh")})]}),N&&(0,r.jsx)(o.X,{reason:N}),!k&&!N&&(0,r.jsx)("p",{className:"small",role:"status",children:f("startdlg.loading")}),k&&("choose"===E.kind||"fetching"===E.kind||"starting"===E.kind)&&k.sessions.map(e=>{var t,l,n,s,a,c,i,o,d,h,m,u;let p=J(e.repoDir),g=S[e.id],b="start-".concat(v,"-").concat(e.id),y=null!=(c=null==p||null==(t=p.remotes.find(e=>e.name===(null==g?void 0:g.remote)))?void 0:t.branches)?c:[];return(0,r.jsxs)("fieldset",{className:"option",style:{border:"1px solid var(--line)",borderRadius:"var(--radius)",padding:"8px 12px",margin:"10px 0"},children:[(0,r.jsx)("legend",{style:{padding:"0 4px"},children:(0,r.jsx)("strong",{children:e.name})}),e.repoDir&&(0,r.jsx)("p",{className:"muted small",style:{margin:"2px 0 6px"},children:f("startdlg.repoOn",{repo:e.repoDir,branch:null!=(i=null==p?void 0:p.current)?i:"HEAD"})}),e.vcs?p&&!p.problem&&g?e.fixed&&e.rechooseBlocked?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"small",children:f("startdlg.fixed",{start:e.fixed})}),(0,r.jsx)("p",{className:"muted small",children:f("startdlg.rechooseBlocked",{tasks:e.rechooseBlocked})})]}):(0,r.jsxs)(r.Fragment,{children:[e.fixed&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"small",style:{margin:"2px 0"},children:f("startdlg.fixed",{start:e.fixed})}),(null==(l=e.started)?void 0:l.branch)&&(0,r.jsxs)("p",{className:"small",style:{margin:"2px 0"},children:[e.started.tipNow?f("startdlg.branchNow",{branch:e.started.branch,now:e.started.tipNow.slice(0,8),recorded:(null!=(d=e.started.recorded)?d:"").slice(0,8)}):f("startdlg.branchGone",{branch:e.started.branch,recorded:(null!=(h=e.started.recorded)?h:"").slice(0,8)}),e.started.remote?" ".concat(f("startdlg.branchRemote",{name:e.started.remote.name,commit:e.started.remote.commit.slice(0,8)})):""]}),p.current&&(null==(n=e.started)?void 0:n.branch)&&p.current!==e.started.branch&&"per-task"!==e.started.mode&&(0,r.jsx)("p",{className:"notice caution small",style:{margin:"4px 0"},children:f("startdlg.differs",{current:p.current,head:(null!=(m=p.head)?m:"").slice(0,8),branch:e.started.branch})}),(0,r.jsx)("div",{className:"option",children:(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"radio",name:b,checked:"keep"===g.from,onChange:()=>M(e.id,{from:"keep"}),disabled:_}),(0,r.jsx)("span",{children:(null==(s=e.started)?void 0:s.branch)?f("startdlg.keepStarted",{branch:e.started.branch}):f("startdlg.keepStartedNoBranch")})]})}),p.current&&p.current!==(null==(a=e.started)?void 0:a.branch)&&(0,r.jsx)("div",{className:"option",children:(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"radio",name:b,checked:"current"===g.from,onChange:()=>M(e.id,{from:"current"}),disabled:_}),(0,r.jsx)("span",{children:f("startdlg.useCurrent",{branch:p.current,commit:(null!=(u=p.head)?u:"").slice(0,8)})})]})})]}),e.prepared&&(0,r.jsxs)("div",{className:"option",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"radio",name:b,checked:"keep"===g.from,onChange:()=>M(e.id,{from:"keep"}),disabled:_}),(0,r.jsx)("span",{children:f("startdlg.keep")})]}),(0,r.jsx)("p",{className:"why",children:f("startdlg.prepared",{start:e.prepared})})]}),(0,r.jsxs)("div",{className:"option",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"radio",name:b,checked:"local"===g.from,onChange:()=>M(e.id,{from:"local"}),disabled:_}),(0,r.jsx)("span",{children:f("startdlg.local")})]}),(0,r.jsx)("div",{className:"row",style:{marginTop:4},children:(0,r.jsxs)("select",{"aria-label":f("startdlg.localBranch"),value:g.local,onChange:t=>M(e.id,{from:"local",local:t.target.value}),disabled:_,style:{width:"auto",minWidth:240,maxWidth:"100%"},children:[!p.local.some(e=>e.name===g.local)&&(0,r.jsx)("option",{value:g.local,children:g.local}),p.local.map(e=>(0,r.jsxs)("option",{value:e.name,children:[e.name," \xb7 ",e.commit.slice(0,8)]},e.name))]})}),(0,r.jsx)("p",{className:"why",children:f("startdlg.localWhy")})]}),(0,r.jsxs)("div",{className:"option",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"radio",name:b,checked:"remote"===g.from,onChange:()=>M(e.id,{from:"remote"}),disabled:_||0===p.remotes.length}),(0,r.jsx)("span",{children:f("startdlg.remote")})]}),0===p.remotes.length?(0,r.jsx)("p",{className:"muted small",children:f("startdlg.noRemote")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"row",style:{marginTop:4},children:[p.remotes.length>1&&(0,r.jsx)("select",{"aria-label":f("startdlg.remoteName"),value:g.remote,onChange:t=>M(e.id,{from:"remote",remote:t.target.value}),disabled:_,style:{width:"auto"},children:p.remotes.map(e=>(0,r.jsx)("option",{value:e.name,children:e.name},e.name))}),1===p.remotes.length&&(0,r.jsxs)("code",{children:[g.remote,"/"]}),(0,r.jsx)("input",{type:"text","aria-label":f("startdlg.remoteBranch"),list:"".concat(b,"-remote"),value:g.remoteBranch,onChange:t=>M(e.id,{from:"remote",remoteBranch:t.target.value}),onFocus:()=>"remote"!==g.from&&M(e.id,{from:"remote"}),disabled:_,style:{width:"auto",minWidth:240,flex:"1 1 240px"},placeholder:"main"}),(0,r.jsx)("datalist",{id:"".concat(b,"-remote"),children:y.map(e=>(0,r.jsx)("option",{value:e.name},e.name))}),(0,r.jsx)("button",{type:"button",onClick:()=>void Y(p.repoDir,g.remote),disabled:_||!g.remote,children:f("startdlg.refreshRemote")})]}),(0,r.jsx)("p",{className:"why",children:f("startdlg.remoteWhy")}),(0,r.jsx)("p",{className:"muted small",style:{margin:"2px 0"},children:p.lastFetched?f("startdlg.lastFetched",{when:j(p.lastFetched)}):y.length>0?f("startdlg.lastFetchedUnknown"):f("startdlg.neverFetched")}),L[x(p.repoDir)]&&(0,r.jsx)("p",{className:"small",role:"status",children:L[x(p.repoDir)]})]})]}),e.previousOffered&&(0,r.jsxs)("div",{className:"option",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"radio",name:b,checked:"previous-session"===g.from,onChange:()=>M(e.id,{from:"previous-session"}),disabled:_}),(0,r.jsx)("span",{children:f("startdlg.previous")})]}),(0,r.jsx)("p",{className:"why",children:f("startdlg.previousWhy")})]}),(0,r.jsxs)("div",{className:"option",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"checkbox",checked:g.onBranch&&("local"===g.from||"remote"===g.from||"current"===g.from),onChange:t=>M(e.id,{onBranch:t.target.checked}),disabled:_||"local"!==g.from&&"remote"!==g.from&&"current"!==g.from}),(0,r.jsx)("span",{children:f("startdlg.onBranch")})]}),(0,r.jsx)("p",{className:"why",children:f("startdlg.onBranchWhy")})]}),e.fixed&&"keep"!==g.from&&(0,r.jsx)("p",{className:"notice caution small",children:f("startdlg.rechooseNote")})]}):e.fixed?(0,r.jsx)("p",{className:"small",children:f("startdlg.fixed",{start:e.fixed})}):(0,r.jsx)("p",{className:"err small",children:f("startdlg.repoProblem",{problem:null!=(o=null==p?void 0:p.problem)?o:""})}):(0,r.jsx)("p",{className:"small",children:f("startdlg.vcsOff")})]},e.id)}),"fetching"===E.kind&&(0,r.jsx)("p",{className:"notice small",role:"status",children:f("startdlg.fetching",{what:E.what})}),"starting"===E.kind&&(0,r.jsx)("p",{className:"notice small",role:"status",children:f("startdlg.starting")}),"fetchFailed"===E.kind&&(0,r.jsxs)("div",{className:"notice caution",role:"alert",children:[(0,r.jsxs)("p",{style:{marginTop:0},children:[(0,r.jsx)("strong",{children:f("startdlg.fetchFailed",{what:E.group.branches.map(e=>"".concat(E.group.remote,"/").concat(e)).join(", ")})})," ",(0,r.jsx)("code",{children:null!=(u=null!=(m=E.result.problem)?m:null==(t=E.result.fetched)?void 0:t.detail)?u:""})]}),E.result.missing.length>0&&(0,r.jsx)("p",{className:"small",children:f("startdlg.missing",{names:E.result.missing.join(", ")})}),(null==(l=E.result.fetched)?void 0:l.auth)&&(0,r.jsx)("p",{className:"small",children:f("prep.fetchAuth")}),(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)("button",{type:"button",className:"primary",onClick:()=>void Q(),children:f("startdlg.retryFetch")}),(()=>{var e,t;let l=J(E.group.dir),n=null!=(t=null==l||null==(e=l.remotes.find(e=>e.name===E.group.remote))?void 0:e.branches)?t:[];return E.group.branches.every(e=>n.some(t=>t.name===e))?(0,r.jsx)("button",{type:"button",onClick:()=>{U.current.add(E.group.key),Q()},children:f("startdlg.useFetched")}):null})(),(0,r.jsx)("button",{type:"button",className:"quiet",onClick:Z,children:f("startdlg.back")})]}),(()=>{var e,t;let l=J(E.group.dir),n=null!=(t=null==l||null==(e=l.remotes.find(e=>e.name===E.group.remote))?void 0:e.branches)?t:[],s=E.group.branches.filter(e=>!n.some(t=>t.name===e));return s.length>0?(0,r.jsx)("p",{className:"muted small",children:f("startdlg.useFetchedNo",{what:s.map(e=>"".concat(E.group.remote,"/").concat(e)).join(", ")})}):E.result.lastFetched?(0,r.jsx)("p",{className:"muted small",children:f("prep.lastFetched",{when:j(E.result.lastFetched)})}):null})(),E.result.fetchCommand&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"small",style:{marginTop:8},children:f("prep.ownTerminal")}),(0,r.jsx)("pre",{className:"sync-cmd",children:E.result.fetchCommand}),(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{var e;ee(null!=(e=E.result.fetchCommand)?e:"")},children:f("prep.copyFetch")}),P&&(0,r.jsx)("span",{className:"badge done",children:f("prep.copied")})]})]})]}),"failed"===E.kind&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.X,{failure:E.reply.failure,reason:E.reply.reason}),(null==(d=E.reply.failure)?void 0:d.stage)==="preflight"&&A.some(e=>!e.ready)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"small",children:f("startdlg.vcsFix")}),(0,r.jsx)(i.w,{groups:A,sessionIds:p.sessionIds,onChange:()=>{G(),X()}})]})]}),H&&(0,r.jsx)("p",{className:"err small",role:"alert",children:H}),"choose"===E.kind&&et&&(0,r.jsx)("p",{className:"why",children:f("prep.password")}),(0,r.jsxs)("div",{className:"row modal-actions",children:[(0,r.jsx)("button",{type:"button",className:"quiet",onClick:()=>K(!1),disabled:_,children:f("dialog.cancel")}),"failed"===E.kind?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:Z,children:f("startdlg.back")}),(0,r.jsx)("button",{type:"button",className:"primary",onClick:()=>void Q({skipFetch:!0}),children:f("startdlg.tryAgain")})]}):"fetchFailed"!==E.kind&&(0,r.jsx)("button",{ref:y,type:"button",className:"primary",onClick:()=>void Q(),disabled:_||!k,children:en})]})]})})}},3069:(e,t,l)=>{l.d(t,{$:()=>h,X:()=>i});var r=l(3365),n=l(1521),s=l(5549),a=l(867),c=l(7527);function i(e){var t,l;let{failure:n,reason:c,onDismiss:i,intro:o,children:d}=e,{t:h}=(0,a.kj)(),m=(0,a.W3)(),u=null!=(l=null!=(t=null==n?void 0:n.message)?t:c)?l:"";return(0,r.jsxs)("div",{className:"notice caution start-failure",role:"alert",style:{overflowWrap:"anywhere"},children:[o&&(0,r.jsx)("p",{className:"small",style:{marginTop:0},children:o}),(0,r.jsx)("strong",{children:h("startfail.title")}),n&&(0,r.jsx)("p",{className:"small",style:{margin:"4px 0"},children:h("startfail.where",{stage:h("startfail.stage.".concat(n.stage))})}),(0,r.jsx)("pre",{className:"sync-cmd small",style:{margin:"6px 0"},children:u}),d,n&&(0,r.jsxs)("p",{className:"muted small",style:{margin:"4px 0"},children:[n.runId?h("startfail.when",{when:m(n.at),run:n.runId}):h("startfail.whenNoRun",{when:m(n.at)}),n.sessions.length>0?" \xb7 ".concat(n.sessions.map(e=>'"'.concat(e,'"')).join(", ")):""]}),(0,r.jsxs)("div",{className:"row",style:{marginTop:6},children:[n&&(0,r.jsx)("a",{className:"button-link",href:s.FH.startFailureUrl(n.id),download:!0,children:h("startfail.download")}),(0,r.jsx)("a",{className:n?"button-link":"button-link plain",href:s.FH.terminalUrl(),download:!0,children:h("startfail.terminal")}),i&&(0,r.jsx)("button",{type:"button",className:"quiet",onClick:i,children:h("startfail.dismiss")})]}),(0,r.jsx)("p",{className:"why",children:h("startfail.downloadWhy")})]})}let o="cop.startFailure.dismissed";function d(){try{var e;let t=JSON.parse(null!=(e=window.localStorage.getItem(o))?e:"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}function h(){let{t:e}=(0,a.kj)(),[t,l]=(0,n.useState)([]),[h,m]=(0,n.useState)([]);(0,c.z)(()=>s.FH.startFailures(!0).then(e=>{l(e),m(d())}).catch(()=>void 0),5e3);let u=t.find(e=>!h.includes(e.id));return u?(0,r.jsx)("div",{style:{marginBottom:12},children:(0,r.jsx)(i,{failure:u,intro:e("at-turn"===u.stage?"startfail.laterSession":"startfail.later"),onDismiss:()=>{let e=[...new Set([...d(),u.id])].slice(-50);try{window.localStorage.setItem(o,JSON.stringify(e))}catch(e){}m(e)}})}):null}},3486:(e,t,l)=>{l.d(t,{w:()=>i});var r=l(3365),n=l(1521),s=l(5549),a=l(867);let c={"review-inputs":"runvcs.review","snapshot-on-base":"runvcs.snapshotOnBase","snapshot-here":"runvcs.snapshotHere","use-current-branch":"runvcs.useCurrent","allow-snapshot":"runvcs.allowSnapshot"};function i(e){let{groups:t,sessionIds:l,onChange:s}=e,{t:c}=(0,a.kj)(),[i,d]=(0,n.useState)(""),h=t.filter(e=>!e.ready);return 0===h.length?i?(0,r.jsxs)("p",{className:"notice small",role:"status",children:[(0,r.jsx)("strong",{children:c("runvcs.ready")})," ",i]}):null:(0,r.jsxs)("section",{className:"notice caution","aria-labelledby":"runvcs-title",children:[(0,r.jsx)("h3",{id:"runvcs-title",style:{marginTop:0},children:c("runvcs.title")}),(0,r.jsx)("p",{className:"small",children:c("runvcs.why")}),h.map(e=>(0,r.jsx)(o,{group:e,sessionIds:l,onChange:s,onDone:d},e.repoDir))]})}function o(e){var t;let{group:l,sessionIds:i,onChange:o,onDone:d}=e,{t:h}=(0,a.kj)(),[m,u]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[g,f]=(0,n.useState)(!1),[j,v]=(0,n.useState)(""),[b,y]=(0,n.useState)({}),k=(e,t)=>{var l,r;return null!=(r=null!=(l=b[e])?l:t)?r:void 0},w=l.actions.find(e=>"snapshot-here"===e.id&&e.available),N=e=>(null!=e?e:"—").slice(0,8),F=async e=>{if("review-inputs"===e)return void u(e=>!e);f(!0),v("");try{var t,r,n;let a="snapshot-on-base"===e?Object.fromEntries(l.inputs.map(e=>[e.path,"include"])):Object.fromEntries(l.entries.filter(e=>k(e.path,e.choice)).map(e=>[e.path,k(e.path,e.choice)])),c=await s.FH.runVcsPrepare(i,l.repoDir,e,a);v(c.ok?null!=(t=c.result)?t:"":null!=(r=c.problem)?r:""),c.ok&&d("".concat(l.repoDir,": ").concat(null!=(n=c.result)?n:"")),o()}catch(e){v(e.message)}finally{f(!1)}};return(0,r.jsxs)("div",{className:"option",style:{overflowWrap:"anywhere"},children:[(0,r.jsx)("table",{className:"small",children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:h("runvcs.repo")}),(0,r.jsx)("td",{children:(0,r.jsx)("code",{children:l.repoDir})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:h("runvcs.current")}),(0,r.jsxs)("td",{children:[(0,r.jsx)("code",{children:null!=(t=l.branch)?t:"HEAD"})," @ ",(0,r.jsx)("code",{children:N(l.head)})]})]}),l.workBranch&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:h("runvcs.workBranch")}),(0,r.jsxs)("td",{children:[(0,r.jsx)("code",{children:l.workBranch.name})," @ ",(0,r.jsx)("code",{children:N(l.workBranch.head)})]})]}),l.baseBranch&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:h("runvcs.base")}),(0,r.jsxs)("td",{children:[(0,r.jsx)("code",{children:l.baseBranch})," @ ",(0,r.jsx)("code",{children:N(l.baseHead)})]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:h("runvcs.sessions")}),(0,r.jsx)("td",{children:l.sessions.map(e=>"".concat(e.name," (").concat(h("runvcs.role.".concat(e.role)),")")).join(", ")})]}),l.inputPatterns.length>0&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:h("runvcs.patterns")}),(0,r.jsx)("td",{children:l.inputPatterns.map(e=>(0,r.jsx)("code",{style:{marginRight:6},children:e},e))})]})]})}),l.problem&&(0,r.jsxs)("p",{className:"small",children:[(0,r.jsx)("strong",{children:h("runvcs.problem")})," ",l.problem]}),l.inputs.length>0&&(0,r.jsx)("p",{className:"small",children:h("runvcs.inputsCount",{n:l.inputs.length})}),m&&l.inputs.length>0&&(0,r.jsx)("ul",{className:"small",style:{margin:"4px 0"},children:l.inputs.map(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:e.path})," — ",h("vcs.snapshotKind.".concat(e.kind)),void 0!==e.size?", ".concat((0,s.zi)(e.size)):"",0===e.allowed.length&&e.reason?(0,r.jsxs)("span",{className:"err",children:[" — ",e.reason]}):null]},e.path))}),l.unrelated.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"small",children:(0,r.jsx)("strong",{children:h("runvcs.unrelated",{n:l.unrelated.length})})}),(0,r.jsx)("ul",{className:"small",style:{margin:"4px 0"},children:l.unrelated.slice(0,30).map(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:e.path}),e.reason?" — ".concat(e.reason):""]},e.path))})]}),w&&l.entries.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"small",children:(0,r.jsx)("strong",{children:h("runvcs.choose",{n:l.entries.length})})}),(0,r.jsx)("ul",{className:"small",style:{margin:"4px 0",paddingLeft:0,listStyle:"none"},children:l.entries.map(e=>{var t;return(0,r.jsxs)("li",{style:{marginBottom:4},children:[(0,r.jsx)("code",{children:e.path})," ",(0,r.jsxs)("span",{className:"muted",children:["(",e.input?"".concat(h("vcs.snapshotInput"),", "):"",h("vcs.snapshotKind.".concat(e.kind)),void 0!==e.size?", ".concat((0,s.zi)(e.size)):"",")"]})," ",0===e.allowed.length?(0,r.jsx)("span",{className:"err",children:h("vcs.snapshotBlocked")}):(0,r.jsx)("select",{"aria-label":e.path,value:null!=(t=k(e.path,e.choice))?t:"",onChange:t=>y({...b,[e.path]:t.target.value}),disabled:g||e.allowed.length<2,children:e.allowed.map(e=>(0,r.jsx)("option",{value:e,children:h("include"===e?"vcs.snapshotInclude":"vcs.snapshotLeaveOut")},e))}),e.reason&&(0,r.jsx)("div",{className:"muted",children:e.reason})]},e.path)})})]}),p?(0,r.jsxs)("p",{className:"small muted",children:[h("runvcs.cancelled")," ",(0,r.jsx)("button",{className:"quiet",onClick:()=>x(!1),children:h("runvcs.showAgain")})]}):(0,r.jsxs)("div",{children:[l.actions.map(e=>{var t,n,s;return(0,r.jsxs)("div",{style:{marginTop:8},children:[(0,r.jsxs)("button",{className:e.recommended?"primary":void 0,onClick:()=>void F(e.id),disabled:g||!e.available,children:[h(c[e.id],{branch:null!=(t=l.baseBranch)?t:"",current:null!=(n=l.branch)?n:"HEAD"}),"review-inputs"===e.id&&m?" ✓":""]}),e.recommended&&(0,r.jsx)("span",{className:"badge done",style:{marginLeft:6},children:h("runvcs.recommended")}),(0,r.jsx)("p",{className:"why",children:e.available?e.result:"".concat(h("runvcs.notNow")," ").concat(null!=(s=e.why)?s:"")})]},e.id)}),(0,r.jsxs)("div",{style:{marginTop:8},children:[(0,r.jsx)("button",{className:"quiet",onClick:()=>x(!0),disabled:g,children:h("runvcs.cancel")}),(0,r.jsx)("p",{className:"why",children:h("runvcs.cancelWhy")})]})]}),j&&(0,r.jsx)("p",{className:"small",role:"status",children:j})]})}},4969:(e,t,l)=>{l.d(t,{V:()=>s});var r=l(1521);let n='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function s(e,t,l){(0,r.useEffect)(()=>{var r,s;if(!t)return;let a=document.activeElement instanceof HTMLElement?document.activeElement:null,c=e.current,i=null!=(s=null!=(r=null==l?void 0:l.current)?r:null==c?void 0:c.querySelector(n))?s:null;null==i||i.focus();let o=e=>{if("Tab"!==e.key||!c)return;let t=Array.from(c.querySelectorAll(n)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let l=t[0],r=t[t.length-1],s=c.contains(document.activeElement);e.shiftKey&&(document.activeElement===l||!s)?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r&&s||(e.preventDefault(),l.focus())};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),a&&document.contains(a)&&a.focus()}},[e,t,l])}},7527:(e,t,l)=>{l.d(t,{z:()=>n});var r=l(1521);function n(e,t){let l=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=(0,r.useRef)(e);n.current=e,(0,r.useEffect)(()=>{let e;if(!l)return;let r=!1,s=async()=>{try{await n.current()}catch(e){}finally{r||(e=setTimeout(()=>void s(),t))}};return s(),()=>{r=!0,e&&clearTimeout(e)}},[t,l])}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{5549:(t,o,e)=>{e.d(o,{AV:()=>a,Dh:()=>h,FH:()=>p,FZ:()=>r,Zm:()=>u,aT:()=>s,c5:()=>f,dK:()=>l,nC:()=>n,rt:()=>d,ub:()=>i,zi:()=>y});let n="/api";function s(t,o){return"/sessions/view?id=".concat(encodeURIComponent(t)).concat(o?"#".concat(o):"")}let c="cop-api-token";function a(){try{let t=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(t)return window.localStorage.setItem(c,t[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),t[1];return window.localStorage.getItem(c)||""}catch(t){return""}}function i(t){let o=a();return o?"".concat(t).concat(t.includes("?")?"&":"?","token=").concat(encodeURIComponent(o)):t}let r=["exit-zero","exit-nonzero","output-contains","output-omits","output-matches","file-exists","file-missing","file-contains"];function d(t){return t.startsWith("exit-")||t.startsWith("output-")}function l(t){return"output-contains"===t||"output-omits"===t||"output-matches"===t||"file-contains"===t}function u(t){return"limit-reached"===t.status||"aborted"===t.status||!!t.limit&&("failed"===t.status||"blocked"===t.status)}function h(t){return("failed"===t.status||"blocked"===t.status)&&"contract-conflict"!==t.stopCode}async function m(t,o){let e,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=void 0===s.timeoutMs?3e4:s.timeoutMs;try{var i;e=await fetch("".concat(n).concat(t),{...o,...null!==c&&!(null==o?void 0:o.signal)?{signal:AbortSignal.timeout(c)}:{},headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{},...null!=(i=null==o?void 0:o.headers)?i:{}}})}catch(o){if("TimeoutError"===o.name)throw Error("The API did not answer within ".concat(Math.round((null!=c?c:0)/1e3)," s (").concat(t.split("?")[0],"). It may be busy; try again."));throw o}if(!e.ok){let t="".concat(e.status," ").concat(e.statusText);try{let o=await e.json();(null==o?void 0:o.message)&&(t=Array.isArray(o.message)?o.message.join("; "):o.message)}catch(t){}throw Error(t)}let r=await e.text();return r?JSON.parse(r):void 0}let p={health:()=>m("/health"),doctor:()=>m("/doctor"),settings:()=>m("/settings"),saveSettings:t=>m("/settings",{method:"PUT",body:JSON.stringify(t)}),level1:()=>m("/level1"),setLevel1:t=>m("/level1",{method:"PUT",body:JSON.stringify({content:t})}),resetLevel1:()=>m("/level1",{method:"DELETE"}),presets:()=>m("/presets"),savePreset:(t,o)=>m("/presets/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:o})}),deletePreset:t=>m("/presets/".concat(encodeURIComponent(t)),{method:"DELETE"}),personas:()=>m("/personas"),savePersona:(t,o)=>m("/personas/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:o})}),deletePersona:t=>m("/personas/".concat(encodeURIComponent(t)),{method:"DELETE"}),sessions:()=>m("/sessions"),reorderSessions:t=>m("/sessions-order",{method:"PUT",body:JSON.stringify({ids:t})}),metrics:()=>m("/metrics"),preparePreview:function(t){let o=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return m("/repo/prepare/preview",{method:"POST",body:JSON.stringify({dir:t,fetch:o})},{timeoutMs:33e4})},prepareProject:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return m("/repo/prepare",{method:"POST",body:JSON.stringify({dir:t,fingerprint:o,...e})})},session:t=>m("/sessions/".concat(t)),createSession:(t,o)=>m("/sessions",{method:"POST",body:JSON.stringify({name:t,projectDir:o})}),updateSession:(t,o)=>m("/sessions/".concat(t),{method:"PUT",body:JSON.stringify(o)}),deleteSession:t=>m("/sessions/".concat(t),{method:"DELETE"}),addTask:(t,o)=>m("/sessions/".concat(t,"/tasks"),{method:"POST",body:JSON.stringify(o)}),updateTask:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o),{method:"PUT",body:JSON.stringify(e)}),deleteTask:(t,o)=>m("/sessions/".concat(t,"/tasks/").concat(o),{method:"DELETE"}),continueTask:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/continue"),{method:"POST",body:JSON.stringify((null==e?void 0:e.trim())?{instruction:e}:{})}),rerunTask:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return m("/sessions/".concat(t,"/tasks/").concat(o,"/rerun"),{method:"POST",body:JSON.stringify({...e,...n.buildOnFinished?{buildOnFinished:!0}:{}})})},taskChanges:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/changes").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskChangeFile:(t,o,e,n)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/changes/file?path=").concat(encodeURIComponent(e)).concat(n?"&run=".concat(encodeURIComponent(n)):"")),taskStory:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/story").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskFiles:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/files").concat(e?"?run=".concat(encodeURIComponent(e)):"")),taskLogUrl:(t,o,e)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(o,"/log").concat(e?"?run=".concat(encodeURIComponent(e)):""),taskFileUrl:(t,o,e,s,c)=>"".concat(n,"/sessions/").concat(t,"/tasks/").concat(o,"/files/").concat(e,"/").concat(encodeURIComponent(s)).concat(c?"?run=".concat(encodeURIComponent(c)):""),saveTaskLog:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/log").concat(e?"?run=".concat(encodeURIComponent(e)):""),{method:"POST",body:"{}"}),saveTaskFile:(t,o,e,n,s)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/files/").concat(e,"/").concat(encodeURIComponent(n)).concat(s?"?run=".concat(encodeURIComponent(s)):""),{method:"POST",body:"{}"}),start:(t,o,e,n)=>m("/sessions/".concat(t,"/start"),{method:"POST",body:JSON.stringify({mode:o,name:e,starts:n})},{timeoutMs:12e4}),startOptions:t=>m("/start/options?sessions=".concat(encodeURIComponent(t.join(",")))),startFetch:(t,o,e)=>m("/start/fetch",{method:"POST",body:JSON.stringify({dir:t,remote:o,...e?{branches:e}:{}})},{timeoutMs:33e4}),startFailures:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return m("/start/failures".concat(t?"?unanswered=1":""))},startFailureUrl:t=>i("".concat(n,"/start/failures/").concat(encodeURIComponent(t),"/report")),terminalUrl:()=>i("".concat(n,"/terminal")),stop:t=>m("/sessions/".concat(t,"/stop"),{method:"POST",body:"{}"}),approvals:t=>m("/approvals".concat(t?"?session=".concat(encodeURIComponent(t)):"")),undoPreview:(t,o)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/undo")),undoTask:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/undo"),{method:"POST",body:JSON.stringify({how:e})}),acceptTask:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/accept"),{method:"POST",body:JSON.stringify((null==e?void 0:e.trim())?{note:e}:{})}),addTaskNote:(t,o,e)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/notes"),{method:"POST",body:JSON.stringify({text:e})}),kerriganReport:t=>m("/kerrigan/report",{method:"POST",body:JSON.stringify(t)}),checkChanges:t=>m("/changes/check",{method:"POST",body:JSON.stringify({text:t})}),applyChanges:t=>m("/changes/apply",{method:"POST",body:JSON.stringify({text:t})}),repoTree:function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0;return m("/sessions/".concat(t,"/repo/tree?path=").concat(encodeURIComponent(o)).concat(e?"&task=".concat(encodeURIComponent(e)):""))},repoFile:(t,o,e)=>m("/sessions/".concat(t,"/repo/file?path=").concat(encodeURIComponent(o)).concat(e?"&task=".concat(encodeURIComponent(e)):"")),repoLog:t=>m("/sessions/".concat(t,"/repo/log")),sessionEvents:t=>m("/sessions/".concat(t,"/events")),decidePlan:(t,o,e)=>m("/approvals/".concat(t,"/plan"),{method:"POST",body:JSON.stringify({action:o,...(null==e?void 0:e.trim())?{note:e}:{}})}),decide:(t,o)=>m("/approvals/".concat(t),{method:"POST",body:JSON.stringify({action:o})}),setRunMode:(t,o)=>m("/sessions/".concat(t,"/mode"),{method:"POST",body:JSON.stringify({mode:o})}),streamUrl:t=>i("".concat(n,"/sessions/").concat(t,"/stream")),batch:()=>m("/batch").then(t=>null!=t?t:null),startBatch:(t,o,e,n,s,c,a,i)=>m("/batch/start",{method:"POST",body:JSON.stringify({sessionIds:t,mode:o,onFailure:e,model:n,reviewModel:s,name:c,taskIds:a,starts:i})},{timeoutMs:12e4}),suggestedRunName:t=>m("/batch/name?sessions=".concat(encodeURIComponent(t.join(",")))),stopBatch:()=>m("/batch/stop",{method:"POST",body:"{}"}),pauseBatch:()=>m("/batch/pause",{method:"POST",body:"{}"}),resumeBatch:()=>m("/batch/resume",{method:"POST",body:"{}"}),planBrief:t=>m("/plan/brief?lang=".concat(encodeURIComponent(t))),context:(t,o)=>m("/context/".concat(t,"?lang=").concat(encodeURIComponent(o))),setContext:(t,o)=>m("/context/".concat(t),{method:"PUT",body:JSON.stringify({content:o})}),resetContext:(t,o)=>m("/context/".concat(t,"?lang=").concat(encodeURIComponent(o)),{method:"DELETE"}),checkPlan:t=>m("/plan/check",{method:"POST",body:JSON.stringify({text:t})}),importPlan:t=>m("/plan/import",{method:"POST",body:JSON.stringify({text:t})}),browseFolder:t=>m("/browse-folder",{method:"POST",body:JSON.stringify({start:t})},{timeoutMs:null}),tasks:()=>m("/tasks"),activity:()=>m("/activity"),downloadBundle:async t=>{var o,e,s;let c=await fetch("".concat(n,"/export/bundle"),{method:"POST",headers:{"content-type":"application/json",...a()?{"x-cop-token":a()}:{}},body:JSON.stringify({tasks:t})});if(!c.ok)throw Error(await c.text()||"".concat(c.status," ").concat(c.statusText));let i=null!=(s=c.headers.get("content-disposition"))?s:"",r=null==(o=/filename\*=UTF-8''([^;]+)/i.exec(i))?void 0:o[1],d=null==(e=/filename="([^"]+)"/i.exec(i))?void 0:e[1],l=null!=d?d:"copilot-operator-bundle.json";if(r)try{l=decodeURIComponent(r)}catch(t){}let u=URL.createObjectURL(await c.blob()),h=document.createElement("a");return h.href=u,h.download=l,document.body.appendChild(h),h.click(),h.remove(),setTimeout(()=>URL.revokeObjectURL(u),1e4),l},exportUrl:(t,o)=>{let e=new URLSearchParams;return o.run&&e.set("run",o.run),o.session&&e.set("session",o.session),o.task&&e.set("task",o.task),i("".concat(n,"/export/").concat(t,"?").concat(e.toString()))},debugExportUrl:t=>i("".concat(n,"/debug/export").concat(t.length>0?"?sessions=".concat(encodeURIComponent(t.join(","))):"")),vcsStatus:t=>m("/sessions/".concat(t,"/vcs")),runVcs:t=>m("/batch/vcs?ids=".concat(encodeURIComponent(t.join(",")))),runVcsPrepare:function(t,o,e){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return m("/batch/vcs/prepare",{method:"POST",body:JSON.stringify({sessionIds:t,repoDir:o,action:e,choices:n})})},vcsSnapshot:(t,o)=>m("/sessions/".concat(t,"/vcs/snapshot"),{method:"POST",body:JSON.stringify({choices:o})}),restorePreview:(t,o)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/restore")),restore:(t,o)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/restore"),{method:"POST",body:"{}"}),contractCheck:(t,o)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/contract")),applyContractFix:(t,o,e,n)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/contract-fix"),{method:"POST",body:JSON.stringify({choices:e,expect:n})}),restartPlan:(t,o)=>m("/sessions/".concat(t,"/tasks/").concat(o,"/restart")),restartFrom:function(t,o){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return m("/sessions/".concat(t,"/tasks/").concat(o,"/restart"),{method:"POST",body:JSON.stringify(e)})},repoCheck:t=>m("/repo?dir=".concat(encodeURIComponent(t))),project:()=>m("/project"),setProject:t=>m("/project",{method:"PUT",body:JSON.stringify(t)}),models:()=>m("/models"),setDefaultModel:t=>m("/models/default",{method:"PUT",body:JSON.stringify({model:t})}),setDefaultReviewModel:t=>m("/models/review-default",{method:"PUT",body:JSON.stringify({model:t})}),refreshModels:()=>m("/models/refresh",{method:"POST",body:"{}"},{timeoutMs:null}),login:t=>m("/login",{method:"POST",body:JSON.stringify({account:(null==t?void 0:t.trim())||void 0})},{timeoutMs:null})};function y(t){return t<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")}function f(t){if(void 0===t)return"";let o=Math.round(t/1e3);if(o<60)return"".concat(o,"s");let e=Math.floor(o/60);return e<60?"".concat(e,"m ").concat(o%60,"s"):"".concat(Math.floor(e/60),"h ").concat(e%60,"m")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[699],{1366:(e,t,s)=>{s.d(t,{w:()=>i,y:()=>r});var a=s(3365),n=s(1521),l=s(867);function r(e){let{readOnly:t,scope:s,onReadOnly:r,onScope:i}=e,{t:o}=(0,l.kj)(),d=(0,n.useId)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"option",style:{marginTop:10},children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:e=>r(e.target.checked)}),(0,a.jsx)("span",{children:o("task.readOnlyEdit")})]}),(0,a.jsx)("p",{className:"why",children:o("task.readOnlyEditWhy")})]}),(0,a.jsx)("label",{htmlFor:"".concat(d,"-scope"),children:o("task.scopeEdit")}),(0,a.jsx)("textarea",{id:"".concat(d,"-scope"),value:s,onChange:e=>i(e.target.value),placeholder:"tests/e2e/\nsrc/**/*.ts",style:{minHeight:60},disabled:t}),(0,a.jsx)("p",{className:"why",children:o("task.scopeEditWhy")})]})}function i(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}},1910:(e,t,s)=>{s.d(t,{H:()=>o,u:()=>i});var a=s(3365),n=s(1521),l=s(867),r=s(5549);function i(e){let{label:t,save:s}=e,{t:r}=(0,l.kj)(),[i,o]=(0,n.useState)(!1),[d,c]=(0,n.useState)(""),[u,m]=(0,n.useState)(!1),h=async()=>{o(!0),c("");try{var e;let t=await s();m(!1),c(t.revealed?r("save.done",{path:t.path}):r("save.savedOnly",{path:t.path,note:null!=(e=t.note)?e:""}))}catch(e){m(!0),c(r("save.failed",{problem:e.message}))}finally{o(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"linkish",disabled:i,title:r("save.why"),onClick:()=>void h(),children:i?r("save.saving"):t}),d&&(0,a.jsx)("span",{className:u?"err small":"muted small",children:d})]})}function o(e){let{sessionId:t,taskId:s,attempt:i}=e,{t:o}=(0,l.kj)(),[d,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(""),[h,p]=(0,n.useState)(!1),f=async()=>{c(!0),m("");try{let e=await r.FH.downloadBundle([{sessionId:t,taskId:s,attempt:i}]);p(!1),m(o("reg.bundleSaved",{name:e}))}catch(e){p(!0),m(o("save.failed",{problem:e.message}))}finally{c(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"linkish",disabled:d,title:o("save.attemptRecordWhy"),onClick:()=>void f(),children:d?o("save.saving"):o("save.attemptRecord")}),u&&(0,a.jsx)("span",{className:h?"err small":"muted small",children:u})]})}},3041:(e,t,s)=>{s.d(t,{e:()=>i});var a=s(1521),n=s(5549),l=s(1035),r=s(867);function i(e){let{t}=(0,r.kj)(),[s,i]=(0,a.useState)(""),[o,d]=(0,a.useState)({taskId:"",text:""}),c=(e,t)=>d({taskId:e,text:t}),u=(0,a.useCallback)(async s=>{i("restore"),c(s.taskId,"");try{var a,r,o,d,u,m,h,p,f,g,k,v,x,j;let i=await n.FH.restorePreview(s.sessionId,s.taskId);if(!i.ok)return void c(s.taskId,t("restore.cannot",{problem:null!=(o=i.problem)?o:""}));let y={repo:i.repoDir,title:s.title,branch:null!=(d=i.branchName)?d:"",commit:(null!=(u=i.baseCommit)?u:"").slice(0,8)},b=i.leftBehind.length>0?t("restore.confirmLosing",{...y,n:i.leftBehind.length,kept:null!=(m=i.keptOn)?m:"",list:i.leftBehind.slice(0,10).join("\n")}):t("restore.confirm",y);if(!await (0,l.Z)(b))return;let N=await n.FH.restore(s.sessionId,s.taskId);if(!N.ok)return void c(s.taskId,t("restore.failed",{problem:null!=(h=N.problem)?h:""}));c(s.taskId,(null!=(p=null==(a=N.leftBehind)?void 0:a.length)?p:0)>0?t("restore.done",{branch:null!=(f=N.branch)?f:"",commit:(null!=(g=N.commit)?g:"").slice(0,8),n:null!=(k=null==(r=N.leftBehind)?void 0:r.length)?k:0,kept:null!=(v=N.keptOn)?v:""}):t("restore.doneNothing",{branch:null!=(x=N.branch)?x:"",commit:(null!=(j=N.commit)?j:"").slice(0,8)})),e()}catch(e){c(s.taskId,e.message)}finally{i("")}},[t,e]),m=(0,a.useCallback)(async s=>{i("restart"),c(s.taskId,"");try{var a,r,o;let i=await n.FH.restartPlan(s.sessionId,s.taskId);if(!i.ok)return void c(s.taskId,t("restart.cannot",{problem:null!=(a=i.problem)?a:""}));let d=i.restores.filter(e=>!e.ok);if(d.length>0)return void c(s.taskId,t("restart.cannot",{problem:d.map(e=>{var t;return"".concat(e.repoDir,": ").concat(null!=(t=e.problem)?t:"")}).join(" | ")}));let u=i.restores.map(e=>{var s,a,n,l,r;return[t("restart.repoLine",{repo:e.repoDir,commit:(null!=(s=e.baseCommit)?s:"").slice(0,8),branch:null!=(a=e.branchName)?a:"",n:e.leftBehind.length,kept:null!=(n=e.keptOn)?n:""}),...e.leftBehind.length>0?[t("restart.commitsHead",{kept:null!=(l=e.keptOn)?l:""})]:[],...e.leftBehind.slice(0,15).map(e=>" ".concat(e)),...e.leftBehind.length>15?[t("restart.commitsMore",{n:e.leftBehind.length-15})]:[],...(null!=(r=e.laterSessions)?r:[]).flatMap(e=>[t("restart.laterSession",{session:e.sessionName,n:e.commits.length,branch:e.branch}),...e.commits.slice(0,15).map(e=>" ".concat(e)),...e.commits.length>15?[t("restart.commitsMore",{n:e.commits.length-15})]:[]])].join("\n")}).join("\n"),m=i.tasks.map(e=>" ".concat(e.sessionName," / ").concat(e.title).concat(e.alreadyQueued?t("restart.alreadyQueued"):t("restart.taskRedo",{status:t("status.".concat(e.status))}))).join("\n"),h="unattended"===i.mode&&!!i.unattendedRefused,p=t("restart.confirm",{title:i.from.title,tasks:i.tasks.length,sessions:i.sessions.length,list:m,repos:u||t("restart.noRepo"),mode:t("unattended"!==i.mode||h?"run.confirm":"run.unattended")})+(h?t("restart.stepByStep",{reason:null!=(r=i.unattendedRefused)?r:""}):"");if(!await (0,l.Z)(p))return;let f=await n.FH.restartFrom(s.sessionId,s.taskId,h?{mode:"confirm"}:{});if(!f.started){c(s.taskId,t("restart.failed",{problem:null!=(o=f.reason)?o:""})),e();return}c(s.taskId,t("restart.started",{requeued:f.requeued,repos:f.restored.length})),e()}catch(e){c(s.taskId,e.message)}finally{i("")}},[t,e]);return{busy:s,message:o.text,messageTask:o.taskId,clearMessage:()=>c("",""),restore:u,restartFrom:m}}},3523:(e,t,s)=>{function a(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();if(!e)return;let a=Date.parse(e);if(Number.isNaN(a))return;let n=t?Date.parse(t):s;return Number.isNaN(n)?void 0:Math.max(0,n-a)}function n(e){return!!e.startedAt&&!e.finishedAt&&"queued"!==e.status}function l(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),a=t.some(e=>n(e)),l=t.map(e=>e.finishedAt?Date.parse(e.finishedAt):NaN).filter(e=>!Number.isNaN(e)),r=Date.parse(e.startedAt),i=a||0===l.length?s:Math.max(...l);return{ms:Number.isNaN(r)?0:Math.max(0,i-r),live:a,tasks:t.length}}function r(e){var t,s;let a=new Map;for(let s of e){if(!s.runGroup)continue;let e=null!=(t=a.get(s.runGroup.id))?t:{run:s.runGroup,tasks:[]};e.tasks.push(s),a.set(s.runGroup.id,e)}return null!=(s=[...a.values()].sort((e,t)=>Date.parse(t.run.startedAt)-Date.parse(e.run.startedAt))[0])?s:null}s.d(t,{DG:()=>n,d5:()=>a,eZ:()=>l,hH:()=>r})},6983:(e,t,s)=>{s.d(t,{J:()=>d});var a=s(3365),n=s(1521),l=s(5549),r=s(867),i=s(4969),o=s(287);function d(e){var t,s,d,c,u;let{sessionId:m,taskId:h,title:p,onClose:f}=e,{t:g}=(0,r.kj)(),k=(0,n.useId)(),[v,x]=(0,n.useState)(null),[j,y]=(0,n.useState)(""),[b,N]=(0,n.useState)(""),[w,I]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),F=(0,n.useRef)(null),B=(0,n.useRef)(null);(0,i.V)(F,!0,B),(0,n.useEffect)(()=>{let e=!0;return l.FH.session(m).then(t=>{var s;e&&x(null!=(s=t.tasks.find(e=>e.id===h))?s:null)}).catch(t=>{e&&N(t.message)}),()=>{e=!1}},[m,h]),(0,n.useEffect)(()=>{let e=e=>{"Escape"!==e.key||e.defaultPrevented||w||document.querySelector('[role="alertdialog"]')||f(C)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[w,C,f]);let D=async()=>{if(j.trim()){I(!0),N("");try{await l.FH.continueTask(m,h,j),N(g("fup.saved",{title:p})),S(!0)}catch(e){N(e.message)}finally{I(!1)}}},H=(null!=(c=null==v?void 0:v.checkResults)?c:[]).filter(e=>!e.passed),E=(null==v||null==(t=v.review)?void 0:t.verdict)==="fail"&&null!=(u=v.review.findings)?u:[],R=null==v||null==(s=v.vcs)?void 0:s.branch,M=null==v||null==(d=v.vcs)?void 0:d.commit;return(0,a.jsx)("div",{className:"modal-backdrop",role:"presentation",onClick:()=>!w&&f(C),children:(0,a.jsxs)("div",{ref:F,className:"modal wide",role:"dialog","aria-modal":"true","aria-labelledby":"".concat(k,"-title"),onClick:e=>e.stopPropagation(),style:{overflowWrap:"anywhere"},children:[(0,a.jsx)("h2",{id:"".concat(k,"-title"),children:g("fup.title",{title:p})}),C?(0,a.jsx)(o.f,{target:{sessionId:m,taskId:h,title:p},intro:"".concat(b," ").concat(g("runq.ask")),focusFirst:!0,onClose:()=>f(!0)}):v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"notice caution small",children:[(0,a.jsx)("strong",{children:g("fup.ended",{status:g("status.".concat(v.status))})}),v.reason&&(0,a.jsx)("p",{style:{margin:"4px 0"},children:v.reason}),H.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{marginTop:6},children:g("fup.failedChecks")}),(0,a.jsx)("ul",{style:{margin:"2px 0",paddingLeft:18},children:H.slice(0,10).map(e=>(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{children:e.name}),": ",e.detail]},e.name))})]}),E.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{marginTop:6},children:g("fup.findings")}),(0,a.jsx)("ul",{style:{margin:"2px 0",paddingLeft:18},children:E.slice(0,10).map((e,t)=>(0,a.jsxs)("li",{children:[e.what,e.where?" (".concat(e.where,")"):""]},t))})]}),v.summary&&v.summary!==v.reason&&(0,a.jsxs)("p",{style:{margin:"6px 0 0"},children:[g("fup.summary")," ",v.summary]})]}),(0,a.jsxs)("ul",{className:"small",style:{margin:"8px 0",paddingLeft:18},children:[(0,a.jsx)("li",{children:g("fup.chat")}),(0,a.jsx)("li",{children:R?M?g("fup.branch",{branch:R,commit:M.slice(0,8)}):g("fup.branchNotCommitted",{branch:R}):g("fup.noVcs")}),(0,a.jsx)("li",{children:g("fup.kept")})]}),(0,a.jsxs)("details",{className:"small",children:[(0,a.jsx)("summary",{children:g("fup.original")}),(0,a.jsx)("pre",{className:"tall",children:v.prompt})]}),(0,a.jsx)("label",{htmlFor:"".concat(k,"-prompt"),style:{marginTop:10},children:g("fup.prompt")}),(0,a.jsx)("textarea",{id:"".concat(k,"-prompt"),ref:B,className:"prose",value:j,onChange:e=>y(e.target.value),placeholder:g("fup.placeholder"),style:{minHeight:180},disabled:w}),(0,a.jsx)("p",{className:"why",children:g("fup.startOver",{fix:g("reg.fixPrompt")})}),(0,a.jsxs)("div",{className:"row modal-actions",children:[b&&(0,a.jsx)("span",{className:"small grow err",children:b}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>f(!1),disabled:w,children:g("dialog.cancel")}),(0,a.jsx)("button",{type:"button",className:"primary",onClick:()=>void D(),disabled:w||!j.trim(),children:g("fup.save")})]})]}):(0,a.jsx)("p",{className:"muted small",children:b||g("fup.loading")})]})})}}}]);
|