heyquilt 0.3.174 → 0.3.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/RELEASES.md +30 -0
- package/bin/quilt.js +1 -75
- package/desktop/main.js +22 -9
- package/package.json +2 -3
- package/src/ai-vm.js +1 -1
- package/src/api/memory-store.js +1 -5
- package/src/api/server.js +4 -45
- package/src/api/supabase-store.js +0 -10
- package/src/autowork.js +7 -142
- package/src/base-pick.js +125 -12
- package/src/branch-view.js +1 -1
- package/src/connection.js +12 -37
- package/src/control.js +16 -93
- package/src/fsutil.js +1 -1
- package/src/git-aside.js +70 -0
- package/src/github-commit.js +1 -2
- package/src/gitstate.js +326 -0
- package/src/held.js +12 -53
- package/src/history.js +1 -25
- package/src/live-merge.js +42 -161
- package/src/mcp.js +6 -90
- package/src/merge3.js +21 -5
- package/src/pathrules.js +1 -1
- package/src/protocol.js +6 -11
- package/src/read-bases.js +3 -5
- package/src/relay-live-write.js +37 -44
- package/src/relay-mcp.js +30 -164
- package/src/relay-prune.js +3 -6
- package/src/relay-turn-sync.js +7 -11
- package/src/runner.js +2 -4
- package/src/server.js +61 -1717
- package/src/session.js +895 -844
- package/src/setup.js +11 -3
- package/src/status.js +2 -5
- package/src/swap-in.js +56 -13
- package/src/turn-sync-plan.js +2 -2
- package/src/turn-sync.js +1 -1
- package/src/ui/agent-guide.js +3 -1
- package/src/ui/app.css +4 -96
- package/src/ui/app.js +1 -1
- package/src/ui/chat.js +2 -6
- package/src/ui/cloud-ai-model.js +0 -13
- package/src/ui/cloud-ai.js +2 -10
- package/src/ui/connections.js +2 -1
- package/src/ui/fileview.js +7 -20
- package/src/ui/git-rule.js +2 -13
- package/src/ui/home.js +2 -8
- package/src/ui/session-words.js +27 -0
- package/src/ui/session.js +34 -407
- package/src/ui-server.js +7 -56
- package/src/api/routes/seam-connect.js +0 -103
- package/src/api/routes/session-migrate.js +0 -39
- package/src/force-date.js +0 -27
- package/src/quilt-default.js +0 -84
- package/src/quilt-history.js +0 -106
- package/src/quilt-remote.js +0 -78
- package/src/seam-access.js +0 -97
- package/src/seam-url.js +0 -15
- package/src/session-follow.js +0 -583
- package/src/session-layout3.js +0 -466
- package/src/session-migrate.js +0 -123
- package/src/session-quilt.js +0 -126
- package/src/session-seam.js +0 -312
- package/src/source-live/bring-in.js +0 -391
- package/src/source-live/land.js +0 -410
- package/src/source-live/live-block.js +0 -1166
- package/src/source-live/live-square.js +0 -116
- package/src/ui/force-words.js +0 -19
- package/src/ui/quiltview.js +0 -213
- package/src/ui/seam-model.js +0 -309
package/src/setup.js
CHANGED
|
@@ -45,11 +45,15 @@ ${TASK_WORKFLOW_MD}
|
|
|
45
45
|
Write in chat, read it or take a task only when your person asks you to. An agent
|
|
46
46
|
that joined as its own member reads its own mentions in \`quilt_inbox\`.
|
|
47
47
|
- Nobody holds files: edit any file you may change; edits merge as they arrive. If
|
|
48
|
-
your change clashes with someone's on the same lines
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
your change clashes with someone's on the same lines, Quilt holds your lines and
|
|
49
|
+
tells you at the top of your next quilt answer: resolve it at once with
|
|
50
|
+
\`quilt_resolve_merge\`.
|
|
51
51
|
Until you do, moving a task to QA or Done, \`quilt_set_work\` "done" and commits
|
|
52
52
|
are refused. A conflict whose writer's AI is gone is handed to another AI.
|
|
53
|
+
In your own folder the clash is in the file itself: your save is not shared, and
|
|
54
|
+
the file has both versions of those lines between conflict markers
|
|
55
|
+
("<<<<<<< mine", "=======", ">>>>>>> session"). Edit them to what they should
|
|
56
|
+
be, delete the marker lines and save: it is shared then.
|
|
53
57
|
- Your unfinished work is boxed: in a folder that is a git repository, a file you
|
|
54
58
|
change stays in a box until you commit it. Everyone sees the change, but it is only
|
|
55
59
|
in your folder, so nobody else's git can commit it. Committing it (or putting it
|
|
@@ -86,6 +90,10 @@ ${TASK_WORKFLOW_MD}
|
|
|
86
90
|
work (it comes back a moment later), a git conflict pauses this folder until
|
|
87
91
|
you resolve it and \`git add\` it, and checking out another branch moves this
|
|
88
92
|
folder to that branch's work in the session (the old branch keeps its own).
|
|
93
|
+
If git refuses a checkout because local changes would be overwritten, those
|
|
94
|
+
are the session's uncommitted work, which the session keeps: switch with
|
|
95
|
+
\`git checkout -f <branch>\` (or \`git stash && git checkout <branch>\` in one
|
|
96
|
+
command; a stash on its own is put back a moment later).
|
|
89
97
|
Deleting a file deletes it for everyone.
|
|
90
98
|
- If git refuses to pull because untracked files would be overwritten, those
|
|
91
99
|
files came from the session: \`quilt_status\` lists them under "Pulling" and
|
package/src/status.js
CHANGED
|
@@ -21,11 +21,6 @@ export function renderStatus (st, { asAi = false, mentionYours = false } = {}) {
|
|
|
21
21
|
out.push('')
|
|
22
22
|
out.push(`Relay: ${st.connected ? 'connected' : '**disconnected** (edits are kept and will sync on reconnect)'} · ${st.fileCount} shared files`)
|
|
23
23
|
if (!st.connected && st.problem) out.push(`⚠️ ${st.problem}`)
|
|
24
|
-
// At layout 3: where this folder's work goes (session-follow.js), and a write the relay could not keep.
|
|
25
|
-
if (st.moving && st.moving.line) out.push(`🧵 ${st.moving.line}`)
|
|
26
|
-
if (st.square && st.square.line) out.push(`🧵 ${st.square.line}`)
|
|
27
|
-
if (st.readOnly && st.readOnly.why) out.push(`⚠️ ${st.readOnly.why}`)
|
|
28
|
-
if (st.force && st.force.stopped && st.force.stopped.why) out.push(`⚠️ ${st.force.stopped.why}`)
|
|
29
24
|
out.push(`You: **${st.me.name}** (${st.me.tool})${st.me.persona ? `, one of ${st.me.of}'s AI sessions` : ''}${st.me.focus ? ` · focus: ${st.me.focus}` : ''}`)
|
|
30
25
|
if (st.workspaceName || st.workspace) out.push(`Workspace: ${st.workspaceName || st.workspace}`)
|
|
31
26
|
out.push('')
|
|
@@ -93,6 +88,8 @@ export function renderStatus (st, { asAi = false, mentionYours = false } = {}) {
|
|
|
93
88
|
if (!act.length) out.push('_Nothing yet._')
|
|
94
89
|
for (const a of act) {
|
|
95
90
|
const who = a.by === st.me.name ? 'you' : a.by
|
|
91
|
+
// A folder that moved to another branch (a checkout in git) has no path to show.
|
|
92
|
+
if (a.kind === 'switched') { out.push(`- ${ago(a.ts)}: ${who} switched to \`${a.branch}\``); continue }
|
|
96
93
|
out.push(`- ${ago(a.ts)}: ${who} ${a.kind} \`${a.path}\`${a.detail ? ` (${a.detail})` : ''}`)
|
|
97
94
|
}
|
|
98
95
|
out.push('')
|
package/src/swap-in.js
CHANGED
|
@@ -32,9 +32,40 @@ const REPLACED_GAP_MS = 0.01
|
|
|
32
32
|
|
|
33
33
|
const rm = (f) => { try { fs.rmSync(f, { force: true }) } catch {} }
|
|
34
34
|
|
|
35
|
-
/** Whether `a` and `b` (lstat results)
|
|
35
|
+
/** Whether `a` and `b` (lstat results) look like the same file: same inode, size and time. Never proof that its
|
|
36
|
+
* bytes are unchanged (a same-length save in the same timestamp tick matches all three: Linux's tick is about
|
|
37
|
+
* 4 ms), only that a save which took the path by a rename of its own has not. */
|
|
36
38
|
export const sameFile = (a, b) => !!(a && b && a.ino === b.ino && a.dev === b.dev && a.size === b.size && a.mtimeMs === b.mtimeMs)
|
|
37
39
|
|
|
40
|
+
// A file's size and time stand for its bytes only once its time is this old: a save in the same timestamp tick
|
|
41
|
+
// as the last write (or read) matches both (Linux moves mtime in ~4 ms ticks, FAT in 2 s; git calls it
|
|
42
|
+
// "racily clean"). Younger, a matching stat is unknown: the file is read and compared.
|
|
43
|
+
export const FRESH_MS = 2000
|
|
44
|
+
|
|
45
|
+
/** Whether a file last stamped at `mtimeMs`, looked at at `at`, is old enough that a matching stat means unchanged (FRESH_MS). */
|
|
46
|
+
export const settled = (mtimeMs, at = Date.now()) => typeof mtimeMs === 'number' && at - mtimeMs > FRESH_MS
|
|
47
|
+
|
|
48
|
+
/** All the bytes of an open file, from its start. */
|
|
49
|
+
export function readOpen (fd) {
|
|
50
|
+
const size = fs.fstatSync(fd).size
|
|
51
|
+
const bytes = Buffer.alloc(size)
|
|
52
|
+
let off = 0
|
|
53
|
+
while (off < size) { const n = fs.readSync(fd, bytes, off, size - off, off); if (!n) break; off += n }
|
|
54
|
+
return off === size ? bytes : bytes.subarray(0, off)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Whether the file open as `fd` was saved into since Quilt looked at it (`seen`, its fstat then): by its
|
|
59
|
+
* bytes against `unchanged(bytes)` (what Quilt looked at), never by its size and time alone. Without
|
|
60
|
+
* `unchanged`, by size and time (a caller that has no bytes to compare).
|
|
61
|
+
*/
|
|
62
|
+
export function savedInto (fd, seen, unchanged = null) {
|
|
63
|
+
const now = fs.fstatSync(fd)
|
|
64
|
+
if (now.size !== seen.size || now.mtimeMs !== seen.mtimeMs) return true
|
|
65
|
+
if (!unchanged) return false
|
|
66
|
+
try { return !unchanged(readOpen(fd)) } catch { return false }
|
|
67
|
+
}
|
|
68
|
+
|
|
38
69
|
/** Test seam: called right after swapIn's last look at the path, before the exchange (the sliver a plain rename loses). */
|
|
39
70
|
export const swapTesting = { afterLook: null }
|
|
40
71
|
|
|
@@ -44,6 +75,9 @@ const aside = (dir, abs, tag) => path.join(dir, `${path.basename(abs)}.${process
|
|
|
44
75
|
* Puts the finished file `tmp` at `abs`, only over the file `seen` (an lstat of `abs` as Quilt looked at
|
|
45
76
|
* it), and never loses what is at the path at that instant. `asideDir`: Quilt's own folder on the same
|
|
46
77
|
* disk (.quilt/tmp), for Windows' backup and the fallback's second name. `log`: where a fallback is said.
|
|
78
|
+
* `unchanged(bytes)`: whether bytes are what Quilt looked at (the file it decided to write over): the file
|
|
79
|
+
* the exchange took off the path is compared by them, so a save into it that kept its size and time (the
|
|
80
|
+
* same timestamp tick) still comes back as `displaced`, never deleted with it.
|
|
47
81
|
* { placed, displaced, other, replaced }:
|
|
48
82
|
* - `placed` false: the file at the path is no longer the one looked at (or is gone), nothing was
|
|
49
83
|
* replaced, `tmp` is removed: take that save in, then write again.
|
|
@@ -52,16 +86,16 @@ const aside = (dir, abs, tag) => path.join(dir, `${path.basename(abs)}.${process
|
|
|
52
86
|
* exchange (a save by a rename of its own): the caller takes it in as its writer's save and closes it.
|
|
53
87
|
* - `replaced` (only without an exchange): a save that took the path in the last instant was replaced.
|
|
54
88
|
*/
|
|
55
|
-
export function swapIn (abs, tmp, seen, { asideDir = null, log = null } = {}) {
|
|
89
|
+
export function swapIn (abs, tmp, seen, { asideDir = null, log = null, unchanged = null } = {}) {
|
|
56
90
|
const ex = loadExchange()
|
|
57
|
-
if (!ex.kind) { warnFallback(ex.why, log); return { other: null, ...renameIn(abs, tmp, seen, { asideDir }) } }
|
|
91
|
+
if (!ex.kind) { warnFallback(ex.why, log); return { other: null, ...renameIn(abs, tmp, seen, { asideDir, unchanged }) } }
|
|
58
92
|
const none = { placed: false, displaced: null, other: null, replaced: false }
|
|
59
93
|
// The last look: a save that took the path (or wrote into it) since the look is taken in first.
|
|
60
94
|
let at = null
|
|
61
95
|
try { at = fs.lstatSync(abs) } catch {}
|
|
62
96
|
if (!sameFile(at, seen)) { rm(tmp); return none }
|
|
63
97
|
if (swapTesting.afterLook) swapTesting.afterLook(abs)
|
|
64
|
-
if (ex.kind === 'ReplaceFileW') return replaceIn(abs, tmp, seen, asideDir || path.dirname(tmp), ex)
|
|
98
|
+
if (ex.kind === 'ReplaceFileW') return replaceIn(abs, tmp, seen, asideDir || path.dirname(tmp), ex, unchanged)
|
|
65
99
|
let swapped
|
|
66
100
|
try { swapped = exchange(tmp, abs, ex) } catch (err) {
|
|
67
101
|
if (err.code === 'ENOENT' && !fs.existsSync(abs)) { rm(tmp); return none } // gone since the look: a change of its own
|
|
@@ -70,17 +104,17 @@ export function swapIn (abs, tmp, seen, { asideDir = null, log = null } = {}) {
|
|
|
70
104
|
}
|
|
71
105
|
if (!swapped) {
|
|
72
106
|
warnFallback(`${ex.kind} refused on the disk of ${path.dirname(abs)}`, log)
|
|
73
|
-
return { other: null, ...renameIn(abs, tmp, seen, { asideDir }) }
|
|
107
|
+
return { other: null, ...renameIn(abs, tmp, seen, { asideDir, unchanged }) }
|
|
74
108
|
}
|
|
75
109
|
// What was at the path at that instant is now at tmp.
|
|
76
|
-
return lookAtDisplaced(abs, tmp, seen, (back) => { try { exchange(tmp, abs, ex); return back } catch { return null } })
|
|
110
|
+
return lookAtDisplaced(abs, tmp, seen, (back) => { try { exchange(tmp, abs, ex); return back } catch { return null } }, { unchanged })
|
|
77
111
|
}
|
|
78
112
|
|
|
79
113
|
/**
|
|
80
114
|
* The file the swap took off the path (now at `was`), against `seen`. `undo`: puts it back (exchange
|
|
81
115
|
* again), for something Quilt never writes over (a folder made there in that instant).
|
|
82
116
|
*/
|
|
83
|
-
function lookAtDisplaced (abs, was, seen, undo, { win = false } = {}) {
|
|
117
|
+
function lookAtDisplaced (abs, was, seen, undo, { win = false, unchanged = null } = {}) {
|
|
84
118
|
let d = null
|
|
85
119
|
try { d = fs.lstatSync(was) } catch {}
|
|
86
120
|
if (!d) return { placed: true, displaced: null, other: null, replaced: false }
|
|
@@ -91,8 +125,14 @@ function lookAtDisplaced (abs, was, seen, undo, { win = false } = {}) {
|
|
|
91
125
|
// Windows' backup is the replaced file under another name, its identity not kept: same size and time is the file looked at.
|
|
92
126
|
const same = win ? d.size === seen.size && d.mtimeMs === seen.mtimeMs : d.ino === seen.ino && d.dev === seen.dev
|
|
93
127
|
if (same) {
|
|
128
|
+
// Saved into since the look: by its bytes against what Quilt looked at, never by size and time alone
|
|
129
|
+
// (a same-length save in the same tick keeps both, 2026-11-14 on Linux).
|
|
94
130
|
let displaced = null
|
|
95
|
-
if (
|
|
131
|
+
if (unchanged) {
|
|
132
|
+
let bytes = null
|
|
133
|
+
try { bytes = fs.readFileSync(was) } catch {}
|
|
134
|
+
if (bytes && !unchanged(bytes)) displaced = bytes
|
|
135
|
+
} else if (d.size !== seen.size || d.mtimeMs !== seen.mtimeMs) { try { displaced = fs.readFileSync(was) } catch {} }
|
|
96
136
|
rm(was)
|
|
97
137
|
return { placed: true, displaced, other: null, replaced: false }
|
|
98
138
|
}
|
|
@@ -112,7 +152,7 @@ function lookAtDisplaced (abs, was, seen, undo, { win = false } = {}) {
|
|
|
112
152
|
}
|
|
113
153
|
|
|
114
154
|
/** Windows: ReplaceFileW, the replaced file kept as a backup in Quilt's folder, then looked at like a swapped one. */
|
|
115
|
-
function replaceIn (abs, tmp, seen, dir, ex) {
|
|
155
|
+
function replaceIn (abs, tmp, seen, dir, ex, unchanged = null) {
|
|
116
156
|
const none = { placed: false, displaced: null, other: null, replaced: false }
|
|
117
157
|
try { fs.mkdirSync(dir, { recursive: true }) } catch {}
|
|
118
158
|
const backup = aside(dir, abs, 'quilt-old')
|
|
@@ -127,7 +167,7 @@ function replaceIn (abs, tmp, seen, dir, ex) {
|
|
|
127
167
|
rm(tmp)
|
|
128
168
|
return none
|
|
129
169
|
}
|
|
130
|
-
return lookAtDisplaced(abs, backup, seen, () => null, { win: true })
|
|
170
|
+
return lookAtDisplaced(abs, backup, seen, () => null, { win: true, unchanged })
|
|
131
171
|
}
|
|
132
172
|
|
|
133
173
|
/**
|
|
@@ -138,7 +178,7 @@ function replaceIn (abs, tmp, seen, dir, ex) {
|
|
|
138
178
|
* the file Quilt replaced after the look, or null; `replaced`, a save that took the path in the last
|
|
139
179
|
* instant was replaced by Quilt's file (its bytes could not be kept).
|
|
140
180
|
*/
|
|
141
|
-
function renameIn (abs, tmp, seen, { asideDir = null } = {}) {
|
|
181
|
+
function renameIn (abs, tmp, seen, { asideDir = null, unchanged = null } = {}) {
|
|
142
182
|
const none = { placed: false, displaced: null, replaced: false }
|
|
143
183
|
let snap = null
|
|
144
184
|
if (asideDir) {
|
|
@@ -169,8 +209,11 @@ function renameIn (abs, tmp, seen, { asideDir = null } = {}) {
|
|
|
169
209
|
if (fd !== null) { try { fs.closeSync(fd) } catch {} }
|
|
170
210
|
let displaced = null
|
|
171
211
|
let replaced = false
|
|
172
|
-
|
|
173
|
-
|
|
212
|
+
// Saved into since the look: by its bytes when the caller says what it looked at (a same-tick save keeps size and time).
|
|
213
|
+
let into = after && (after.size !== seen.size || after.mtimeMs !== seen.mtimeMs) ? (() => { try { return fs.readFileSync(snap) } catch { return null } })() : null
|
|
214
|
+
if (!into && after && unchanged) { try { const b = fs.readFileSync(snap); if (!unchanged(b)) into = b } catch {} }
|
|
215
|
+
if (into) {
|
|
216
|
+
displaced = into
|
|
174
217
|
} else if (after && mine && after.ctimeMs > st.ctimeMs && after.ctimeMs < mine.ctimeMs - REPLACED_GAP_MS) {
|
|
175
218
|
// Unlinked from the path after the link above, well before Quilt's rename stamped its file: another file took its place.
|
|
176
219
|
replaced = true
|
package/src/turn-sync-plan.js
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
// - S = B: only the folder changed it: push it (or delete it in the session).
|
|
15
15
|
// - L is a version this slot held before: a stale copy (a platform restoring an older snapshot),
|
|
16
16
|
// no new work: the session's version comes back.
|
|
17
|
-
// - Both changed: merged as any live write (relay-turn-sync.js, live-merge.js
|
|
18
|
-
//
|
|
17
|
+
// - Both changed: merged as any live write (relay-turn-sync.js, live-merge.js): lines only one side
|
|
18
|
+
// changed all go in; where both changed the same lines
|
|
19
19
|
// the session keeps what landed first and the folder's lines are held for its writer to resolve
|
|
20
20
|
// (quilt_resolve_merge); a binary keeps the session's version, the folder's held; an edit beats a
|
|
21
21
|
// deletion. The result goes to the session and back to the folder. Nobody holds files.
|
package/src/turn-sync.js
CHANGED
|
@@ -200,7 +200,7 @@ export function describeSync (s, { name = '' } = {}) {
|
|
|
200
200
|
const held = s.held || []
|
|
201
201
|
for (const h of held.slice(0, 10)) {
|
|
202
202
|
const who = h.others && h.others.length ? h.others.join(', ') : 'someone'
|
|
203
|
-
const what = h.kind === 'stale' ? `
|
|
203
|
+
const what = h.kind === 'stale' ? `it was made from an older copy and lacks ${h.lines || 'some'} line(s) ${who} changed since, which stay` : h.kind === 'binary' ? `${who} changed it first, so the session keeps their version and yours is held` : `${who} changed the same lines first, so the session keeps theirs there and your ${h.hunks === 1 ? 'change is' : `${h.hunks || 'clashing'} changes are`} held`
|
|
204
204
|
lines.push(` ${h.path}: ${what} (id ${h.id}). Resolve it with quilt_resolve_merge { path: "${h.path}", how: "theirs" | "mine" | "edited" }.${yours}`)
|
|
205
205
|
}
|
|
206
206
|
if (held.length > 10) lines.push(` …and ${held.length - 10} more held the same way (every Quilt answer lists them).`)
|
package/src/ui/agent-guide.js
CHANGED
|
@@ -80,7 +80,8 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
80
80
|
'- If you change files for something not on the board, Quilt adds an In progress task for it: use that one rather than adding another, and move it on when you finish. `quilt_archive_task` takes a task off the board but keeps it (archived false brings it back); `quilt_delete_task` removes it for good.',
|
|
81
81
|
'',
|
|
82
82
|
'### Files',
|
|
83
|
-
|
|
83
|
+
// quilt_set_work is a tool only the CLI has: an agent over HTTP is not told of it.
|
|
84
|
+
'- Nobody holds files: edit any file you may change; edits merge as they arrive. If your change clashes with someone\'s on the same lines, Quilt holds your lines and tells you at the top of your next Quilt answer: resolve it at once with `quilt_resolve_merge`. Until you do, moving a task to QA or Done' + (cli ? ', `quilt_set_work` "done"' : '') + ' and commits are refused; a conflict whose writer\'s AI is gone is handed to another AI in the session, which is woken for it.' + (cli ? ' In your own folder the clash is in the file itself: your save is not shared, and the file has both versions of those lines between conflict markers ("<<<<<<< mine", "=======", ">>>>>>> session"). Edit them to what they should be, delete the marker lines and save: it is shared then.' : ''),
|
|
84
85
|
cliOnly('- Call `quilt_before_edit` with the paths before you change files: it shows what people said about them in chat and who else changed them lately. It never refuses'),
|
|
85
86
|
http ? `- ${both ? 'Over HTTP: ' : ''}\`quilt_list_files\`, \`quilt_read_file\`, then \`quilt_write_file\` with the version the read ended with as \`base\` (your write is merged against what you read).` : null,
|
|
86
87
|
`- Your unfinished work is boxed: ${cli && http ? 'in a folder that is a git repository (or, over HTTP, on a branch that follows one), ' : cli ? 'in a folder that is a git repository, ' : 'on a branch that follows a git repository, '}a file you change stays in a box until you commit it. Everyone sees the change, but it is in nobody else's folder, so nobody else's git can commit it. Committing it (or putting it back) opens the box by itself; finishing does not.`,
|
|
@@ -100,6 +101,7 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
100
101
|
cli ? `- ${both ? 'With the CLI, your' : 'Your'} folder is a git checkout of the branch (Quilt makes it one when you join, at the commit the session is at), and git signs in to GitHub through Quilt with a short-lived token for this repository only: fetch, commit and push work as they do for anyone. Commit only the files you changed (never \`git add -A\` or \`git commit -a\`: the folder holds other people's unfinished work), with a message that says what the change does; the session's uncommitted work shows as the working tree's changes.` : null,
|
|
101
102
|
cli ? `- ${both ? 'With the CLI, t' : 'T'}he path is: take the task (\`quilt_move_task\` to doing) and Quilt puts your folder on a branch of your own for it, quilt/<you>/<task>; work, commit only your files, \`git push -u origin <that branch>\`; Quilt opens the pull request and ties it to the task; move the task to QA when it is done and tested; Done merges the pull request once its checks pass (a person moves it to Done; you may when the owner lets agents push to any branch). Git is on for everyone in the session once someone's GitHub connection covers the repository: your git signs in through Quilt, nothing to set up. Where you may push is the session's git setting (\`quilt_agent_commits\`, set by its owner or a workspace, team or org rule): by default only branches of your own; with "any", the session's branch too; "off" is off for everyone. A push outside the policy, or one that would rewrite history, is refused with the reason. Quilt never hands you a GitHub token (\`quilt git-token\` prints none): git is all you need. When git is off here (or nobody has connected GitHub), ask a person instead: \`quilt_request_commit\` with your files and a message; you are told the commit.` : null,
|
|
102
103
|
http ? `- ${both ? 'Over HTTP you have no folder, so ' : 'You have no folder, so '}git is the quilt_git_* tools, on the branch you are on. Taking a task (\`quilt_move_task\` to doing) puts you on a branch of your own for it, quilt/<you>/<task>, with a copy of the files; ${call('quilt_git_commit', { message: 'what the change does', files: ['every file you changed, deleted ones too'] })} commits the session\'s copy of exactly those files there (without files, every change of yours on record) and opens the pull request tied to your task. The session\'s branch itself is open to agents only when the owner lets agents push to any branch. \`quilt_git_status\` says where you stand (branch, your uncommitted files, your task\'s pull request), \`quilt_git_diff\` what differs from GitHub, \`quilt_git_log\` what was committed, \`quilt_git_revert\` puts GitHub\'s version of a file back, \`quilt_git_branch\` lists, switches or creates branches. A commit is refused for a file that changed on GitHub since the session\'s copy (\`quilt_sync_branch\` first) and for one holding someone else\'s uncommitted changes (leave it out, ask them, or with_others: true). \`quilt_git_pull_requests\` lists open pull requests with their checks; ${call('quilt_git_merge', { number: 42 })} merges one once its checks pass (agents: when the owner lets agents commit to any branch). When git is off here, ask a person with \`quilt_request_commit\`.` : null,
|
|
104
|
+
cli ? `- ${both ? 'With the CLI: s' : 'S'}witching branches moves your folder to that branch's work in the session, and the branch you left keeps its own. Your folder also holds everyone's uncommitted work on the branch you are on, so git may refuse a checkout ("local changes would be overwritten"): switch with \`git checkout -f <branch>\`. Nothing is lost, because the session keeps that work on the branch you leave. A \`git stash\` on its own is put back a moment later.` : null,
|
|
103
105
|
'- A task of yours can\'t move to QA while its files aren\'t in git; Done merges its pull request (refused while checks fail or run, and, unless the owner lets agents push anywhere, a person\'s to do). A pull request merged on GitHub by hand moves its task to Done by itself. Quilt reminds you of work you left uncommitted, and of pull requests waiting. Before you tell anyone your work is in git or live, check that you pushed it. `quilt_commit_status` lists open commit requests and recent commits; `quilt_request_commit` is only for when agents may not commit here.',
|
|
104
106
|
'- Anything pushed or merged on GitHub reaches the session within seconds (Quilt\'s GitHub app tells it), merged with the session\'s uncommitted work; a branch you pushed comes back without a conflict. There is nothing to pull by hand. Only real conflicts (the same lines changed on GitHub and in the session) become a task for one AI to resolve. Quilt never rewrites or force-pushes history, and neither should you.',
|
|
105
107
|
cli ? `- ${both ? 'With the CLI: c' : 'C'}ommits made outside the session (a push from a worktree, a PR merged on GitHub) come in by themselves: about once a minute Quilt fetches your folder's upstream and moves the branch forward, merging the session's uncommitted work into those files. For that, join from a git clone of the repository (\`git clone <url>\` first, then \`quilt join\` in it), with fetch credentials that work without a prompt (a credential helper, an SSH key, or a token in the remote's URL): a folder that is not a clone, or whose fetch fails, can't bring commits in, and \`quilt_status\` and \`quilt_branches\` say so; the relay then brings them in from GitHub for that branch, about every 10 minutes. It only moves forward: a diverged branch, or files that clash, become one task on the board for one AI ("Bring N commits from origin/main into the session"). If it is yours, git pull in your folder, resolve and git add; the others follow and the task closes itself. If it is someone else's, leave those files to them.` : null,
|
package/src/ui/app.css
CHANGED
|
@@ -891,10 +891,8 @@ button.t-badge:hover, button.t-badge:focus-visible { box-shadow: inset 0 0 0 1px
|
|
|
891
891
|
.wide-only { display: none !important; }
|
|
892
892
|
.ws-top { gap: 6px; padding: 0 10px; }
|
|
893
893
|
.ws-top .brand { font-size: 0; gap: 0; }
|
|
894
|
-
.qt-topsearch { flex-basis: 150px; }
|
|
895
894
|
.ws-top .brand .qm-word { height: 30px; }
|
|
896
895
|
.ws-top .tabs { display: none; }
|
|
897
|
-
.qt-topsearch { flex-basis: 150px; }
|
|
898
896
|
.ws-body, .ws-body.tree-collapsed { grid-template-columns: minmax(0, 1fr); transition: none; }
|
|
899
897
|
.tree-collapse, .chat-resize { display: none; }
|
|
900
898
|
.ws-tree, .ws-chat { position: absolute; top: 0; bottom: 0; z-index: 5; width: min(340px, 88vw); display: none; box-shadow: var(--shadow-pop); }
|
|
@@ -1311,47 +1309,6 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1311
1309
|
.chg-diff .del i { color: var(--bad); }
|
|
1312
1310
|
.chg-diff .hunk { color: var(--muted); font-family: var(--sans); font-size: 11px; padding: 4px 10px 2px; }
|
|
1313
1311
|
.chg-diff .hunk:not(:first-child) { margin-top: 4px; border-top: 1px dashed var(--border); }
|
|
1314
|
-
/* A file's History and Blame, and code search, in a session linked to a quilt (quiltview.js). No stripes. */
|
|
1315
|
-
.qt-row { width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
|
|
1316
|
-
.qt-row:hover b, .qt-row:focus-visible b { text-decoration: underline; }
|
|
1317
|
-
.qt-no { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; }
|
|
1318
|
-
.qt-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1319
|
-
.qt-msg code { font-size: 11.5px; background: var(--panel-2); padding: 0 5px; border-radius: 5px; }
|
|
1320
|
-
.qt-patch { padding-bottom: 8px; }
|
|
1321
|
-
.qt-patch.on { background: var(--panel); margin: 4px -10px 0; padding: 10px 10px 12px; border-radius: 6px; box-shadow: 0 0 0 1px var(--border-strong); }
|
|
1322
|
-
.qt-patch.on + .chg-entry { border-top: 0; }
|
|
1323
|
-
.qt-files { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 4px 0 2px; }
|
|
1324
|
-
.qt-live .qt-msg { color: var(--muted); }
|
|
1325
|
-
.qt-shadow { margin: 10px 0 4px; font-size: 12px; }
|
|
1326
|
-
.qt-blame td.qt-bg { width: 1%; white-space: nowrap; padding: 0 10px; font-family: var(--sans); font-size: 11.5px; color: var(--muted); background: var(--panel-2); position: sticky; left: 0; z-index: 1; }
|
|
1327
|
-
.qt-blame td.qt-bg .avatar { width: 16px; height: 16px; font-size: 9px; display: inline-grid; vertical-align: -3px; margin-right: 6px; }
|
|
1328
|
-
.qt-blame .qt-bw { color: var(--text); font-weight: 600; display: inline-block; width: 92px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
|
|
1329
|
-
.qt-blame .qt-bp { font-family: var(--mono); font-size: 11.5px; line-height: inherit; vertical-align: bottom; display: inline-block; width: 92px; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
|
|
1330
|
-
.qt-blame button.qt-bp { cursor: pointer; }
|
|
1331
|
-
.qt-blame button.qt-bp:hover, .qt-blame button.qt-bp:focus-visible { color: var(--text); text-decoration: underline; }
|
|
1332
|
-
.qt-blame .qt-bt { display: inline-block; width: 30px; text-align: right; }
|
|
1333
|
-
.qt-blame .ln { left: auto; position: static; }
|
|
1334
|
-
.qt-blame tr.qt-run td { border-top: 1px solid var(--border); }
|
|
1335
|
-
.qt-blame tr.qt-run:first-child td { border-top: 0; }
|
|
1336
|
-
.qt-blame tr.qt-live td.lt { background: color-mix(in srgb, var(--edit) 10%, transparent); }
|
|
1337
|
-
.fv-code tr.at td { background: color-mix(in srgb, var(--warn) 22%, transparent); }
|
|
1338
|
-
.qt-search { max-width: 1000px; padding: 12px 16px 24px; }
|
|
1339
|
-
.qt-sform { display: flex; gap: 8px; align-items: center; }
|
|
1340
|
-
.qt-sform .input { flex: 1; height: 32px; }
|
|
1341
|
-
.qt-sico { display: grid; color: var(--muted); }
|
|
1342
|
-
.qt-sico svg { width: 16px; height: 16px; }
|
|
1343
|
-
.qt-scount { margin: 8px 0 10px; }
|
|
1344
|
-
.qt-hit { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 10px; background: var(--panel); }
|
|
1345
|
-
.qt-hitpath { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
|
|
1346
|
-
.qt-hit .fv-code tr { cursor: pointer; }
|
|
1347
|
-
.qt-hit .fv-code tr:hover td { background: var(--panel-2); }
|
|
1348
|
-
.qt-hit mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit; border-radius: 2px; }
|
|
1349
|
-
.qt-hit .fv-code .ln { position: static; }
|
|
1350
|
-
.qt-topsearch { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--panel); color: var(--muted); width: 280px; min-width: 0; flex: 0 1 280px; font-size: 13px; }
|
|
1351
|
-
.qt-topsearch:focus-within { border-color: var(--accent); }
|
|
1352
|
-
.qt-topsearch svg { width: 14px; height: 14px; flex: none; }
|
|
1353
|
-
.qt-topsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; background: none; color: var(--text); font: inherit; }
|
|
1354
|
-
.qt-topsearch input::placeholder { color: var(--muted); }
|
|
1355
1312
|
/* Changes counted in the totals whose diff the history no longer keeps (diffview.js). */
|
|
1356
1313
|
.chg-gone { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
|
|
1357
1314
|
.chg-gone:first-child { margin-top: 10px; padding-top: 0; border-top: 0; }
|
|
@@ -1369,26 +1326,6 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1369
1326
|
.pm-toggle { cursor: pointer; }
|
|
1370
1327
|
.pm-toggle input { accent-color: var(--ok); }
|
|
1371
1328
|
|
|
1372
|
-
.git-branch .tag.warn, .branch-menu .warn { color: var(--warn); }
|
|
1373
|
-
.branch-menu { font-size: 12.5px; }
|
|
1374
|
-
.branch-menu .br-here { padding: 2px 2px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; display: grid; gap: 4px; }
|
|
1375
|
-
.branch-menu .br-title b { font-weight: 600; }
|
|
1376
|
-
.branch-menu .br-sub, .branch-menu .br-meta, .branch-menu .br-hint { color: var(--muted); }
|
|
1377
|
-
.branch-menu .br-clash { margin: 2px 0; padding-left: 16px; }
|
|
1378
|
-
.branch-menu .br-clash code { font-size: 11.5px; }
|
|
1379
|
-
.branch-menu .br-sync { justify-self: start; margin-top: 4px; }
|
|
1380
|
-
/* In Seam (seam-model.js): the sidebar's squares, and the square's Commit and Merge onto main, under its line. */
|
|
1381
|
-
.sq-side { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
|
|
1382
|
-
.sq-side-row { padding: 6px 8px; border-radius: 6px; display: grid; gap: 2px; font-size: 12.5px; }
|
|
1383
|
-
.sq-side-row.on { background: var(--panel-2); }
|
|
1384
|
-
.branch-menu .sq-here .cp-commit { margin: 4px 0 0; }
|
|
1385
|
-
.branch-menu .sq-acts { display: flex; gap: 6px; }
|
|
1386
|
-
.branch-menu .br-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
1387
|
-
.branch-menu .br-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
1388
|
-
.git-branch svg { flex: none; width: 15px; height: 15px; }
|
|
1389
|
-
/* A long branch name (or the branch in the pause note) ends in an ellipsis; the full name is in the tooltip. */
|
|
1390
|
-
.git-branch .branch-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1391
|
-
.git-branch .tag { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1392
1329
|
|
|
1393
1330
|
/* commit timing */
|
|
1394
1331
|
.relay-problem { min-width: 0; max-width: 42ch; height: 28px; padding: 0 10px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--border)); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); color: var(--bad); font-size: 12px; font-weight: 600; line-height: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -1410,15 +1347,12 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1410
1347
|
.cp-files .who i { width: 8px; height: 8px; border-radius: 50%; }
|
|
1411
1348
|
.cp-files .t { color: var(--faint); font-size: 11.5px; min-width: 22px; text-align: right; }
|
|
1412
1349
|
.cp-files li.more { display: block; color: var(--muted); font-size: 11.5px; }
|
|
1413
|
-
|
|
1414
|
-
.cp-commit .input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; font-size: 12.5px; }
|
|
1415
|
-
/* one chip and one panel for source control: branch, GitHub, changes */
|
|
1350
|
+
/* one chip and one panel for source control: what changed in the session */
|
|
1416
1351
|
.git-wrap { position: relative; min-width: 40px; flex: 0 1 auto; display: flex; }
|
|
1417
1352
|
.git-chip { min-width: 0; max-width: 100%; overflow: hidden; }
|
|
1418
|
-
.git-chip .git-
|
|
1419
|
-
.git-chip .git-
|
|
1420
|
-
.git-chip .git-
|
|
1421
|
-
.git-chip .git-branch:not([hidden]) ~ .git-say::before, .git-chip .git-chg:not([hidden]) ~ .git-say::before { content: '·'; margin-right: 6px; color: var(--faint); font-weight: 400; }
|
|
1353
|
+
.git-chip .git-chg { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
|
|
1354
|
+
.git-chip .git-chg[hidden], .git-chip .git-say[hidden], .git-chip .sd[hidden] { display: none; }
|
|
1355
|
+
.git-chip .git-chg:not([hidden]) ~ .git-say::before { content: '·'; margin-right: 6px; color: var(--faint); font-weight: 400; }
|
|
1422
1356
|
.git-chip .chg-count { background: none; padding: 0; min-width: 0; color: inherit; font-weight: 600; }
|
|
1423
1357
|
.git-chip.quiet:hover, .git-chip[aria-expanded="true"] { background: var(--panel-2); color: var(--text); }
|
|
1424
1358
|
.git-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 460px; max-width: calc(100vw - 24px); max-height: 78vh; overflow: auto; padding: 0; display: flex; flex-direction: column; }
|
|
@@ -1426,7 +1360,6 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1426
1360
|
.git-panel .git-sec:first-child, .git-panel .git-sec[hidden] + .git-sec:not([hidden]) { border-top: 0; }
|
|
1427
1361
|
.git-panel .git-sec[hidden] { display: none; }
|
|
1428
1362
|
.git-panel .chg-head h4 { margin: 0; }
|
|
1429
|
-
.branch-menu .br-here { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
|
|
1430
1363
|
@media (max-width: 900px) {
|
|
1431
1364
|
.git-panel { position: fixed; top: 60px; right: 8px; left: 8px; width: auto; }
|
|
1432
1365
|
.git-chip .git-say { display: none; }
|
|
@@ -1441,18 +1374,14 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1441
1374
|
.gh-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
|
|
1442
1375
|
.gh-text b { font-weight: 600; }
|
|
1443
1376
|
.gh-text span { color: var(--muted); }
|
|
1444
|
-
.gh-acts { display: flex; align-items: center; gap: 6px; }
|
|
1445
1377
|
.git-panel h4 { margin: 4px 2px 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
|
|
1446
|
-
.commit-panel h4 + .hint, .commit-panel > .hint { margin: 0 2px 10px; font-size: 12px; }
|
|
1447
1378
|
.commit-reqs + h4 { margin-top: 12px; }
|
|
1448
1379
|
.commit-reqs details { margin: 2px 0 6px; font-size: 12px; color: var(--muted); }
|
|
1449
1380
|
.commit-reqs summary { cursor: pointer; }
|
|
1450
|
-
.commit-files { margin: 4px 0 0; padding-left: 16px; max-height: 160px; overflow: auto; font-family: var(--mono, ui-monospace, monospace); font-size: 11.5px; word-break: break-all; }
|
|
1451
1381
|
.commit-why { margin: 0 0 6px; font-size: 12px; color: var(--warn); }
|
|
1452
1382
|
.commit-acts { display: flex; gap: 6px; flex-wrap: wrap; }
|
|
1453
1383
|
.commit-auto { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
|
|
1454
1384
|
.commit-sync { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
|
|
1455
|
-
.commit-panel > .commit-sync:first-child { margin-top: 0; padding-top: 2px; border-top: 0; }
|
|
1456
1385
|
.commit-sync h4 { margin: 0 0 6px; }
|
|
1457
1386
|
.commit-sync p { margin: 0 0 6px; }
|
|
1458
1387
|
.commit-sync.warn p:first-of-type { color: var(--warn); }
|
|
@@ -1535,12 +1464,6 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1535
1464
|
.pm-switch b { display: block; font-weight: 600; font-size: 13px; }
|
|
1536
1465
|
.pm-switch small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
|
|
1537
1466
|
.pm-switch.off { opacity: .55; cursor: default; }
|
|
1538
|
-
/* A setting with a number (Session settings → Version control: stale_write_minutes). */
|
|
1539
|
-
.pm-number { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
|
|
1540
|
-
.pm-number b { display: block; font-weight: 600; font-size: 13px; }
|
|
1541
|
-
.pm-number small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
|
|
1542
|
-
.pm-number-in { display: flex; align-items: center; gap: 6px; flex: none; }
|
|
1543
|
-
.pm-number-in input { width: 72px; text-align: right; }
|
|
1544
1467
|
.pm-switch input { appearance: none; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
|
|
1545
1468
|
.pm-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
|
|
1546
1469
|
.pm-switch input:checked { background: var(--ok); }
|
|
@@ -1560,15 +1483,7 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1560
1483
|
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
|
|
1561
1484
|
.seg button:disabled { opacity: .45; cursor: not-allowed; }
|
|
1562
1485
|
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
|
1563
|
-
.git-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
|
|
1564
|
-
.git-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
|
|
1565
|
-
.git-head h4 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 14px; font-weight: 600; }
|
|
1566
|
-
.git-head .pill { max-width: 100%; height: auto; min-height: 24px; padding-block: 2px; white-space: normal; }
|
|
1567
1486
|
.pill.rule { color: var(--violet); }
|
|
1568
|
-
.git-line { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--panel-2); font-size: 12.5px; }
|
|
1569
|
-
.git-line.ok b { color: var(--ok); }
|
|
1570
|
-
.git-line.off b { color: var(--bad); }
|
|
1571
|
-
.git-card .hint { font-size: 12px; }
|
|
1572
1487
|
.git-cards { display: grid; gap: 10px; }
|
|
1573
1488
|
.text-btn { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
|
|
1574
1489
|
/* People: who is here and what each is on. Access and sharing are in Session settings. */
|
|
@@ -2418,12 +2333,6 @@ label.radio:has(input:disabled) { cursor: default; opacity: .75; }
|
|
|
2418
2333
|
.gr-manual code { font-family: var(--mono); font-size: 12px; }
|
|
2419
2334
|
|
|
2420
2335
|
/* the git panel, kept short: one line for the branch, one for GitHub, ten files a person */
|
|
2421
|
-
.branch-menu .br-compact { padding: 0; gap: 6px; }
|
|
2422
|
-
.branch-menu .br-compact .br-line { gap: 6px; }
|
|
2423
|
-
.branch-menu .br-compact svg { flex: none; width: 14px; height: 14px; color: var(--muted); }
|
|
2424
|
-
.branch-menu .br-compact .br-sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
|
|
2425
|
-
.branch-menu .br-compact .br-sync { flex: none; margin: 0; height: 24px; padding: 0 8px; gap: 4px; font-size: 12px; }
|
|
2426
|
-
.branch-menu .br-compact .br-sync svg { width: 12px; height: 12px; color: inherit; }
|
|
2427
2336
|
.cp-line { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12.5px; min-width: 0; }
|
|
2428
2337
|
/* Your work not committed (session.js mineHtml): two lines, boxed and shared, each opening to its files. */
|
|
2429
2338
|
.mw-head { display: flex; align-items: baseline; justify-content: space-between; }
|
|
@@ -2440,7 +2349,6 @@ details.mw summary .hint { font-size: 12.5px; }
|
|
|
2440
2349
|
details.mw ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 26px; }
|
|
2441
2350
|
details.mw li { min-height: 26px; display: flex; align-items: center; min-width: 0; }
|
|
2442
2351
|
details.mw li code { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
2443
|
-
details.mw + .cp-commit, .mw-head + .cp-commit { margin-top: 8px; }
|
|
2444
2352
|
.cp-line:last-child { margin-bottom: 0; }
|
|
2445
2353
|
.cp-line > span:not(.sd) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2446
2354
|
.cp-line .sd { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
|
package/src/ui/app.js
CHANGED
|
@@ -14,7 +14,7 @@ import { openKindMenu, kindLineHtml } from './agent-kinds.js'
|
|
|
14
14
|
import { messageSound, letInSound, taskSound, soundOn, playSound, unlockSounds } from './sounds.js'
|
|
15
15
|
import { watchSecretAsks } from './secrets.js'
|
|
16
16
|
import { voiceEvent } from './voice.js'
|
|
17
|
-
import { stoppedWords } from './
|
|
17
|
+
import { stoppedWords } from './session-words.js'
|
|
18
18
|
|
|
19
19
|
// ---------------------------------------------------------------- boot --
|
|
20
20
|
const SIGNED_OUT = 'This computer was signed out. Sign in again.'
|
package/src/ui/chat.js
CHANGED
|
@@ -129,16 +129,12 @@ export const RELAY_QUESTIONS = [
|
|
|
129
129
|
{ id: 'trim', text: 'Trim unused branches', owner: true }
|
|
130
130
|
]
|
|
131
131
|
|
|
132
|
-
// Not offered in a session in Seam (relayPrompts).
|
|
133
|
-
const SEAM_LEAVES_OUT = new Set(['git', 'trim'])
|
|
134
|
-
|
|
135
132
|
/**
|
|
136
133
|
* The questions to offer when `text` is just "@Quilt" (any case, spaces around): RELAY_QUESTIONS for `owner`, else without owner-only ones; [] otherwise.
|
|
137
|
-
* `seam`: the session is in Seam, where git is set aside and the branches are kept read-only for a move back: neither git's status nor trimming them is offered.
|
|
138
134
|
*/
|
|
139
|
-
export function relayPrompts (text, { owner = false
|
|
135
|
+
export function relayPrompts (text, { owner = false } = {}) {
|
|
140
136
|
if (!new RegExp(`^\\s*@${RELAY_NAME}\\s*$`, 'i').test(String(text ?? ''))) return []
|
|
141
|
-
return RELAY_QUESTIONS.filter((q) =>
|
|
137
|
+
return RELAY_QUESTIONS.filter((q) => owner || !q.owner)
|
|
142
138
|
}
|
|
143
139
|
|
|
144
140
|
// A person is one name, and "<person>'s AI" is their cloud AI (src/cloud-ai.js), and only that:
|
package/src/ui/cloud-ai-model.js
CHANGED
|
@@ -106,16 +106,3 @@ export function cloudUsage (vm) {
|
|
|
106
106
|
over: cap > 0 && tokens >= cap
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* The "Change files" row's words, for where the AI works: sessions on git (a branch of its own with a
|
|
112
|
-
* pull request a person merges), sessions in Seam (its folder's square: it commits there and merges
|
|
113
|
-
* onto main once the checks pass, as every AI in Seam is told: session-seam.js SEAM_GUIDE; no branches,
|
|
114
|
-
* pushes or pull requests), or both. `seam`/`git`: whether any session open here is in Seam / on git.
|
|
115
|
-
*/
|
|
116
|
-
export function filesWords ({ seam = false, git = false } = {}) {
|
|
117
|
-
const inSeam = 'its folder\'s square in Seam, where it commits and merges onto main once the checks pass'
|
|
118
|
-
if (seam && !git) return { head: 'Change files and land its work', hint: `Each task's work goes into ${inSeam}.` }
|
|
119
|
-
if (seam) return { head: 'Change files and land its work', hint: `In a session whose code is in Seam, each task's work goes into ${inSeam}. In a session on git, each task is on a branch of its own with a pull request a person merges.` }
|
|
120
|
-
return { head: 'Change files and push its own branches', hint: 'Each task on a branch of its own with a pull request. A person merges it.' }
|
|
121
|
-
}
|
package/src/ui/cloud-ai.js
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
// place. The card and the sign-in follow the API's long poll (GET /api/cloud-ai?wait=<version>).
|
|
6
6
|
import { I, state, $, esc, toast, api, loadingNote } from './common.js'
|
|
7
7
|
import { toolLogo } from './tool-logo.js'
|
|
8
|
-
import { CLOUD_TOOLS, cloudTool, cloudPhase, cloudStatus, signInSteps, cloudUsage, shortTokens
|
|
9
|
-
import { inSeam } from './seam-model.js'
|
|
8
|
+
import { CLOUD_TOOLS, cloudTool, cloudPhase, cloudStatus, signInSteps, cloudUsage, shortTokens } from './cloud-ai-model.js'
|
|
10
9
|
|
|
11
10
|
const STEPS = ['Name', 'AI tool', 'What it does', 'Sessions', 'Sign in']
|
|
12
11
|
export const AI_COLORS = ['#2e7a80', '#4f4fa0', '#4a7a45', '#855a9c', '#a8701c', '#9c4f6b', '#3b6a9a']
|
|
@@ -102,18 +101,11 @@ function signingHtml (vm, ui) {
|
|
|
102
101
|
</div>`
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
/** Whether the sessions open here are in Seam, on git, or both: how the "Change files" row reads (filesWords). */
|
|
106
|
-
function sessionKinds () {
|
|
107
|
-
const all = [...(state.sessions ? state.sessions.values() : [])].map((s) => s.status).filter(Boolean)
|
|
108
|
-
return { seam: all.some(inSeam), git: all.some((st) => !inSeam(st)) }
|
|
109
|
-
}
|
|
110
|
-
|
|
111
104
|
function doesHtml (d, name) {
|
|
112
|
-
const fw = filesWords(sessionKinds())
|
|
113
105
|
return `<div class="ai-list">
|
|
114
106
|
<div class="ai-row"><i>${I.chat}</i><div><b>Answer people who write to it</b><span class="hint">@mentions and direct messages for ${esc(name)}${name === own() ? '' : ` or ${esc(own())}`}.</span></div><span class="ai-always">Always</span></div>
|
|
115
107
|
<div class="ai-row wide"><i>${I.board}</i><div><b>Pick up tasks from the board</b><span class="hint">When it finishes one, it starts the next.</span></div><div class="ctl">${seg(TASKS, d.tasks, 'data-ai-tasks')}</div></div>
|
|
116
|
-
<div class="ai-row"><i>${I.branch}</i><div><b
|
|
108
|
+
<div class="ai-row"><i>${I.branch}</i><div><b>Change files and push its own branches</b><span class="hint">Each task on a branch of its own with a pull request. A person merges it.</span></div>${sw(d.files, 'data-ai-files', 'Change files and push its own branches')}</div>
|
|
117
109
|
<div class="ai-row"><i>${I.power}</i><div><b>Wake for every message</b><span class="hint">${d.wake ? 'A message to it wakes its machine within a minute.' : 'Messages wait until it next wakes: for a task, or when you work in one of its sessions.'}</span></div>${sw(d.wake, 'data-ai-wake', 'Wake for every message')}</div>
|
|
118
110
|
</div>`
|
|
119
111
|
}
|
package/src/ui/connections.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// sign-ins (plans/app-connections.md). Agents use them with quilt_apps / quilt_app_tools /
|
|
4
4
|
// quilt_app_call. Also the approval card an app action waiting for a person draws in the chat.
|
|
5
5
|
import { api, esc, toast, ago, I } from './common.js'
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
const SEARCH_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>'
|
|
7
8
|
|
|
8
9
|
const views = new Map() // `${type}:${id}` -> the last view, so a redraw shows it at once
|
|
9
10
|
const urlOf = (type, id, rest = '') => `/api/connections/${type}/${encodeURIComponent(id)}${rest}`
|
package/src/ui/fileview.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// every change to the file with its diff (diffview.js).
|
|
4
4
|
import { esc, bytes, I, loadingNote } from './common.js'
|
|
5
5
|
import { historyMarkup, changeCount } from './diffview.js'
|
|
6
|
-
import { patchesMarkup, blameMarkup, historyCount } from './quiltview.js'
|
|
7
6
|
import { previewKind, FROM_BYTES, HAS_RAW, textKey, bytesPreviewHtml, prettyAndRawHtml, hydrate } from './preview.js'
|
|
8
7
|
|
|
9
8
|
const MAX_LINES = 20000
|
|
@@ -20,12 +19,8 @@ const MAX_LINES = 20000
|
|
|
20
19
|
* @param {object} [o.people] { who, colorOf } for the Changes tab
|
|
21
20
|
* @param {object|null} [o.summary] the file's totals in this session (changes.js fileChanges)
|
|
22
21
|
* @param {(path: string, download?: boolean) => string} [o.rawHref] a link to a file's bytes, for the preview
|
|
23
|
-
* @param {object|null} [o.quilt] in a session linked to a quilt (quiltview.js): { patches, quilt, note,
|
|
24
|
-
* open, shown, blame, liveBy }. Changes is then History (the live changes, then the patches) and
|
|
25
|
-
* Blame is a third tab. Absent, the file view is as it always was.
|
|
26
|
-
* @param {number|null} [o.line] a line to bring into view and mark, once (a search hit)
|
|
27
22
|
*/
|
|
28
|
-
export function renderFileView (el, { path, file, meta, me, prevText, bannerOnly = false, tab = 'file', history = null, people, summary = null, chatHref = null, rawHref = null
|
|
23
|
+
export function renderFileView (el, { path, file, meta, me, prevText, bannerOnly = false, tab = 'file', history = null, people, summary = null, chatHref = null, rawHref = null }) {
|
|
29
24
|
const scroller = el.querySelector('.fv-scroll')
|
|
30
25
|
const keep = scroller && scroller.dataset.path === path ? scroller.scrollTop : 0
|
|
31
26
|
// The tree tells which files came from chat: one opened before it loaded is drawn again once it has.
|
|
@@ -47,9 +42,7 @@ export function renderFileView (el, { path, file, meta, me, prevText, bannerOnly
|
|
|
47
42
|
|
|
48
43
|
let body
|
|
49
44
|
let pvKey = null
|
|
50
|
-
if (tab === 'changes'
|
|
51
|
-
else if (tab === 'changes') body = history ? `<div class="fv-history">${historyMarkup(history, { ...people, summary })}</div>` : '<div class="fv-note">Reading what changed…</div>'
|
|
52
|
-
else if (tab === 'blame' && quilt) body = blameMarkup({ text: file && !file.missing && !file.binary ? file.text : (file && (file.missing || file.binary) ? '' : null), blame: quilt.blame, liveBy: quilt.liveBy, ...people })
|
|
45
|
+
if (tab === 'changes') body = history ? `<div class="fv-history">${historyMarkup(history, { ...people, summary })}</div>` : '<div class="fv-note">Reading what changed…</div>'
|
|
53
46
|
else if (!file) body = `<div class="fv-note">${loadingNote()}</div>`
|
|
54
47
|
else if (file.missing) body = `<div class="fv-note">${file.deleted ? 'This file was deleted.' : 'This file isn’t in the session. It may be too large to sync, or ignored.'}</div>`
|
|
55
48
|
else {
|
|
@@ -59,16 +52,14 @@ export function renderFileView (el, { path, file, meta, me, prevText, bannerOnly
|
|
|
59
52
|
// The same preview as drawn already (a picture, a PDF, a markdown page): keep it, so it neither flickers nor reloads.
|
|
60
53
|
if (pvKey && scroller && scroller.dataset.path === path && scroller.dataset.tab === tab && scroller.dataset.pvKey === pvKey) {
|
|
61
54
|
el.querySelector('.fv-banner').outerHTML = banner
|
|
62
|
-
renderFileTabs(el, { tab, history, summary
|
|
55
|
+
renderFileTabs(el, { tab, history, summary })
|
|
63
56
|
return
|
|
64
57
|
}
|
|
65
58
|
}
|
|
66
59
|
|
|
67
|
-
el.innerHTML = `<div class="fv">${banner}${tabsMarkup(tab, history, summary
|
|
60
|
+
el.innerHTML = `<div class="fv">${banner}${tabsMarkup(tab, history, summary)}<div class="fv-scroll" data-path="${esc(path)}" data-tab="${tab}"${pvKey ? ` data-pv-key="${esc(pvKey)}"` : ''}>${body}</div></div>`
|
|
68
61
|
if (pvKey) hydrate(el, { text: () => file.text, image: (p) => rawHref && relativeImage(path, p, rawHref) })
|
|
69
62
|
const s = el.querySelector('.fv-scroll')
|
|
70
|
-
const hit = line && tab === 'file' ? s.querySelector(`.fv-code tr:nth-child(${Number(line)})`) : null
|
|
71
|
-
if (hit) { hit.classList.add('at'); s.scrollTop = Math.max(0, hit.offsetTop - 80); return } // a search hit: its line
|
|
72
63
|
if (scroller && scroller.dataset.path === path && scroller.dataset.tab !== s.dataset.tab) { s.scrollTop = 0; return } // the other tab starts at the top
|
|
73
64
|
const first = s.querySelector('tr.chg')
|
|
74
65
|
if (first && prevText != null) {
|
|
@@ -155,19 +146,15 @@ function renderChatFile (el, { path, file, chat, me, href, rawHref, keep }) {
|
|
|
155
146
|
el.querySelector('.fv-scroll').scrollTop = keep
|
|
156
147
|
}
|
|
157
148
|
|
|
158
|
-
const tabsMarkup = (tab, history, summary
|
|
159
|
-
<button type="button" role="tab" data-fvtab="file" class="${tab === 'file' ? 'on' : ''}" aria-selected="${tab === 'file'}">File</button>
|
|
160
|
-
<button type="button" role="tab" data-fvtab="changes" class="${tab === 'changes' ? 'on' : ''}" aria-selected="${tab === 'changes'}" title="What people are changing now, then the patches that touched this file">History${history && quilt.patches ? ` <span class="n">${historyCount(history, quilt.patches)}</span>` : ''}</button>
|
|
161
|
-
<button type="button" role="tab" data-fvtab="blame" class="${tab === 'blame' ? 'on' : ''}" aria-selected="${tab === 'blame'}" title="Who wrote each line, in which patch">Blame</button>
|
|
162
|
-
</div>` : `<div class="fv-tabs segmented" role="tablist" aria-label="File or its changes">
|
|
149
|
+
const tabsMarkup = (tab, history, summary) => `<div class="fv-tabs segmented" role="tablist" aria-label="File or its changes">
|
|
163
150
|
<button type="button" role="tab" data-fvtab="file" class="${tab === 'file' ? 'on' : ''}" aria-selected="${tab === 'file'}">File</button>
|
|
164
151
|
<button type="button" role="tab" data-fvtab="changes" class="${tab === 'changes' ? 'on' : ''}" aria-selected="${tab === 'changes'}" title="Every change to this file, with who made it and what changed">Changes${history ? ` <span class="n">${changeCount(history, summary)}</span>` : ''}</button>
|
|
165
152
|
</div>`
|
|
166
153
|
|
|
167
154
|
/** Updates the tabs (the Changes count) without re-rendering, so freshly changed lines stay lit. */
|
|
168
|
-
export function renderFileTabs (el, { tab, history, summary = null
|
|
155
|
+
export function renderFileTabs (el, { tab, history, summary = null }) {
|
|
169
156
|
const tabs = el.querySelector('.fv-tabs')
|
|
170
|
-
if (tabs) tabs.outerHTML = tabsMarkup(tab, history, summary
|
|
157
|
+
if (tabs) tabs.outerHTML = tabsMarkup(tab, history, summary)
|
|
171
158
|
}
|
|
172
159
|
|
|
173
160
|
function agoLong (ts) {
|