heyquilt 0.3.181 → 0.3.183
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 +101 -97
- package/RELEASES.md +17 -0
- package/bin/quilt.js +32 -32
- package/desktop/main.js +1 -1
- package/package.json +1 -1
- package/src/account.js +2 -2
- package/src/admit-policy.js +2 -2
- package/src/agent-join.js +3 -3
- package/src/agent-task-workflow.js +14 -14
- package/src/ai-vm.js +1 -1
- package/src/api/agent-placement.js +2 -2
- package/src/api/audit.js +1 -1
- package/src/api/file-paths.js +1 -1
- package/src/api/file-store.js +1 -1
- package/src/api/invite-email.js +4 -4
- package/src/api/join-text.js +5 -5
- package/src/api/notify.js +7 -7
- package/src/api/permissions.js +1 -1
- package/src/api/routes/agent-wake.js +1 -1
- package/src/api/routes/agents.js +2 -2
- package/src/api/routes/ai-vm.js +5 -5
- package/src/api/routes/connections.js +13 -13
- package/src/api/routes/grants.js +2 -2
- package/src/api/routes/mail.js +10 -10
- package/src/api/routes/relay.js +1 -1
- package/src/api/routes/secrets.js +11 -11
- package/src/api/routes/session-invites.js +5 -5
- package/src/api/routes/sessions.js +3 -3
- package/src/api/routes/workspace-agents.js +14 -14
- package/src/api/routes/workspace-files.js +12 -12
- package/src/api/routes/workspace-invites.js +5 -5
- package/src/api/routes/workspaces.js +11 -11
- package/src/api/secrets-access.js +1 -1
- package/src/api/server.js +3 -3
- package/src/api/team-access.js +1 -1
- package/src/api/workspace-access.js +1 -1
- package/src/api/workspace-reach.js +3 -3
- package/src/app-tools.js +10 -10
- package/src/autowork.js +4 -4
- package/src/branch-view.js +1 -1
- package/src/catchup.js +5 -5
- package/src/chat-links.js +18 -18
- package/src/connection.js +11 -11
- package/src/control.js +5 -5
- package/src/conversation.js +1 -1
- package/src/doctor.js +2 -2
- package/src/duties.js +1 -1
- package/src/fsutil.js +1 -1
- package/src/gitstate.js +117 -1
- package/src/held.js +4 -4
- package/src/hooks.js +3 -3
- package/src/hosted-client.js +2 -2
- package/src/identity.js +1 -1
- package/src/inbox.js +1 -1
- package/src/key-cli.js +1 -1
- package/src/mail-tools.js +11 -11
- package/src/mcp-proxy.js +1 -1
- package/src/mcp.js +59 -59
- package/src/new-session.js +112 -0
- package/src/project-rules.js +2 -2
- package/src/relay-ask.js +2 -2
- package/src/relay-cluster.js +3 -3
- package/src/relay-live-write.js +3 -3
- package/src/relay-mcp.js +56 -56
- package/src/relay-prune.js +1 -1
- package/src/relay-turn-sync.js +1 -1
- package/src/repo-ref.js +54 -0
- package/src/secret-import.js +1 -1
- package/src/secret-names.js +6 -6
- package/src/secret-run.js +3 -3
- package/src/server.js +41 -41
- package/src/session-access.js +3 -3
- package/src/session-name.js +1 -1
- package/src/session.js +118 -52
- package/src/setup.js +7 -7
- package/src/status.js +2 -2
- package/src/tasks.js +1 -1
- package/src/turn-sync.js +4 -4
- package/src/ui/account-sessions.js +2 -2
- package/src/ui/agent-env-key.js +1 -1
- package/src/ui/agent-guide.js +35 -35
- package/src/ui/agent-kinds.js +8 -8
- package/src/ui/agent-place.js +16 -16
- package/src/ui/agents-table.js +6 -6
- package/src/ui/app.css +357 -0
- package/src/ui/app.js +29 -14
- package/src/ui/board.js +2 -2
- package/src/ui/catchup.js +5 -5
- package/src/ui/changes-seen.js +2 -2
- package/src/ui/changes.js +3 -3
- package/src/ui/cloud-ai.js +12 -12
- package/src/ui/common.js +1 -1
- package/src/ui/connections.js +1 -1
- package/src/ui/diffview.js +2 -2
- package/src/ui/feed.js +1 -1
- package/src/ui/feedback.js +4 -4
- package/src/ui/files.js +120 -14
- package/src/ui/fileview.js +3 -3
- package/src/ui/git-rule.js +3 -3
- package/src/ui/home.js +95 -67
- package/src/ui/index.html +1 -1
- package/src/ui/invite.js +8 -8
- package/src/ui/invites.js +3 -3
- package/src/ui/new-session.js +151 -0
- package/src/ui/prail-model.js +22 -0
- package/src/ui/prail.js +43 -0
- package/src/ui/project-board.js +359 -0
- package/src/ui/project-model.js +197 -0
- package/src/ui/project-pop.js +451 -0
- package/src/ui/projects.js +406 -0
- package/src/ui/sandbox-keys.js +3 -3
- package/src/ui/secrets-view.js +5 -5
- package/src/ui/session-words.js +2 -2
- package/src/ui/session.js +156 -43
- package/src/ui/tree.js +3 -3
- package/src/ui/voice.js +6 -6
- package/src/ui/workspaces.js +23 -23
- package/src/ui-server.js +104 -26
- package/src/update-check.js +2 -2
- package/src/voice.js +7 -7
- package/src/wake-tool.js +1 -1
- package/src/webhooks.js +1 -1
- package/src/workspace-cli.js +12 -12
- package/src/workspace-tools.js +33 -33
package/src/ui/home.js
CHANGED
|
@@ -6,7 +6,7 @@ import { agentPaste } from './invite.js'
|
|
|
6
6
|
import { openKindMenu, kindLineHtml } from './agent-kinds.js'
|
|
7
7
|
import { quiltMark } from './mark.js'
|
|
8
8
|
import { updateControl } from './releases.js'
|
|
9
|
-
import { workspacesHtml, bindWorkspaces, workspacePageHtml, bindWorkspacePage, loadWorkspaces, openWorkspace, COLORS } from './workspaces.js'
|
|
9
|
+
import { workspacesHtml, bindWorkspaces, workspacePageHtml, bindWorkspacePage, loadWorkspaces, openWorkspace, wsIdOf, COLORS } from './workspaces.js'
|
|
10
10
|
import { allFilesHtml, bindAllFiles } from './files.js'
|
|
11
11
|
import { invitesHtml, bindInvites } from './invites.js'
|
|
12
12
|
import { accountRowsHtml, loadAccountSessions, bindAccountSessions } from './account-sessions.js'
|
|
@@ -17,6 +17,10 @@ import { SOUND_EVENTS, playSound } from './sounds.js'
|
|
|
17
17
|
import { thisSessionGitHtml } from './git-rule.js'
|
|
18
18
|
import { cloudAiCardHtml, bindCloudAi, cloudSetupOn, cloudSetupHtml, cloudSetupStep } from './cloud-ai.js'
|
|
19
19
|
import { feedbackDockHtml, bindFeedback } from './feedback.js'
|
|
20
|
+
import { openNewCodebase } from './new-session.js'
|
|
21
|
+
import { projectShellHtml, bindProjectShell } from './projects.js'
|
|
22
|
+
import { holdProjectBoard } from './project-board.js'
|
|
23
|
+
import { openProjectPop } from './project-pop.js'
|
|
20
24
|
|
|
21
25
|
export const tildify = (p) => state.defaults.home && String(p).startsWith(state.defaults.home) ? `~${String(p).slice(state.defaults.home.length)}` : p
|
|
22
26
|
const hostOf = (url) => { try { return new URL(String(url).replace(/^ws/, 'http')).host } catch { return url } }
|
|
@@ -28,6 +32,32 @@ function greeting () {
|
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
// ---------------------------------------------------------------- shell --
|
|
35
|
+
/** Home or a project's page, with projects on. Settings and Agents are a pop-up over Home there, not pages. */
|
|
36
|
+
function renderProjects (view) {
|
|
37
|
+
const popup = view === 'settings' || view === 'agents' ? view : ''
|
|
38
|
+
if (popup) { view = 'home'; state.view = 'home' }
|
|
39
|
+
// A project's board that is being used (a card dragged, a name typed) is not drawn again under the hand: once that is over.
|
|
40
|
+
if (view === state.shellView && !popup && holdProjectBoard(() => { if (state.view === view) renderShell(view) })) return
|
|
41
|
+
const scroll = view === state.shellView ? ($('.pj-pmain') || $('#page'))?.scrollTop || 0 : 0
|
|
42
|
+
$('#app').innerHTML = projectShellHtml(view)
|
|
43
|
+
state.shellView = view
|
|
44
|
+
const main = $('.pj-pmain') || $('#page')
|
|
45
|
+
if (main && scroll) main.scrollTop = scroll
|
|
46
|
+
const rerender = () => { if (state.view === view) renderShell(view) }
|
|
47
|
+
bindProjectShell(view, {
|
|
48
|
+
go, rerender, newSessionDialog, joinSessionDialog, openSettings, bindSessionActions,
|
|
49
|
+
submitSession: async (body) => { const sum = await api('POST', '/api/sessions', body); state.sessions.set(sum.id, sum); await go(sum.id) }
|
|
50
|
+
})
|
|
51
|
+
if (popup) { if (popup === 'agents') state.settingsTab = 'agents'; openSettings() }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** A project's settings, from the strip's gear: on the project's own page, which has it loaded. */
|
|
55
|
+
export async function openProjectSettings (id) {
|
|
56
|
+
if (!/^(ws|wsfiles):/.test(state.view) || wsIdOf(state.view) !== id) await go(`ws:${id}`)
|
|
57
|
+
if (state.workspace?.workspace?.id !== id) return
|
|
58
|
+
openProjectPop({ id })
|
|
59
|
+
}
|
|
60
|
+
|
|
31
61
|
/** Whether the sidebar is collapsed to a rail of icons (wide windows only; kept on this computer). */
|
|
32
62
|
function sideCollapsed () {
|
|
33
63
|
if (state.sideCollapsed === undefined) { try { state.sideCollapsed = localStorage.getItem('quilt.sideCollapsed') === '1' } catch { state.sideCollapsed = false } }
|
|
@@ -35,6 +65,8 @@ function sideCollapsed () {
|
|
|
35
65
|
}
|
|
36
66
|
|
|
37
67
|
export function renderShell (view) {
|
|
68
|
+
// With projects on, Home and a project's page are projects.js's: a header, and no sidebar of the app's own.
|
|
69
|
+
if (state.workspacesOn) return renderProjects(view)
|
|
38
70
|
const page = $('#page')
|
|
39
71
|
const scroll = page ? page.scrollTop : 0
|
|
40
72
|
$('#app').innerHTML = `
|
|
@@ -66,8 +98,8 @@ function placeName (view) {
|
|
|
66
98
|
if (view === 'agents') return 'Agents'
|
|
67
99
|
const id = view.startsWith('wsfiles:') ? view.slice(8) : view.startsWith('ws:') ? view.slice(3) : ''
|
|
68
100
|
if (!id) return 'Home'
|
|
69
|
-
const name = (state.workspaces || []).find((w) => w.id === id)?.name || state.workspace?.workspace?.name || '
|
|
70
|
-
return view.startsWith('wsfiles:') ? `${name} ·
|
|
101
|
+
const name = (state.workspaces || []).find((w) => w.id === id)?.name || state.workspace?.workspace?.name || 'Project'
|
|
102
|
+
return view.startsWith('wsfiles:') ? `${name} · Artifacts` : name
|
|
71
103
|
}
|
|
72
104
|
|
|
73
105
|
function mobileBarHtml (view) {
|
|
@@ -104,11 +136,11 @@ function sidebarHtml (view) {
|
|
|
104
136
|
</nav>
|
|
105
137
|
|
|
106
138
|
${state.workspacesOn
|
|
107
|
-
? `<button class="btn primary full sessions-btn" type="button" data-join-session title="Join a
|
|
139
|
+
? `<button class="btn primary full sessions-btn" type="button" data-join-session title="Join a codebase">${I.link}<span>Join a codebase</span></button>`
|
|
108
140
|
: `<div class="menu-wrap" id="sessions-menu-wrap">
|
|
109
|
-
<button class="btn primary full sessions-btn" id="sessions-btn" aria-haspopup="true" aria-expanded="false">${I.folder}<span>
|
|
141
|
+
<button class="btn primary full sessions-btn" id="sessions-btn" aria-haspopup="true" aria-expanded="false">${I.folder}<span>Codebases</span>${running.length ? `<span class="badge-count">${running.length}</span>` : ''}<span class="caret">${I.caret}</span></button>
|
|
110
142
|
<div class="popover menu" id="sessions-menu" role="menu" hidden>
|
|
111
|
-
<button class="pop-item" role="menuitem" data-new-session>${I.plus}<span>New
|
|
143
|
+
<button class="pop-item" role="menuitem" data-new-session>${I.plus}<span>New codebase…</span></button>
|
|
112
144
|
<button class="pop-item" role="menuitem" data-join-session>${I.link}<span>Join with an invite…</span></button>
|
|
113
145
|
${running.length ? `<div class="pop-sep"></div><div class="pop-label">Open now</div>${running.map((s) => `
|
|
114
146
|
<button class="pop-item" role="menuitem" data-go="${s.id}"><span class="dot" style="background:${s.status.connected ? 'var(--ok)' : 'var(--warn)'}"></span><span class="grow">${esc(s.status.sessionName || basename(s.dir))}</span><span class="hint">${s.status.peers.length + 1} here</span></button>`).join('')}` : ''}
|
|
@@ -124,7 +156,7 @@ function sidebarHtml (view) {
|
|
|
124
156
|
|
|
125
157
|
<nav class="side-nav side-foot" aria-label="App">
|
|
126
158
|
${window.quiltDesktop?.dev ? `<button type="button" data-dev-restart title="Quit and start Quilt again (running from source)">${I.refresh}<span>Restart (dev)</span></button>` : ''}
|
|
127
|
-
<button data-view="settings" class="${view === 'settings' ? 'on' : ''}" title="Account settings: your defaults for new
|
|
159
|
+
<button data-view="settings" class="${view === 'settings' ? 'on' : ''}" title="Account settings: your defaults for new codebases">${I.gear}<span>Settings</span></button>
|
|
128
160
|
</nav>
|
|
129
161
|
${feedbackDockHtml('side')}
|
|
130
162
|
</aside>`
|
|
@@ -136,8 +168,8 @@ function sideWorkspacesHtml (view) {
|
|
|
136
168
|
const list = state.workspacesOn ? (state.workspaces || []) : []
|
|
137
169
|
if (!list.length) return ''
|
|
138
170
|
return `
|
|
139
|
-
<div class="side-label">
|
|
140
|
-
<nav class="side-nav side-workspaces" aria-label="
|
|
171
|
+
<div class="side-label">Projects</div>
|
|
172
|
+
<nav class="side-nav side-workspaces" aria-label="Projects">${list.map((w) => `
|
|
141
173
|
<button data-view="ws:${esc(w.id)}" class="${view === `ws:${w.id}` ? 'on' : ''}" title="${esc(w.name)}"><span class="sw" style="background:${COLORS[w.color] || COLORS.lilac}"></span><span class="nm">${esc(w.name)}${w.space?.kind === 'org' ? `<span class="org"> · ${esc(w.space.name)}</span>` : ''}</span>${w.counts?.open ? `<span class="ct">${w.counts.open}</span>` : ''}</button>`).join('')}
|
|
142
174
|
</nav>`
|
|
143
175
|
}
|
|
@@ -224,7 +256,7 @@ function sessionRowHtml (r) {
|
|
|
224
256
|
<div class="folder-ico">${I.folder}</div>
|
|
225
257
|
<div class="meta">
|
|
226
258
|
<div class="name">${esc(basename(r.dir))}</div>
|
|
227
|
-
<div class="sub">This
|
|
259
|
+
<div class="sub">This codebase ran on your computer's own relay, which Quilt no longer supports. Your files are untouched.</div>
|
|
228
260
|
</div>
|
|
229
261
|
<div class="facts"><span>${esc(ago(r.lastUsed))}</span></div>
|
|
230
262
|
<div class="acts"><button class="btn sm" data-forget="${esc(r.dir)}">Remove from list</button></div>
|
|
@@ -258,27 +290,27 @@ function homeHtml () {
|
|
|
258
290
|
return `
|
|
259
291
|
<header class="page-head">
|
|
260
292
|
<h1>${greeting()}, ${esc(firstName())}</h1>
|
|
261
|
-
<p>${state.workspacesOn ? 'Your
|
|
293
|
+
<p>${state.workspacesOn ? 'Your projects. Open one, or add a new one.' : rows.some((r) => r.live) ? 'Pick up a codebase, or start something new from the Codebases menu.' : 'Create a codebase from one of your folders, or join one a partner shared with you.'}</p>
|
|
262
294
|
</header>
|
|
263
295
|
<section class="invites" id="invites-slot"${(state.invites || []).length ? '' : ' hidden'}>${invitesHtml()}</section>
|
|
264
296
|
|
|
265
297
|
${state.workspacesOn ? workspacesHtml() : rows.length || elsewhere ? `
|
|
266
298
|
<section class="sessions">
|
|
267
|
-
<div class="sec-head"><h2>Your
|
|
299
|
+
<div class="sec-head"><h2>Your codebases</h2><span class="count">${rows.length + elsewhere}</span>
|
|
268
300
|
<span class="spacer"></span>
|
|
269
301
|
<button class="btn sm" data-join-session>${I.link}<span>Join</span></button>
|
|
270
|
-
<button class="btn sm primary" data-new-session>${I.plus}<span>New
|
|
302
|
+
<button class="btn sm primary" data-new-session>${I.plus}<span>New codebase</span></button>
|
|
271
303
|
</div>
|
|
272
304
|
<div class="card session-list">${rows.map(sessionRowHtml).join('')}${accountRowsHtml()}</div>
|
|
273
305
|
</section>` : `
|
|
274
306
|
<section class="card welcome">
|
|
275
307
|
<div class="welcome-steps">
|
|
276
|
-
<div><span class="n">1</span><b>
|
|
308
|
+
<div><span class="n">1</span><b>Create a codebase</b><p class="hint">Pick a folder on your computer to work on together.</p></div>
|
|
277
309
|
<div><span class="n">2</span><b>Send an invite link</b><p class="hint">Partners click it or paste it into Quilt. You approve who gets in.</p></div>
|
|
278
310
|
<div><span class="n">3</span><b>Code together</b><p class="hint">Files sync live, and you can watch each other's AI work.</p></div>
|
|
279
311
|
</div>
|
|
280
312
|
<div class="welcome-actions">
|
|
281
|
-
<button class="btn primary" data-new-session>${I.plus}<span>New
|
|
313
|
+
<button class="btn primary" data-new-session>${I.plus}<span>New codebase</span></button>
|
|
282
314
|
<button class="btn" data-join-session>${I.link}<span>Join with an invite</span></button>
|
|
283
315
|
</div>
|
|
284
316
|
</section>`}`
|
|
@@ -320,27 +352,9 @@ function dialog (html) {
|
|
|
320
352
|
return { back, form, close }
|
|
321
353
|
}
|
|
322
354
|
|
|
355
|
+
/** New session: the Create a codebase pop-up (new-session.js). `workspace`: the one it starts in, if any. */
|
|
323
356
|
export function newSessionDialog (workspace = '') {
|
|
324
|
-
|
|
325
|
-
<h3>New session${workspace ? ` in ${esc(state.workspaces?.find((w) => w.id === workspace)?.name || 'this workspace')}` : ''}</h3>
|
|
326
|
-
<p class="lead">Pick what you want to work on together. You'll get invites to send once it starts.</p>
|
|
327
|
-
<div id="src-folder">
|
|
328
|
-
<div class="field">
|
|
329
|
-
<label for="n-dir">Project folder</label>
|
|
330
|
-
<div class="row"><input class="input grow" id="n-dir" name="dir" placeholder="~/code/my-app" value="${esc(tildify(state.lastCreateDir || state.defaults.cwd || ''))}" required>
|
|
331
|
-
<button type="button" class="btn icon" id="n-browse" title="Browse" aria-label="Browse">${I.folder}</button></div>
|
|
332
|
-
</div>
|
|
333
|
-
</div>
|
|
334
|
-
<p class="error" id="n-error"></p>
|
|
335
|
-
<div class="actions"><button type="button" class="btn ghost" data-cancel>Cancel</button><button class="btn primary" type="submit">Start session</button></div>`)
|
|
336
|
-
form.querySelector('#n-browse').onclick = () => pickFolder(form.querySelector('#n-dir'))
|
|
337
|
-
form.onsubmit = async (e) => {
|
|
338
|
-
e.preventDefault()
|
|
339
|
-
const dir = form.querySelector('#n-dir').value
|
|
340
|
-
state.lastCreateDir = dir
|
|
341
|
-
if (await submit(form, '#n-error', { mode: 'create', dir, workspace })) close()
|
|
342
|
-
}
|
|
343
|
-
form.querySelector('#n-dir').focus()
|
|
357
|
+
openNewCodebase({ workspace, submit, tildify, pickFolder })
|
|
344
358
|
}
|
|
345
359
|
|
|
346
360
|
/**
|
|
@@ -357,11 +371,11 @@ function workspaceInviteDialog (id) {
|
|
|
357
371
|
const org = isOrg ? (state.workspaces || []).find((w) => w.id === id)?.space : null
|
|
358
372
|
const orgName = org?.name || d?.owner?.name || 'the org'
|
|
359
373
|
const { back, form, close } = dialog(`
|
|
360
|
-
<h3>Invite to ${esc(d?.workspace?.name || 'this
|
|
374
|
+
<h3>Invite to ${esc(d?.workspace?.name || 'this project')}</h3>
|
|
361
375
|
<p class="lead">People get the invite in their Quilt and by email, and are in once they accept. Agents are added straight away.</p>
|
|
362
376
|
<div class="field"><label for="wi-access">Access</label>
|
|
363
377
|
<select class="input" id="wi-access"><option value="edit">Can edit</option><option value="view">View only</option></select></div>
|
|
364
|
-
${toggle('wiEvery', false, 'Also invite to every new
|
|
378
|
+
${toggle('wiEvery', false, 'Also invite to every new codebase in this project', 'For your own agents. Each new codebase sends them its link, and its owner lets them in. Off: the agent is in the project and sees its artifacts, and joins a codebase only when someone invites it there.')}
|
|
365
379
|
<div class="inv-sub-row"><div class="label inv-sub">People you've worked with, and ${isOrg ? `${esc(orgName)}'s agents` : 'your agents'}</div>
|
|
366
380
|
<label class="search-box"><span class="sr-only">Search people and agents</span><input class="input sm" id="wi-search" type="search" placeholder="Search…" autocomplete="off"></label></div>
|
|
367
381
|
<div id="wi-people"><p class="hint">${loadingNote()}</p></div>
|
|
@@ -423,7 +437,7 @@ function workspaceInviteDialog (id) {
|
|
|
423
437
|
page = Math.min(page, last)
|
|
424
438
|
const from = page * PAGE
|
|
425
439
|
const shown = hits.slice(from, from + PAGE)
|
|
426
|
-
list.innerHTML = (shown.length ? `<div class="ag-grid wi-grid">${shown.map(card).join('')}</div>` : rows.length ? '<p class="hint">Nobody matches that.</p>' : "<p class=\"hint\">Nobody yet. People and agents you've been in a
|
|
440
|
+
list.innerHTML = (shown.length ? `<div class="ag-grid wi-grid">${shown.map(card).join('')}</div>` : rows.length ? '<p class="hint">Nobody matches that.</p>' : "<p class=\"hint\">Nobody yet. People and agents you've been in a codebase with show up here.</p>") + why
|
|
427
441
|
pages.hidden = hits.length <= PAGE
|
|
428
442
|
pages.innerHTML = `<span>${from + 1}–${from + shown.length} of ${hits.length}</span>
|
|
429
443
|
<button type="button" class="btn sm icon" data-page="-1" aria-label="Previous page" ${page === 0 ? 'disabled' : ''}>${I.arrowLeft}</button>
|
|
@@ -532,8 +546,8 @@ function workspaceInviteDialog (id) {
|
|
|
532
546
|
export function joinSessionDialog (invite = '') {
|
|
533
547
|
const p = state.profile
|
|
534
548
|
const { form, close } = dialog(`
|
|
535
|
-
<h3>Join a
|
|
536
|
-
<p class="lead">${invite ? 'You were invited to a
|
|
549
|
+
<h3>Join a codebase</h3>
|
|
550
|
+
<p class="lead">${invite ? 'You were invited to a codebase. Choose where the files go, then join.' : 'Paste the invite link your partner sent you.'} They'll be asked to let you in.</p>
|
|
537
551
|
<div class="field">
|
|
538
552
|
<label for="j-invite">Invite link</label>
|
|
539
553
|
<textarea class="input mono" id="j-invite" rows="2" spellcheck="false" placeholder="https://join.heyquilt.com/…" required></textarea>
|
|
@@ -546,7 +560,7 @@ export function joinSessionDialog (invite = '') {
|
|
|
546
560
|
<span class="hint">Leave empty to use a new folder in ${esc(p.joinDir)}.</span>
|
|
547
561
|
</div>
|
|
548
562
|
<p class="error" id="j-error"></p>
|
|
549
|
-
<div class="actions"><button type="button" class="btn ghost" data-cancel>Cancel</button><button class="btn primary" type="submit">Join
|
|
563
|
+
<div class="actions"><button type="button" class="btn ghost" data-cancel>Cancel</button><button class="btn primary" type="submit">Join codebase</button></div>`)
|
|
550
564
|
const inv = form.querySelector('#j-invite')
|
|
551
565
|
inv.addEventListener('input', () => {
|
|
552
566
|
const d = decodeInvite(inv.value)
|
|
@@ -600,7 +614,7 @@ function agentsPageHtml () {
|
|
|
600
614
|
<label class="search-box"><span class="sr-only">Search agents</span><input class="input" id="agents-search" type="search" placeholder="Search agents…" autocomplete="off"></label>
|
|
601
615
|
<button class="btn primary" type="button" id="agents-make"${state.workspacesOn ? ' aria-haspopup="menu" aria-expanded="false"' : ''}>${I.bot}<span>Invite an agent</span></button>
|
|
602
616
|
</header>
|
|
603
|
-
<p class="hint ag-lead">${state.workspacesOn ? 'AIs that work with you as their own members. Global agents are in all your
|
|
617
|
+
<p class="hint ag-lead">${state.workspacesOn ? 'AIs that work with you as their own members. Global agents are in all your projects; project and codebase agents in one. Open one for where it has been, where it works and its keys.' : 'AIs that work with you as their own members. An invite is pasted into the AI once; from then on it joins any codebase you send it. Open one for where it has been and its keys.'}</p>
|
|
604
618
|
<div id="agents-invite"><p class="error" id="agents-error"></p></div>
|
|
605
619
|
<div id="agents-list"><p class="hint">${loadingNote()}</p></div>
|
|
606
620
|
<div class="ag-pages" id="agents-pages" hidden></div>
|
|
@@ -638,26 +652,38 @@ async function showAgentDetails (box, a) {
|
|
|
638
652
|
// Settings come in sections, picked from the list on the left: Agents (your AI, your agents),
|
|
639
653
|
// Version control (git for everyone: the default for new sessions; opened from a session, that session's git on top), You (profile, appearance, sounds), Session (defaults for
|
|
640
654
|
// starting and joining), Workspaces (with workspaces on), Account (sign-in, this computer, the version).
|
|
641
|
-
const SETTINGS_TABS = [['agents', 'Agents', 'bot'], ['git', 'Version control', 'branch'], ['you', 'You', 'user'], ['session', '
|
|
642
|
-
|
|
655
|
+
const SETTINGS_TABS = [['agents', 'Agents', 'bot'], ['git', 'Version control', 'branch'], ['you', 'You', 'user'], ['session', 'Codebase', 'folder'], ['workspaces', 'Projects', 'grid'], ['account', 'Account', 'gear']]
|
|
656
|
+
// With projects on the list is in three groups: you, what every project gets, and what a new codebase
|
|
657
|
+
// starts with. Your own AI then has a part to itself (Your AI), apart from the agents every project gets.
|
|
658
|
+
const PROJECT_SETTINGS = [
|
|
659
|
+
{ label: 'You', tabs: [['ai', 'Your AI', 'bot'], ['you', 'Profile', 'user'], ['account', 'Account', 'gear']] },
|
|
660
|
+
{ label: 'Every project', tabs: [['agents', 'Agents', 'bot'], ['git', 'Version control', 'branch'], ['workspaces', 'Projects', 'grid']] },
|
|
661
|
+
{ label: 'New codebases', tabs: [['session', 'Defaults', 'folder']] }
|
|
662
|
+
]
|
|
663
|
+
const settingsGroups = () => state.workspacesOn ? PROJECT_SETTINGS : [{ label: '', tabs: SETTINGS_TABS.filter(([id]) => id !== 'workspaces') }]
|
|
664
|
+
const settingsTabs = () => settingsGroups().flatMap((g) => g.tabs)
|
|
665
|
+
/** The tab your own AI (the tool on this computer, your cloud AI) is on. */
|
|
666
|
+
const aiTab = () => state.workspacesOn ? 'ai' : 'agents'
|
|
643
667
|
export function settingsTab () {
|
|
644
|
-
if (!state.settingsTab) { try { state.settingsTab = localStorage.getItem('quilt.settingsTab') ||
|
|
668
|
+
if (!state.settingsTab) { try { state.settingsTab = localStorage.getItem('quilt.settingsTab') || aiTab() } catch { state.settingsTab = aiTab() } }
|
|
645
669
|
if (state.settingsTab === 'sessions') state.settingsTab = 'session' // the name it had before
|
|
646
|
-
return settingsTabs().some(([id]) => id === state.settingsTab) ? state.settingsTab :
|
|
670
|
+
return settingsTabs().some(([id]) => id === state.settingsTab) ? state.settingsTab : aiTab()
|
|
647
671
|
}
|
|
648
672
|
const settingsTabLabel = (tab) => (settingsTabs().find(([id]) => id === tab) || settingsTabs()[0])[1]
|
|
649
673
|
|
|
650
674
|
function settingsTabsHtml (tab) {
|
|
651
|
-
|
|
675
|
+
const one = ([id, label, icon]) => `<button type="button" role="tab" class="ss-tab ${tab === id ? 'on' : ''}" data-settings-tab="${id}" aria-selected="${tab === id}" tabindex="${tab === id ? 0 : -1}">${I[icon] || ''}<span>${label}</span></button>`
|
|
676
|
+
return settingsGroups().map((g) => `${g.label ? `<div class="label nc-label pj-nav-label">${g.label}</div>` : ''}<div class="ss-tabs settings-tabs" role="tablist" aria-orientation="vertical" aria-label="${g.label || 'Account settings'}">${g.tabs.map(one).join('')}</div>`).join('')
|
|
652
677
|
}
|
|
653
678
|
|
|
679
|
+
/** Every project you are in, the archived ones too: an archived project is off the strip on the left, and is opened from here. */
|
|
654
680
|
function workspacesSettingsHtml () {
|
|
655
|
-
const list = state.workspaces || []
|
|
681
|
+
const list = [...(state.workspaces || [])].sort((x, y) => Number(!!x.archivedAt) - Number(!!y.archivedAt))
|
|
656
682
|
return `
|
|
657
683
|
<section class="card settings-sec" id="workspaces-sec">
|
|
658
|
-
<div class="sec-intro"><h2>
|
|
684
|
+
<div class="sec-intro"><h2>Projects</h2><p>The projects you are in, and the organizations behind them. An archived one is kept here, off the left: open it to bring it back from its settings.</p></div>
|
|
659
685
|
<div class="sec-body">
|
|
660
|
-
${list.length ? list.map((w) => `<div class="ws-settings-row"><span class="sw" style="background:${esc(w.color || 'var(--accent)')}"></span><span class="nm"><b>${esc(w.name)}</b>${w.org && w.org.name ? `<span class="org">${esc(w.org.name)}</span>` : ''}</span><button class="btn sm" type="button" data-view="ws:${esc(w.id)}">Open</button></div>`).join('') : '<p class="hint">You are not in a
|
|
686
|
+
${list.length ? list.map((w) => `<div class="ws-settings-row"><span class="sw" style="background:${esc(COLORS[w.color] || w.color || 'var(--accent)')}"></span><span class="nm"><b>${esc(w.name)}</b>${w.archivedAt ? '<span class="org">Archived</span>' : ''}${w.org && w.org.name ? `<span class="org">${esc(w.org.name)}</span>` : ''}</span><button class="btn sm" type="button" data-view="ws:${esc(w.id)}">Open</button></div>`).join('') : '<p class="hint">You are not in a project yet. Make one with the plus on the left.</p>'}
|
|
661
687
|
</div>
|
|
662
688
|
</section>`
|
|
663
689
|
}
|
|
@@ -667,10 +693,10 @@ function settingsPageHtml () {
|
|
|
667
693
|
const tab = settingsTab()
|
|
668
694
|
return `<header class="page-head">
|
|
669
695
|
<h1>Account settings</h1>
|
|
670
|
-
<p class="settings-scope" data-settings-scope="account">Your defaults for new
|
|
696
|
+
<p class="settings-scope" data-settings-scope="account">Your defaults for new codebases. A codebase that is already open keeps its own, in its Codebase settings.</p>
|
|
671
697
|
</header>
|
|
672
698
|
<nav class="settings-tabs page-tabs" role="tablist" aria-label="Account settings">${settingsTabs().map(([id, label, icon]) => `<button type="button" role="tab" class="tab ${tab === id ? 'on' : ''}" data-settings-tab="${id}" aria-selected="${tab === id}">${I[icon] || ''}<span>${label}</span></button>`).join('')}</nav>
|
|
673
|
-
<div role="tabpanel">${tab ===
|
|
699
|
+
<div role="tabpanel">${tab === aiTab() && cloudSetupOn() ? cloudSetupPageHtml() : settingsHtml()}</div>`
|
|
674
700
|
}
|
|
675
701
|
|
|
676
702
|
/** Setting up your cloud AI on the Settings page: the whole tab panel, header to footer. */
|
|
@@ -688,21 +714,21 @@ function settingsHtml (session = null) {
|
|
|
688
714
|
const a = state.account || { name: p.name, email: '' }
|
|
689
715
|
const theme = p.theme || document.documentElement.dataset.theme || 'dark'
|
|
690
716
|
const tab = settingsTab()
|
|
691
|
-
const show = (id) => ({ account: ['account', 'about', 'computer'], you: ['profile', 'appearance', 'sounds'], session: ['sessions'], agents: ['your-ai', 'cloud-ai', 'agents'], git: ['agents-git'], workspaces: ['workspaces'] })[tab].includes(id)
|
|
717
|
+
const show = (id) => ({ account: ['account', 'about', 'computer'], you: ['profile', 'appearance', 'sounds'], session: ['sessions'], ai: ['your-ai', 'cloud-ai'], agents: state.workspacesOn ? ['agents'] : ['your-ai', 'cloud-ai', 'agents'], git: ['agents-git'], workspaces: ['workspaces'] })[tab].includes(id)
|
|
692
718
|
return `
|
|
693
719
|
${tab === 'workspaces' ? workspacesSettingsHtml() : ''}
|
|
694
720
|
${show('account') ? `<section class="card settings-sec" id="account-sec">
|
|
695
721
|
<div class="sec-intro"><h2>Account</h2><p>This computer is signed in to your heyquilt.com account.</p></div>
|
|
696
722
|
<div class="sec-body">
|
|
697
723
|
<div class="kv"><span>Signed in as</span><b>${esc(a.name)}</b><span class="hint">${esc(a.email)}</span></div>
|
|
698
|
-
<div class="sec-actions"><span class="hint">Signing out
|
|
724
|
+
<div class="sec-actions"><span class="hint">Signing out closes your codebases on this computer. Your files stay put.</span><button class="btn" type="button" id="sign-out">Sign out</button></div>
|
|
699
725
|
</div>
|
|
700
726
|
</section>` : ''}
|
|
701
727
|
|
|
702
728
|
${show('your-ai') ? `<form class="card settings-sec" id="your-ai-sec" autocomplete="off">
|
|
703
|
-
<div class="sec-intro"><h2>The AI on this computer</h2><p>The AI tool you code with. In a
|
|
729
|
+
<div class="sec-intro"><h2>The AI on this computer</h2><p>The AI tool you code with. In a codebase it works as you, on what you ask it: what people write to you is yours.</p></div>
|
|
704
730
|
<div class="sec-body">
|
|
705
|
-
${toggle('shareAgent', p.shareAgent, 'Share my AI chat', 'Partners see your prompts, the replies and which files it touches. You can pause it inside any
|
|
731
|
+
${toggle('shareAgent', p.shareAgent, 'Share my AI chat', 'Partners see your prompts, the replies and which files it touches. You can pause it inside any codebase.')}
|
|
706
732
|
${toggle('summarize', p.summarize, 'Summarize my chats', 'Your prompts and your AI’s replies are shortened to a sentence or two on this computer before they’re shared. Uses your claude CLI (a few Haiku tokens each); if it isn’t available, the text is just shortened.')}
|
|
707
733
|
<div class="sec-actions"><span></span><button class="btn primary" type="submit">Save</button></div>
|
|
708
734
|
</div>
|
|
@@ -717,7 +743,7 @@ function settingsHtml (session = null) {
|
|
|
717
743
|
<div id="agents-invite"><p class="error" id="agents-error"></p></div>
|
|
718
744
|
<div id="agents-list"><p class="hint">${loadingNote()}</p></div>
|
|
719
745
|
<div class="ag-pages" id="agents-pages" hidden></div>
|
|
720
|
-
<div class="sec-actions"><span class="hint">${state.workspacesOn ? 'Open one for where it has been, where it works, whether it joins new
|
|
746
|
+
<div class="sec-actions"><span class="hint">${state.workspacesOn ? 'Open one for where it has been, where it works, whether it joins new codebases, and its keys.' : 'An invite is pasted into the AI once; from then on it joins any codebase you send it. Open one for where it has been and its keys.'} Revoke agents on <a href="https://heyquilt.com/dashboard/agents" target="_blank" rel="noopener">heyquilt.com</a>.</span><button class="btn sm" type="button" data-view="agents">Open Agents</button></div>
|
|
721
747
|
</div>
|
|
722
748
|
</section>` : ''}
|
|
723
749
|
|
|
@@ -743,7 +769,7 @@ function settingsHtml (session = null) {
|
|
|
743
769
|
<select class="input" id="s-tool" name="tool">${state.defaults.tools.map((t) => `<option ${t === p.tool ? 'selected' : ''}>${esc(t)}</option>`).join('')}</select>
|
|
744
770
|
<span class="hint">Shown next to your name, and used to find your AI chat so partners can follow along.</span>
|
|
745
771
|
</div>
|
|
746
|
-
<div class="sec-actions"><span class="hint">New
|
|
772
|
+
<div class="sec-actions"><span class="hint">New codebases use this. Rejoin an open codebase to update it there.</span><button class="btn primary" type="submit">Save profile</button></div>
|
|
747
773
|
</div>
|
|
748
774
|
</form>` : ''}
|
|
749
775
|
|
|
@@ -758,7 +784,7 @@ function settingsHtml (session = null) {
|
|
|
758
784
|
</section>` : ''}
|
|
759
785
|
|
|
760
786
|
${show('sounds') ? `<section class="card settings-sec" id="sounds-sec">
|
|
761
|
-
<div class="sec-intro"><h2>Sounds</h2><p>A short chime when something needs you, in any open
|
|
787
|
+
<div class="sec-intro"><h2>Sounds</h2><p>A short chime when something needs you, in any open codebase.</p></div>
|
|
762
788
|
<div class="sec-body">
|
|
763
789
|
${SOUND_EVENTS.map((ev) => `<div class="row sound-row">${toggle(ev.setting, p[ev.setting] !== false, ev.label, ev.hint)}
|
|
764
790
|
<button type="button" class="btn sm ghost" data-sound-test="${ev.kind}" title="Play this sound" aria-label="Play the ${esc(ev.label.toLowerCase())} sound">Play</button></div>`).join('')}
|
|
@@ -767,13 +793,13 @@ function settingsHtml (session = null) {
|
|
|
767
793
|
</section>` : ''}
|
|
768
794
|
|
|
769
795
|
${show('sessions') ? `<form class="card settings-sec" id="sessions-sec" autocomplete="off">
|
|
770
|
-
<div class="sec-intro"><h2>Account defaults for starting and joining</h2><p>Your defaults for the
|
|
796
|
+
<div class="sec-intro"><h2>Account defaults for starting and joining</h2><p>Your defaults for the codebases you create and join from now on.</p></div>
|
|
771
797
|
<div class="sec-body">
|
|
772
798
|
<div class="field">
|
|
773
|
-
<label for="s-joindir">Account default folder for
|
|
799
|
+
<label for="s-joindir">Account default folder for codebases you join</label>
|
|
774
800
|
<div class="row"><input class="input grow" id="s-joindir" name="joinDir" value="${esc(p.joinDir)}">
|
|
775
801
|
<button type="button" class="btn icon" data-browse-settings="s-joindir" title="Browse" aria-label="Browse">${I.folder}</button></div>
|
|
776
|
-
<span class="hint">Each
|
|
802
|
+
<span class="hint">Each codebase gets its own folder in here.</span>
|
|
777
803
|
</div>
|
|
778
804
|
${toggle('preferLocal', p.preferLocal, 'Keep my files when joining a folder that has some', 'When off, their versions of the same files win.')}
|
|
779
805
|
${toggle('report', p.report, 'Send problem reports to Quilt', 'The app tells Quilt which actions you take (not what you read), whether they worked and how long they took, with the error message when something fails, your app version and OS. Never your files, your chats or your links.')}
|
|
@@ -797,7 +823,7 @@ function settingsHtml (session = null) {
|
|
|
797
823
|
<div class="kv"><span>Identity key</span><code>~/.quilt/identity.json</code><span class="hint">Proves your name is yours. Copy it to another computer to keep your name there.</span></div>
|
|
798
824
|
<div class="kv"><span>Sign-in</span><code>~/.quilt/account.json</code><span class="hint">This computer's sign-in. Only you can read it.</span></div>
|
|
799
825
|
<div class="kv"><span>Settings</span><code>~/.quilt/settings.json</code></div>
|
|
800
|
-
<div class="sec-actions"><span class="hint">
|
|
826
|
+
<div class="sec-actions"><span class="hint">Closes every codebase and this app. Your files stay put.</span><button class="btn" type="button" data-shutdown>${I.power}<span>Shut down Quilt</span></button></div>
|
|
801
827
|
</div>
|
|
802
828
|
</section>` : ''}`
|
|
803
829
|
}
|
|
@@ -910,6 +936,8 @@ function bindAgents (root) {
|
|
|
910
936
|
|
|
911
937
|
/** Wires the settings cards inside `root`; `refresh()` redraws them after a save. */
|
|
912
938
|
function bindSettings (root, refresh) {
|
|
939
|
+
// Projects: Open goes to the project's page (the pop-up closes; the old shell's sidebar binds its own).
|
|
940
|
+
if (state.workspacesOn) root.querySelectorAll('#workspaces-sec [data-view]').forEach((b) => { b.onclick = () => { $('#settings-back')?.remove(); go(b.dataset.view) } })
|
|
913
941
|
// Tabs: the pick is kept on this computer, and the cards are drawn again.
|
|
914
942
|
root.querySelector('.settings-tabs')?.addEventListener('click', (e) => {
|
|
915
943
|
const b = e.target.closest('[data-settings-tab]')
|
|
@@ -996,7 +1024,7 @@ function bindSettings (root, refresh) {
|
|
|
996
1024
|
|
|
997
1025
|
const signOut = $('#sign-out', root)
|
|
998
1026
|
if (signOut) signOut.onclick = async () => {
|
|
999
|
-
if (!await ask({ title: 'Sign out of Quilt?', message: 'This
|
|
1027
|
+
if (!await ask({ title: 'Sign out of Quilt?', message: 'This closes your codebases on this computer. Your files stay where they are.', ok: 'Sign out', danger: true })) return
|
|
1000
1028
|
try {
|
|
1001
1029
|
await api('POST', '/api/account/signout')
|
|
1002
1030
|
signedOutNow()
|
|
@@ -1024,8 +1052,8 @@ export function openSettings (opts = {}) {
|
|
|
1024
1052
|
back.innerHTML = `
|
|
1025
1053
|
<div class="settings-modal" role="dialog" aria-modal="true" aria-labelledby="settings-title">
|
|
1026
1054
|
<nav class="ss-nav settings-nav" aria-label="Account settings">
|
|
1027
|
-
<h3 id="settings-title"
|
|
1028
|
-
<p class="lead settings-scope" data-settings-scope="account"
|
|
1055
|
+
<h3 id="settings-title">${state.workspacesOn ? 'Settings' : 'Account settings'}</h3>
|
|
1056
|
+
<p class="lead settings-scope" data-settings-scope="account">${state.workspacesOn ? 'You, and what every project of yours gets.' : 'Your defaults for new codebases. A codebase that is already open keeps its own, in its Codebase settings.'}</p>
|
|
1029
1057
|
<div class="settings-tabs-slot"></div>
|
|
1030
1058
|
</nav>
|
|
1031
1059
|
<div class="ss-main">
|
|
@@ -1044,7 +1072,7 @@ export function openSettings (opts = {}) {
|
|
|
1044
1072
|
const draw = () => {
|
|
1045
1073
|
const tab = settingsTab()
|
|
1046
1074
|
// Setting up your cloud AI takes the whole right side: its own header, steps and footer.
|
|
1047
|
-
const flow = tab ===
|
|
1075
|
+
const flow = tab === aiTab() && cloudSetupOn() ? cloudSetupHtml() : null
|
|
1048
1076
|
// The same tab (or step of the setup) keeps where it was scrolled to; another starts at the top.
|
|
1049
1077
|
const key = flow ? `setup:${cloudSetupStep()}` : tab
|
|
1050
1078
|
const scroll = key === shown ? body.scrollTop : 0
|
package/src/ui/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="stylesheet" href="/loom.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
|
-
<div id="app"></div>
|
|
12
|
+
<div id="frame"><nav class="prail" id="prail" aria-label="Projects" hidden></nav><div id="app"></div></div>
|
|
13
13
|
<div id="toast" role="status" aria-live="polite"></div>
|
|
14
14
|
<script type="module" src="/app.js"></script>
|
|
15
15
|
</body>
|
package/src/ui/invite.js
CHANGED
|
@@ -11,7 +11,7 @@ export const MISSING_SECRET = 'This link is missing part of it. Ask for a new in
|
|
|
11
11
|
export const INVALID_INVITE = 'That invite link is not valid. Copy the whole link they sent.'
|
|
12
12
|
// Back in a session by your account on a computer that never had its link: the relay hands it over
|
|
13
13
|
// once someone who has it has opened the session since.
|
|
14
|
-
export const NO_LINK_YET = "This
|
|
14
|
+
export const NO_LINK_YET = "This codebase's invite link isn't on this computer yet. It arrives once someone who has it opens the codebase."
|
|
15
15
|
|
|
16
16
|
/** A session's name as a folder name (one plain path segment), or '' when nothing of it is left. */
|
|
17
17
|
export function joinFolderName (name) {
|
|
@@ -84,23 +84,23 @@ export function parseInvite (code, { allowRelay = () => false } = {}) {
|
|
|
84
84
|
export function agentPaste ({ link, session, invitedToSessions = false } = {}) {
|
|
85
85
|
let apiUrl
|
|
86
86
|
try { apiUrl = new URL(link).origin } catch {}
|
|
87
|
-
const sessionLink = session || '<
|
|
87
|
+
const sessionLink = session || '<codebase invite link>'
|
|
88
88
|
return [
|
|
89
|
-
'Join Quilt as my AI agent. Quilt is a live
|
|
89
|
+
'Join Quilt as my AI agent. A Quilt codebase is a live folder that people and AI agents work in together. Three steps: register and connect, choose how Quilt wakes you, then work.',
|
|
90
90
|
'',
|
|
91
91
|
CLI_FIRST,
|
|
92
92
|
'',
|
|
93
93
|
`Step 1 of 3: register with this invite and connect. The invite works one time, within an hour: ${link}`,
|
|
94
|
-
`- With the CLI (whenever you can run commands): ${INSTALL_CLI} Then run \`quilt agent join ${link} --name <your name>\` (pick a short name), and in the
|
|
94
|
+
`- With the CLI (whenever you can run commands): ${INSTALL_CLI} Then run \`quilt agent join ${link} --name <your name>\` (pick a short name), and in the codebase's folder start \`quilt join ${sessionLink} --agent <your name>\` and keep it running (see below).`,
|
|
95
95
|
`- In a sandbox wiped after every turn: ${SANDBOX_CLI}`,
|
|
96
|
-
`- Only if you have no computer and can do nothing but make HTTP requests: open ${link} and follow it to join over HTTP (register, then connect to the MCP server it names and call quilt_join_session with ${session ? 'my
|
|
96
|
+
`- Only if you have no computer and can do nothing but make HTTP requests: open ${link} and follow it to join over HTTP (register, then connect to the MCP server it names and call quilt_join_session with ${session ? 'my codebase invite link' : 'the codebase invite link I send you'}).`,
|
|
97
97
|
'- If you joined Quilt before, give the agent id Quilt gave you then (CLI: `--agent-id <your agent id>`; over HTTP: "agentId"), so you come back as the same agent instead of a new one. Not joined before, or lost it? Leave it out.',
|
|
98
98
|
'- Quilt answers with your agent id. Save it where you will still have it later (your memory, notes or config): it is public, not a secret, and it is how you come back as yourself.',
|
|
99
|
-
session ? `- My
|
|
99
|
+
session ? `- My codebase invite link: ${session}. I may have to let you in first.` : '- I will send you a codebase invite link (https://join.heyquilt.com/...).',
|
|
100
100
|
'',
|
|
101
|
-
`Step 2 of 3: choose how Quilt wakes you, so my @mentions, direct messages and tasks reach you without anyone checking on you. Call quilt_wake (CLI: \`quilt wake\`): it lists the ways that fit you (a webhook, email, a command on your computer, waiting, MCP push, a schedule, or your turns), and quilt_wake with method sets one up.${invitedToSessions ? ' You are invited to each new
|
|
101
|
+
`Step 2 of 3: choose how Quilt wakes you, so my @mentions, direct messages and tasks reach you without anyone checking on you. Call quilt_wake (CLI: \`quilt wake\`): it lists the ways that fit you (a webhook, email, a command on your computer, waiting, MCP push, a schedule, or your turns), and quilt_wake with method sets one up.${invitedToSessions ? ' You are invited to each new codebase in my projects too: a webhook (quilt_wake method webhook, or quilt_workspace_webhook) also gets `session.started` with each new codebase\'s invite link; join it as in step 1, and wait until I let you in.' : ''}`,
|
|
102
102
|
'',
|
|
103
|
-
'Step 3 of 3: work. Read the
|
|
103
|
+
'Step 3 of 3: work. Read the codebase\'s rules (quilt_project_rules), see who is doing what (quilt_status) and what waits for you (quilt_inbox, quilt_tasks), then follow the guide below.',
|
|
104
104
|
'',
|
|
105
105
|
agentGuide({ apiUrl })
|
|
106
106
|
].join('\n')
|
package/src/ui/invites.js
CHANGED
|
@@ -7,7 +7,7 @@ const sessionAccess = (i) => (i.access ? ` · ${esc(i.access)}` : '')
|
|
|
7
7
|
function rowHtml (i) {
|
|
8
8
|
const from = i.from?.name || 'Someone'
|
|
9
9
|
if (i.kind === 'workspace') {
|
|
10
|
-
const where = `the <b>${esc(i.workspace.name)}</b>
|
|
10
|
+
const where = `the <b>${esc(i.workspace.name)}</b> project${i.workspace.org ? ` in ${esc(i.workspace.org)}` : ''}`
|
|
11
11
|
return `
|
|
12
12
|
<div class="session-row invite-row">
|
|
13
13
|
${avatar(from, null)}
|
|
@@ -20,8 +20,8 @@ function rowHtml (i) {
|
|
|
20
20
|
return `
|
|
21
21
|
<div class="session-row invite-row">
|
|
22
22
|
${avatar(from, null)}
|
|
23
|
-
<div class="meta"><div class="name"><span><b>${esc(from)}</b> invited you to the
|
|
24
|
-
<div class="sub">${i.link ? '
|
|
23
|
+
<div class="meta"><div class="name"><span><b>${esc(from)}</b> invited you to the codebase <b>${esc(i.session.name)}</b></span></div>
|
|
24
|
+
<div class="sub">${i.link ? 'Codebase' : 'Open the link in the email they sent to join'}${sessionAccess(i)}</div></div>
|
|
25
25
|
<div class="facts"></div>
|
|
26
26
|
<div class="acts"><button class="btn sm ghost" data-invite-decline="${esc(i.id)}">Decline</button>${i.link ? `<button class="btn sm primary" data-invite-join="${esc(i.id)}">Join</button>` : ''}</div>
|
|
27
27
|
</div>`
|