heyquilt 0.3.182 → 0.3.184
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 +14 -0
- package/bin/quilt.js +32 -32
- package/desktop/main.js +1 -1
- package/package.json +1 -1
- package/src/account.js +17 -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/memory-store.js +22 -1
- 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 +66 -25
- 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-chat.js +77 -0
- 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 +5 -4
- package/src/api/supabase-store.js +25 -1
- 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 +11 -11
- 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/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 +6 -6
- 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/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 +50 -50
- 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 +345 -0
- package/src/ui/app.js +28 -13
- 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 +48 -8
- 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 +97 -47
- 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 +3 -3
- 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-channel.js +93 -0
- package/src/ui/project-model.js +224 -0
- package/src/ui/project-pop.js +451 -0
- package/src/ui/projects.js +464 -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 +174 -47
- 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 +88 -27
- 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/session.js
CHANGED
|
@@ -22,11 +22,13 @@ import { fileCardHref, renderable, textHtml, mentionAt, mentionCandidates, compl
|
|
|
22
22
|
import { toolLogo } from './tool-logo.js'
|
|
23
23
|
import { renderBoard, taskNotesModalHtml, openTaskMenu, foldPlan, matchesSearch } from './board.js'
|
|
24
24
|
import { accessFormValues, accessSaveBody, grantsLoading, grantsLoaded, grantsFailed } from './access-form.js'
|
|
25
|
-
import { workspaceFilePicker } from './files.js'
|
|
25
|
+
import { workspaceFilePicker, artifactsHtml, bindAllFiles } from './files.js'
|
|
26
26
|
import { sessionAgentsHtml } from './agent-place.js'
|
|
27
27
|
import { renderCatchUp, bindCatchUp } from './catchup.js'
|
|
28
28
|
import { heldCard } from './session-words.js'
|
|
29
|
-
import { callButtonMarkup, callPinMarkup, screenStageMarkup, mountCall, unmountCall, renderCall, callCards } from './voice.js'
|
|
29
|
+
import { callButtonMarkup, callPinMarkup, screenStageMarkup, mountCall, unmountCall, renderCall, callCards, inCallHere } from './voice.js'
|
|
30
|
+
import { codeSideHtml, codeCrumbHtml, sideShut, toggleSideShut, toggleFolded } from './projects.js'
|
|
31
|
+
import { dmThreads } from './project-model.js'
|
|
30
32
|
|
|
31
33
|
let current = null // session id being shown
|
|
32
34
|
let timers = []
|
|
@@ -105,6 +107,8 @@ function personInfo (name) {
|
|
|
105
107
|
// ------------------------------------------------------------------ mount --
|
|
106
108
|
export function mountSession (id) {
|
|
107
109
|
current = id
|
|
110
|
+
// Opened from a channel or a direct message in the project's sidebar: on its chat.
|
|
111
|
+
if (state.openChat === id) { ws(id).side = 'chat'; state.openChat = null }
|
|
108
112
|
pendingAssign = null
|
|
109
113
|
resetLoom()
|
|
110
114
|
boardQuery = '' // a search is for the board it was typed on
|
|
@@ -115,32 +119,33 @@ export function mountSession (id) {
|
|
|
115
119
|
const firstVisit = !state.trees.has(id)
|
|
116
120
|
|
|
117
121
|
$('#app').innerHTML = `
|
|
118
|
-
<div class="ws" id="ws">
|
|
122
|
+
<div class="ws${pj() ? ' pj-cb' : ''}" id="ws"${pj() && sideShut() ? ' data-side="shut"' : ''}>
|
|
119
123
|
<header class="ws-top">
|
|
120
124
|
<button class="brand" data-go="home" aria-label="Home">${quiltMark({ sew: 'first' })}</button>
|
|
125
|
+
${pj() ? `<span id="code-crumb" class="code-crumb"></span>` : ''}
|
|
121
126
|
<div class="overflow sess" id="sess">
|
|
122
127
|
<button class="sess-btn" id="sess-btn" type="button" aria-haspopup="true" aria-expanded="false" aria-controls="sess-menu"><span class="sess-dot" id="sess-dot"></span><span class="sess-name" id="sess-name"></span><span class="badge" id="sess-badge" hidden></span>${I.chevDown}</button>
|
|
123
|
-
<div class="popover more-menu sess-menu" id="sess-menu" role="menu" aria-label="This
|
|
128
|
+
<div class="popover more-menu sess-menu" id="sess-menu" role="menu" aria-label="This codebase" hidden>
|
|
124
129
|
<div id="tabs" class="sess-tabs"></div>
|
|
125
|
-
<button class="pop-item" role="menuitem" id="rename-btn" hidden>Rename
|
|
126
|
-
<button class="pop-item" role="menuitem" id="move-ws-btn" hidden>Move to a
|
|
127
|
-
<button class="pop-item" role="menuitem" data-session-settings>
|
|
130
|
+
<button class="pop-item" role="menuitem" id="rename-btn" hidden>Rename codebase…</button>
|
|
131
|
+
<button class="pop-item" role="menuitem" id="move-ws-btn" hidden>Move to a project…</button>
|
|
132
|
+
<button class="pop-item" role="menuitem" data-session-settings>Codebase settings…</button>
|
|
128
133
|
<button class="pop-item" role="menuitem" data-gather-rules>One set of AI rules…</button>
|
|
129
134
|
<div class="pop-sep"></div>
|
|
130
|
-
<button class="pop-item" role="menuitem" id="leave-btn">Leave this
|
|
135
|
+
<button class="pop-item" role="menuitem" id="leave-btn">Leave this codebase</button>
|
|
131
136
|
</div>
|
|
132
137
|
</div>
|
|
133
138
|
<span class="spacer"></span>
|
|
134
139
|
<span class="relay-problem" id="relay-problem" role="status" hidden></span>
|
|
135
140
|
<span class="access-pill" id="access-pill" hidden></span>
|
|
136
141
|
<button class="btn sm ghost icon narrow-only" id="toggle-tree" title="People: who is working on what" aria-label="Show people">${I.users}</button>
|
|
137
|
-
<button class="btn sm ghost conn-btn" id="connections-btn" type="button" title="Apps agents in this
|
|
142
|
+
<button class="btn sm ghost conn-btn" id="connections-btn" type="button" title="Apps agents in this codebase can use" ${state.connectionsOn ? '' : 'hidden'}>${I.plug}<span class="wide-only">Connections</span></button>
|
|
138
143
|
<div class="people" id="people">
|
|
139
144
|
<div class="people-pill">
|
|
140
145
|
<button class="people-btn" id="people-btn" aria-haspopup="true" aria-expanded="false" aria-controls="people-menu"></button>
|
|
141
146
|
<button class="people-inv" id="invite-btn" type="button" title="Invite people" aria-label="Invite people">${I.plus}<span class="wide-only">Invite</span></button>
|
|
142
147
|
</div>
|
|
143
|
-
<div class="popover people-menu" id="people-menu" role="dialog" aria-label="People in this
|
|
148
|
+
<div class="popover people-menu" id="people-menu" role="dialog" aria-label="People in this codebase" hidden></div>
|
|
144
149
|
</div>
|
|
145
150
|
<div class="git-wrap" id="git-wrap">
|
|
146
151
|
<button type="button" class="git-chip quiet" id="git-chip" aria-haspopup="true" aria-expanded="false" aria-controls="git-panel"><span class="git-ico" aria-hidden="true">${I.branch}</span><span class="git-chg" id="git-chg" hidden>${I.diff}<span class="chg-count" id="chg-count"></span></span><span class="git-say" id="git-say" hidden></span><span class="sd" id="git-dot" hidden></span></button>
|
|
@@ -156,14 +161,15 @@ export function mountSession (id) {
|
|
|
156
161
|
<div class="popover more-menu you-menu" id="you-menu" role="menu" hidden>
|
|
157
162
|
<div class="you-who" id="you-who"></div>
|
|
158
163
|
<div class="pop-sep"></div>
|
|
159
|
-
<button class="pop-item" role="menuitem" data-session-settings title="Applies to this
|
|
160
|
-
<button class="pop-item" role="menuitem" id="settings-btn" title="Your defaults for new
|
|
164
|
+
<button class="pop-item" role="menuitem" data-session-settings title="Applies to this codebase only">${I.branch}Codebase settings…</button>
|
|
165
|
+
<button class="pop-item" role="menuitem" id="settings-btn" title="Your defaults for new codebases">${I.gear}Account settings…</button>
|
|
161
166
|
${window.quiltDesktop?.dev ? `<button class="pop-item" role="menuitem" data-dev-restart>${I.refresh}Restart (dev)</button>` : ''}
|
|
162
167
|
<button class="pop-item" role="menuitem" data-shutdown>${I.power}Shut down Quilt</button>
|
|
163
168
|
</div>
|
|
164
169
|
</div>
|
|
165
170
|
</header>
|
|
166
171
|
<div class="ws-body" id="ws-body">
|
|
172
|
+
${pj() ? '<aside class="pj-side pj-side-code" id="code-side" aria-label="This codebase"></aside>' : ''}
|
|
167
173
|
<aside class="ws-tree ws-people" aria-label="People: who is working on what">
|
|
168
174
|
<div class="pane-head">
|
|
169
175
|
<button type="button" class="tree-collapse wide-tree" id="collapse-tree" title="Collapse people" aria-label="Collapse people" aria-expanded="true" aria-controls="people-side">${I.arrowLeft}</button>
|
|
@@ -181,6 +187,7 @@ export function mountSession (id) {
|
|
|
181
187
|
<div class="ws-tabs" id="main-tabs" role="tablist"></div>
|
|
182
188
|
</div>
|
|
183
189
|
<div class="ws-content" id="main"></div>
|
|
190
|
+
${pj() ? '<div class="pj-pmain" id="code-extra" hidden></div>' : ''}
|
|
184
191
|
${screenStageMarkup()}
|
|
185
192
|
</main>
|
|
186
193
|
<aside class="ws-chat" id="chat-pane" aria-label="Chat">
|
|
@@ -197,7 +204,7 @@ export function mountSession (id) {
|
|
|
197
204
|
<div class="mention-menu" id="mention-menu" role="listbox" aria-label="Mention someone" hidden></div>
|
|
198
205
|
<div class="box">
|
|
199
206
|
<button type="button" class="btn ghost icon" id="attach-btn" title="Send a file" aria-label="Send a file">${I.clip}</button>
|
|
200
|
-
${sum()?.workspace ? `<button type="button" class="btn ghost icon" data-attach-workspace title="Attach from
|
|
207
|
+
${sum()?.workspace ? `<button type="button" class="btn ghost icon" data-attach-workspace title="Attach an artifact from the project" aria-label="Attach an artifact from the project">${I.folder}</button>` : ''}
|
|
201
208
|
<input type="file" id="file-input" multiple hidden>
|
|
202
209
|
<textarea id="msg-input" rows="1" placeholder="Message everyone…"></textarea>
|
|
203
210
|
<button type="submit" class="btn primary icon" id="send-btn" title="Send" aria-label="Send">${I.send}</button>
|
|
@@ -206,7 +213,7 @@ export function mountSession (id) {
|
|
|
206
213
|
</aside>
|
|
207
214
|
<div class="scrim" id="scrim"></div>
|
|
208
215
|
</div>
|
|
209
|
-
</div>${firstVisit ? `<div class="sv-loading" id="sv-loading">${loadingHtml({ label: 'Loading
|
|
216
|
+
</div>${firstVisit ? `<div class="sv-loading" id="sv-loading">${loadingHtml({ label: 'Loading codebase', name: sum()?.status?.sessionName || basename(sum()?.dir || '') })}</div>` : ''}`
|
|
210
217
|
|
|
211
218
|
bindTop()
|
|
212
219
|
mountCall(id, mounted.signal, () => {
|
|
@@ -218,8 +225,9 @@ export function mountSession (id) {
|
|
|
218
225
|
bindChanges(id, mounted.signal, { onOpen: (path) => openFile(path, { tab: 'changes' }), close: () => setGitOpen(false), onCount: renderGitChip })
|
|
219
226
|
bindCatchUp($('#catchup'), { sessionId: () => current, onOpen: openFile })
|
|
220
227
|
// Report a bug / Suggest a feature at the bottom of the People pane (feedback.js): onto this session's board.
|
|
221
|
-
bindFeedback($('.ws-people'), { session: () => current, where: () => state.sessions.get(current)?.status?.sessionName || 'a
|
|
228
|
+
bindFeedback($('.ws-people'), { session: () => current, where: () => state.sessions.get(current)?.status?.sessionName || 'a codebase' })
|
|
222
229
|
bindMain()
|
|
230
|
+
bindCodeSide()
|
|
223
231
|
bindTreeEvents()
|
|
224
232
|
applyTreeCollapsed()
|
|
225
233
|
applyChatLayout()
|
|
@@ -260,6 +268,7 @@ export function sessionUnmount () {
|
|
|
260
268
|
mounted = null
|
|
261
269
|
pendingAssign = null
|
|
262
270
|
unbindChanges()
|
|
271
|
+
if (codeConns) { codeConns.destroy(); codeConns = null }
|
|
263
272
|
current = null
|
|
264
273
|
}
|
|
265
274
|
|
|
@@ -375,11 +384,112 @@ function bindMenu (btn, menu, onPick) {
|
|
|
375
384
|
document.addEventListener('mousedown', (e) => { if (!btn.parentElement.contains(e.target)) set(false) }, { signal: mounted.signal })
|
|
376
385
|
}
|
|
377
386
|
|
|
387
|
+
// --------------------------------------------- the sidebar, with projects on --
|
|
388
|
+
// A codebase's page wears the same sidebar a project has (projects.js): Loom, Tasks and the rest
|
|
389
|
+
// are rows there, chat is the codebase's channel, and the People column and the chat column go.
|
|
390
|
+
// Loom and Tasks are what the middle already shows (`mode`); `side` is a page drawn over it: the
|
|
391
|
+
// channel ('chat') or Connections. Anything that opens something in the middle clears it.
|
|
392
|
+
const pj = () => !!state.workspacesOn
|
|
393
|
+
const projectHere = () => { const id = sum()?.workspace; return (id && (state.workspaces || []).find((w) => w.id === id)) || null }
|
|
394
|
+
let codeConns = null // the Connections card while its page shows
|
|
395
|
+
|
|
396
|
+
function renderCodeSide () {
|
|
397
|
+
const el = $('#code-side')
|
|
398
|
+
if (!el || !current || !sum()) return
|
|
399
|
+
const w = ws(current)
|
|
400
|
+
const st = sum().status
|
|
401
|
+
const side = w.side || ''
|
|
402
|
+
const page = side || (w.mode === 'tasks' ? 'tasks' : 'loom')
|
|
403
|
+
const open = (st.tasks || []).filter((t) => !t.archived && (t.column === 'todo' || t.column === 'doing')).length
|
|
404
|
+
const people = [st.me, ...peopleHere(st)]
|
|
405
|
+
el.innerHTML = codeSideHtml({ page, name: st.sessionName || basename(sum().dir), project: projectHere(), tasks: open, artifacts: (projectData()?.files || []).filter((f) => f.kind !== 'folder').length, chatNew, people, dms: dmThreads(renderable(state.messages.get(current)), st.me?.name || '').map((t) => ({ ...t, n: dmNew.get(t.name) || 0 })), dmOn: state.to || '', connections: !!state.connectionsOn, canInvite: !!st.access?.owner || st.access?.role !== 'viewer' })
|
|
406
|
+
const root = $('#ws')
|
|
407
|
+
root.dataset.sidePage = side
|
|
408
|
+
$('#code-crumb').innerHTML = codeCrumbHtml(projectHere())
|
|
409
|
+
// The pages drawn over the middle in their own box: Connections, and the project's Artifacts.
|
|
410
|
+
// Drawn when the page changes, not every time the sidebar is: an artifact that is running stays as it is.
|
|
411
|
+
const extra = $('#code-extra')
|
|
412
|
+
const boxed = side === 'connections' || side === 'artifacts' ? side : ''
|
|
413
|
+
if ((extra.dataset.page || '') !== boxed) {
|
|
414
|
+
if (codeConns) { codeConns.destroy(); codeConns = null }
|
|
415
|
+
extra.innerHTML = ''
|
|
416
|
+
extra.dataset.page = boxed
|
|
417
|
+
extra.classList.toggle('pj-files', boxed === 'artifacts')
|
|
418
|
+
if (boxed === 'connections') {
|
|
419
|
+
extra.innerHTML = '<div class="files-head"><div class="t"><h2 class="crumbs">Connections</h2><p class="hint">Apps the agents in this codebase can use: its own, and the ones it gets from above. Agents never see the logins.</p></div></div><div data-code-connections></div>'
|
|
420
|
+
codeConns = mountConnections(extra.querySelector('[data-code-connections]'), { type: 'session', id: st.room })
|
|
421
|
+
}
|
|
422
|
+
if (boxed === 'artifacts') { drawCodeArtifacts(); loadCodeArtifacts() }
|
|
423
|
+
}
|
|
424
|
+
extra.hidden = !boxed
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/** The project's data, when it is the one this codebase is in. */
|
|
428
|
+
const projectData = () => { const p = projectHere(); return p && state.workspace && state.workspace.workspace.id === p.id ? state.workspace : null }
|
|
429
|
+
|
|
430
|
+
/** The project's Artifacts, inside the codebase: the same page a project has (files.js), in this page's box. */
|
|
431
|
+
function drawCodeArtifacts () {
|
|
432
|
+
const extra = $('#code-extra')
|
|
433
|
+
const p = projectHere()
|
|
434
|
+
if (!extra || !p || extra.dataset.page !== 'artifacts') return
|
|
435
|
+
const d = projectData()
|
|
436
|
+
extra.innerHTML = d ? artifactsHtml(d) : `<p class="hint">${loadingNote()}</p>`
|
|
437
|
+
if (d) bindAllFiles(extra, { id: p.id, go, rerender: drawCodeArtifacts, reload: loadCodeArtifacts })
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
async function loadCodeArtifacts () {
|
|
441
|
+
const p = projectHere()
|
|
442
|
+
const id = current
|
|
443
|
+
if (!p) return
|
|
444
|
+
try { state.workspace = await api('GET', `/api/workspaces/${encodeURIComponent(p.id)}`) } catch (err) { toast(err.message) }
|
|
445
|
+
if (current !== id) return
|
|
446
|
+
drawCodeArtifacts()
|
|
447
|
+
renderCodeSide()
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/** Shows one of the sidebar's pages: 'loom', 'tasks', the channel ('chat'), 'connections' or the project's 'artifacts'. */
|
|
451
|
+
function showCodePage (page) {
|
|
452
|
+
const w = ws(current)
|
|
453
|
+
const was = w.side || ''
|
|
454
|
+
if (page === 'tasks') { w.mode = 'tasks'; w.side = '' } else if (page === 'loom') { if (w.mode === 'tasks') w.mode = w.aiSel ? 'ai' : w.fileSel ? 'files' : 'ai'; w.side = '' } else w.side = page
|
|
455
|
+
if (was === 'chat' || w.side === 'chat') chatSeenTs = Date.now() // read up to here, coming or going
|
|
456
|
+
saveWs(current)
|
|
457
|
+
renderMainBar()
|
|
458
|
+
renderMain()
|
|
459
|
+
renderTop()
|
|
460
|
+
applyChatLayout()
|
|
461
|
+
if (w.side === 'chat') { renderMessages(false, true); $('#msg-input')?.focus({ preventScroll: true }) }
|
|
462
|
+
if (page === 'tasks') $('#task-add')?.focus()
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
function bindCodeSide () {
|
|
466
|
+
const el = $('#code-side')
|
|
467
|
+
if (!el) return
|
|
468
|
+
el.addEventListener('click', (e) => {
|
|
469
|
+
const b = e.target.closest('button')
|
|
470
|
+
if (!b || !el.contains(b)) return
|
|
471
|
+
// The channel is for everyone; a direct message's row is that person alone.
|
|
472
|
+
if (b.dataset.dm !== undefined) { state.to = b.dataset.dm; showCodePage('chat'); renderRecipients(); updatePlaceholder(); return renderCodeSide() }
|
|
473
|
+
if (b.dataset.codePage) return showCodePage(b.dataset.codePage)
|
|
474
|
+
if (b.dataset.fold) { toggleFolded(b.dataset.fold); return renderCodeSide() }
|
|
475
|
+
if (b.dataset.go) return go(b.dataset.go)
|
|
476
|
+
if (b.hasAttribute('data-code-team')) { e.stopPropagation(); return $('#people-btn').click() }
|
|
477
|
+
if (b.hasAttribute('data-code-invite')) return openInvite(current)
|
|
478
|
+
}, { signal: mounted.signal })
|
|
479
|
+
$('#code-crumb').addEventListener('click', (e) => {
|
|
480
|
+
const b = e.target.closest('button')
|
|
481
|
+
if (!b) return
|
|
482
|
+
if (b.dataset.go) return go(b.dataset.go)
|
|
483
|
+
if (b.id === 'pj-side-btn') { toggleSideShut(); $('#ws').dataset.side = sideShut() ? 'shut' : 'open'; renderCodeSide() }
|
|
484
|
+
}, { signal: mounted.signal })
|
|
485
|
+
}
|
|
486
|
+
|
|
378
487
|
function bindTop () {
|
|
379
488
|
$('#tasks-btn').onclick = () => {
|
|
380
489
|
const w = ws(current)
|
|
381
490
|
if (w.mode === 'tasks') w.mode = w.aiSel ? 'ai' : w.fileSel ? 'files' : 'ai'
|
|
382
491
|
else w.mode = 'tasks'
|
|
492
|
+
w.side = ''
|
|
383
493
|
saveWs(current)
|
|
384
494
|
renderMainBar()
|
|
385
495
|
renderMain()
|
|
@@ -392,7 +502,7 @@ function bindTop () {
|
|
|
392
502
|
$('#move-ws-btn').onclick = moveToWorkspace
|
|
393
503
|
bindCommitChip()
|
|
394
504
|
$('#leave-btn').onclick = async () => {
|
|
395
|
-
if (!await ask({ title: 'Leave this
|
|
505
|
+
if (!await ask({ title: 'Leave this codebase?', message: 'Quilt stops syncing this folder. Your files stay where they are, and you can rejoin later.', ok: 'Leave', danger: true })) return
|
|
396
506
|
await api('POST', `/api/sessions/${current}/stop`).catch((err) => toast(err.message))
|
|
397
507
|
}
|
|
398
508
|
// Settings (for every session) from in here: its Version control section starts with this session's git
|
|
@@ -470,7 +580,7 @@ function bindSessionSettings (root) {
|
|
|
470
580
|
const admitBy = e.target.value
|
|
471
581
|
try {
|
|
472
582
|
await api('POST', `/api/sessions/${current}/admit-by`, { admitBy })
|
|
473
|
-
toast(admitBy === 'owner' ? 'Only you can let people in' : admitBy === 'editors' ? 'Anyone who can edit may let people in' : 'Anyone in the
|
|
583
|
+
toast(admitBy === 'owner' ? 'Only you can let people in' : admitBy === 'editors' ? 'Anyone who can edit may let people in' : 'Anyone in the codebase may let people in')
|
|
474
584
|
} catch (err) { toast(err.message); refreshPeople({ force: true }) }
|
|
475
585
|
return
|
|
476
586
|
}
|
|
@@ -526,14 +636,14 @@ function bindSessionSettings (root) {
|
|
|
526
636
|
b.disabled = true
|
|
527
637
|
try {
|
|
528
638
|
const r = await api('POST', `/api/sessions/${current}/agents/${invite ? 'include' : 'exclude'}`, { agentId: b.dataset.agentInvite || b.dataset.agentUninvite })
|
|
529
|
-
toast(!invite ? 'Not invited to this
|
|
639
|
+
toast(!invite ? 'Not invited to this codebase' : r.notified ? 'Invited: it was sent this codebase\'s link' : 'Invited. It has no webhook, so send it this codebase\'s link')
|
|
530
640
|
} catch (err) { toast(err.message); b.disabled = false }
|
|
531
641
|
loadSessionAgents()
|
|
532
642
|
})
|
|
533
643
|
root.addEventListener('click', async (e) => {
|
|
534
644
|
if (e.target.closest('[data-end-session]')) {
|
|
535
|
-
if (!await ask({ title: 'End this
|
|
536
|
-
try { await api('POST', `/api/sessions/${current}/end`); toast('
|
|
645
|
+
if (!await ask({ title: 'End this codebase for everyone?', message: 'Everyone is disconnected, and the codebase and its stored files are deleted from the relay. Your own folder is not touched.', ok: 'End codebase', danger: true })) return
|
|
646
|
+
try { await api('POST', `/api/sessions/${current}/end`); toast('Codebase ended') } catch (err) { toast(err.message) }
|
|
537
647
|
return
|
|
538
648
|
}
|
|
539
649
|
})
|
|
@@ -601,7 +711,7 @@ function renderTop () {
|
|
|
601
711
|
const shown = people.slice(0, 4)
|
|
602
712
|
$('#people-btn').innerHTML = `<span class="stack">${shown.map((p, i) => `<span style="z-index:${10 - i}">${avatar(p.name, p.color)}</span>`).join('')}</span>
|
|
603
713
|
<span class="count">${people.length}</span>`
|
|
604
|
-
$('#people-btn').setAttribute('aria-label', `${people.length} ${people.length === 1 ? 'person' : 'people'} in this
|
|
714
|
+
$('#people-btn').setAttribute('aria-label', `${people.length} ${people.length === 1 ? 'person' : 'people'} in this codebase${st.connected ? '' : ', reconnecting'}`)
|
|
605
715
|
// Why we're offline, when we know: otherwise "Reconnecting…" can go on silently forever.
|
|
606
716
|
const problem = $('#relay-problem')
|
|
607
717
|
if (problem) {
|
|
@@ -657,7 +767,7 @@ function renderGitChip () {
|
|
|
657
767
|
const fresh = unseenChanges()
|
|
658
768
|
$('#chg-count').textContent = n
|
|
659
769
|
$('#git-chg').hidden = !n
|
|
660
|
-
chip.title = [n ? `${n} changed in the
|
|
770
|
+
chip.title = [n ? `${n} changed in the codebase` : '', fresh ? `${fresh} new since you last looked` : '', 'Click for every change.'].filter(Boolean).join('\n')
|
|
661
771
|
chip.setAttribute('aria-label', `Source control${n ? `, ${n} changed` : ''}`)
|
|
662
772
|
}
|
|
663
773
|
|
|
@@ -744,7 +854,7 @@ function bindAccess () {
|
|
|
744
854
|
/** Owner only: renames the session for everyone in it, and on heyquilt.com. */
|
|
745
855
|
async function renameSession () {
|
|
746
856
|
const s = sum()
|
|
747
|
-
const name = await ask({ title: 'Rename this
|
|
857
|
+
const name = await ask({ title: 'Rename this codebase', message: 'Everyone in it sees the new name, here and on heyquilt.com.', ok: 'Rename', input: { label: 'Name', value: s.status.sessionName || basename(s.dir) } })
|
|
748
858
|
if (!name) return
|
|
749
859
|
try { await api('POST', `/api/sessions/${current}/rename`, { name }); toast('Renamed') } catch (err) { toast(err.message) }
|
|
750
860
|
}
|
|
@@ -756,22 +866,22 @@ async function renameSession () {
|
|
|
756
866
|
async function moveToWorkspace () {
|
|
757
867
|
const s = sum()
|
|
758
868
|
const options = (state.workspaces || []).filter((w) => w.access === 'edit' && w.id !== s.workspace)
|
|
759
|
-
if (!options.length) return toast(s.workspace ? 'No other
|
|
869
|
+
if (!options.length) return toast(s.workspace ? 'No other project you can edit.' : 'No project you can edit. Make one on Home first.')
|
|
760
870
|
const now = (state.workspaces || []).find((w) => w.id === s.workspace)
|
|
761
871
|
const choice = await ask({
|
|
762
|
-
title: 'Move to a
|
|
763
|
-
message: `${now ? `It is in ${now.name} now. ` : ''}Everyone with access to this
|
|
872
|
+
title: 'Move to a project',
|
|
873
|
+
message: `${now ? `It is in ${now.name} now. ` : ''}Everyone with access to this codebase (people and agents) is added to the project, when you manage it.`,
|
|
764
874
|
input: { select: options.map((w) => ({ value: w.id, label: w.space?.kind === 'org' ? `${w.name} · ${w.space.name}` : w.name })) },
|
|
765
875
|
ok: 'Move'
|
|
766
876
|
})
|
|
767
877
|
if (!choice) return
|
|
768
878
|
try {
|
|
769
879
|
const r = await api('POST', `/api/workspaces/${encodeURIComponent(choice)}/sessions/move`, { session: current })
|
|
770
|
-
const name = options.find((w) => w.id === choice)?.name || 'the
|
|
880
|
+
const name = options.find((w) => w.id === choice)?.name || 'the project'
|
|
771
881
|
s.workspace = choice
|
|
772
882
|
const who = (r.added || []).map((a) => a.name || 'someone')
|
|
773
883
|
toast(r.peopleNeedAdmin
|
|
774
|
-
? `Moved to ${name}. Only its admins can add this
|
|
884
|
+
? `Moved to ${name}. Only its admins can add this codebase's people to it.`
|
|
775
885
|
: who.length ? `Moved to ${name}, with ${who.length <= 3 ? who.join(', ') : `${who.slice(0, 3).join(', ')} and ${who.length - 3} more`}` : `Moved to ${name}`)
|
|
776
886
|
// Workspace counts and members changed: refresh them, and this session's top bar.
|
|
777
887
|
try { const l = await api('GET', '/api/workspaces'); state.workspaces = l.workspaces || state.workspaces } catch {}
|
|
@@ -789,7 +899,7 @@ const isAgentMember = (m) => m.kind === 'agent' || !!m.chat
|
|
|
789
899
|
*/
|
|
790
900
|
function membersHtml (st, kind = 'people') {
|
|
791
901
|
const acc = st.access || {}
|
|
792
|
-
if (!acc.controlled) return kind === 'people' ? '<div class="pm-empty">Anyone with the invite link can join this
|
|
902
|
+
if (!acc.controlled) return kind === 'people' ? '<div class="pm-empty">Anyone with the invite link can join this codebase.</div>' : ''
|
|
793
903
|
const mine = (m) => (kind === 'agents') === isAgentMember(m)
|
|
794
904
|
const list = (st.members || []).filter((m) => m.role !== 'owner' && mine(m))
|
|
795
905
|
if (!acc.owner) {
|
|
@@ -801,7 +911,7 @@ function membersHtml (st, kind = 'people') {
|
|
|
801
911
|
const admitOpts = [
|
|
802
912
|
['owner', 'Only the owner'],
|
|
803
913
|
['editors', 'Anyone who can edit'],
|
|
804
|
-
['members', 'Anyone in the
|
|
914
|
+
['members', 'Anyone in the codebase']
|
|
805
915
|
].map(([v, label]) => `<option value="${v}" ${admitBy === v ? 'selected' : ''}>${label}</option>`).join('')
|
|
806
916
|
const rows = list.map((m) => m.chat ? chatMemberRow(m) : state.accessTypes && ACCOUNT_KEY.test(m.key) ? accessForm(m) : `
|
|
807
917
|
<form class="pm-member edit" data-key="${esc(m.key)}">
|
|
@@ -814,18 +924,18 @@ function membersHtml (st, kind = 'people') {
|
|
|
814
924
|
<button type="button" class="btn sm ghost icon" data-remove title="Remove ${esc(m.name)}" aria-label="Remove ${esc(m.name)}">${I.x}</button>
|
|
815
925
|
</form>`).join('')
|
|
816
926
|
if (kind === 'agents') {
|
|
817
|
-
return `<div class="pm-section"><div class="pm-title">Agents in this
|
|
927
|
+
return `<div class="pm-section"><div class="pm-title">Agents in this codebase</div>
|
|
818
928
|
${rows || '<div class="pm-empty">No agents yet. Invite one with the Invite button: it shows up here once you let it in.</div>'}</div>
|
|
819
929
|
${wsAgents.id === current ? sessionAgentsHtml(wsAgents.agents, st) : ''}`
|
|
820
930
|
}
|
|
821
931
|
return `<div class="pm-section"><div class="pm-title">Who can get in</div>
|
|
822
932
|
<label class="pm-admit"><span>Who can let people in</span>
|
|
823
|
-
<select class="input" name="admitBy" data-admit-by aria-label="Who can let people into this
|
|
933
|
+
<select class="input" name="admitBy" data-admit-by aria-label="Who can let people into this codebase">${admitOpts}</select>
|
|
824
934
|
</label></div>
|
|
825
|
-
<div class="pm-section"><div class="pm-title">People in this
|
|
935
|
+
<div class="pm-section"><div class="pm-title">People in this codebase</div>
|
|
826
936
|
${rows || '<div class="pm-empty">Only you so far. People you let in show up here.</div>'}
|
|
827
937
|
</div>
|
|
828
|
-
<div class="pm-foot"><button type="button" class="btn sm ghost danger" data-end-session>End
|
|
938
|
+
<div class="pm-foot"><button type="button" class="btn sm ghost danger" data-end-session>End codebase for everyone</button></div>`
|
|
829
939
|
}
|
|
830
940
|
|
|
831
941
|
/** With workspaces on, the agents this session's workspace invites (and the ones not invited), for its People. */
|
|
@@ -978,7 +1088,7 @@ function renderPeopleMenu () {
|
|
|
978
1088
|
${otherRows}
|
|
979
1089
|
${awayRows.length ? `<div class="pm-sep"></div><div class="pm-head"><span>Away</span><span class="pm-count">${awayRows.length}</span></div>${awayRows.join('')}` : ''}
|
|
980
1090
|
</div>
|
|
981
|
-
<div class="pm-foot"><button type="button" class="btn sm ghost" data-session-settings>${I.gear}<span>
|
|
1091
|
+
<div class="pm-foot"><button type="button" class="btn sm ghost" data-session-settings>${I.gear}<span>Codebase settings</span></button></div>`
|
|
982
1092
|
if (typing != null) {
|
|
983
1093
|
const el = menu.querySelector('#focus-input')
|
|
984
1094
|
el.focus()
|
|
@@ -1051,7 +1161,7 @@ async function openGatherRules () {
|
|
|
1051
1161
|
body.innerHTML = `${plan.changes.map((c) => `<section class="gr-file"><div class="gr-file-head"><code>${esc(c.path)}</code><span class="hint">${esc(how(c))}</span></div>
|
|
1052
1162
|
<pre class="chg-diff">${diffLines(c.diff)}</pre></section>`).join('')}
|
|
1053
1163
|
${manual}
|
|
1054
|
-
<div class="sec-actions"><span class="hint">Writes these files in the
|
|
1164
|
+
<div class="sec-actions"><span class="hint">Writes these files in the codebase, for everyone. Rules for one person stay in their own tool's settings.</span><button class="btn primary" type="button" data-apply-gr>Gather into AGENTS.md</button></div>`
|
|
1055
1165
|
body.querySelector('[data-apply-gr]').onclick = async (e) => {
|
|
1056
1166
|
e.target.disabled = true
|
|
1057
1167
|
try {
|
|
@@ -1086,9 +1196,9 @@ function openSessionSettings (tab) {
|
|
|
1086
1196
|
const back = document.createElement('div')
|
|
1087
1197
|
back.className = 'modal-back top session-settings-back'
|
|
1088
1198
|
back.innerHTML = `<div class="card modal session-settings" role="dialog" aria-modal="true" aria-labelledby="ss-title">
|
|
1089
|
-
<nav class="ss-nav" aria-label="
|
|
1090
|
-
<h3 id="ss-title">
|
|
1091
|
-
<p class="lead settings-scope" data-settings-scope="session">Applies to this
|
|
1199
|
+
<nav class="ss-nav" aria-label="Codebase settings">
|
|
1200
|
+
<h3 id="ss-title">Codebase settings</h3>
|
|
1201
|
+
<p class="lead settings-scope" data-settings-scope="session">Applies to this codebase only. Your defaults for new codebases are in Account settings.</p>
|
|
1092
1202
|
<div class="ss-tabs" role="tablist" aria-orientation="vertical"></div>
|
|
1093
1203
|
</nav>
|
|
1094
1204
|
<div class="ss-main">
|
|
@@ -1226,6 +1336,7 @@ function openLoom () {
|
|
|
1226
1336
|
const w = ws(current)
|
|
1227
1337
|
w.aiSel = null
|
|
1228
1338
|
w.mode = 'ai'
|
|
1339
|
+
w.side = ''
|
|
1229
1340
|
saveWs(current)
|
|
1230
1341
|
renderMainBar()
|
|
1231
1342
|
renderMain()
|
|
@@ -1238,6 +1349,7 @@ function openPerson (name) {
|
|
|
1238
1349
|
if (!w.aiTabs.includes(name)) w.aiTabs.push(name)
|
|
1239
1350
|
w.aiSel = name
|
|
1240
1351
|
w.mode = 'ai'
|
|
1352
|
+
w.side = ''
|
|
1241
1353
|
saveWs(current)
|
|
1242
1354
|
renderMainBar()
|
|
1243
1355
|
renderMain()
|
|
@@ -1264,6 +1376,7 @@ function openFile (path, { tab } = {}) {
|
|
|
1264
1376
|
if (!w.fileTabs.includes(path)) w.fileTabs.push(path)
|
|
1265
1377
|
w.fileSel = path
|
|
1266
1378
|
w.mode = 'files'
|
|
1379
|
+
w.side = ''
|
|
1267
1380
|
if (!w.fileTab) w.fileTab = {}
|
|
1268
1381
|
if (tab === 'changes') w.fileTab[path] = 'changes'
|
|
1269
1382
|
loadHistory(path)
|
|
@@ -1279,6 +1392,7 @@ function openFile (path, { tab } = {}) {
|
|
|
1279
1392
|
|
|
1280
1393
|
function renderMainBar () {
|
|
1281
1394
|
if (!current || !$('#main-tabs')) return
|
|
1395
|
+
renderCodeSide()
|
|
1282
1396
|
const w = ws(current)
|
|
1283
1397
|
const el = $('#main-tabs')
|
|
1284
1398
|
const aiOn = (name) => w.mode === 'ai' && w.aiSel === name
|
|
@@ -1964,7 +2078,7 @@ function renderMain () {
|
|
|
1964
2078
|
el.innerHTML = `<div class="main-empty">
|
|
1965
2079
|
<div class="ill">${I.lock}</div>
|
|
1966
2080
|
<h3>Waiting to be let in</h3>
|
|
1967
|
-
<p class="hint">The person who
|
|
2081
|
+
<p class="hint">The person who created this codebase needs to approve you. Files will appear here as soon as they do. You can leave this open.</p>
|
|
1968
2082
|
</div>`
|
|
1969
2083
|
return
|
|
1970
2084
|
}
|
|
@@ -1977,7 +2091,7 @@ function renderMain () {
|
|
|
1977
2091
|
el.innerHTML = `<div class="main-empty invite-empty">
|
|
1978
2092
|
<div class="ill">${I.link}</div>
|
|
1979
2093
|
<h3>Invite someone to code with you</h3>
|
|
1980
|
-
<p class="hint">Send a link. Clicking it opens this
|
|
2094
|
+
<p class="hint">Send a link. Clicking it opens this codebase in Quilt${viewInvite ? ', and you approve them before they get in' : ''}. To add an AI, use <b>Invite</b> above.</p>
|
|
1981
2095
|
${viewInvite ? `
|
|
1982
2096
|
<div class="invite-pair">
|
|
1983
2097
|
<div><div class="label">Can edit</div><div class="codebox"><code>${esc(invite)}</code></div><button class="btn primary" data-copy-invite="edit">${I.copy}<span>Copy edit link</span></button></div>
|
|
@@ -2332,8 +2446,12 @@ const CHAT_MIN = 300
|
|
|
2332
2446
|
const CHAT_MAX = 640
|
|
2333
2447
|
const CHAT_SNAP = 220
|
|
2334
2448
|
let chatSeenTs = Date.now() // messages after this count on the folded rail
|
|
2449
|
+
let chatNew = 0 // how many of them there are, for the sidebar's channel row
|
|
2450
|
+
let dmNew = new Map() // and for each direct message's row: who wrote -> how many
|
|
2335
2451
|
|
|
2336
|
-
|
|
2452
|
+
// With the sidebar (projects on), chat is a page from the sidebar, not a column: it counts as folded
|
|
2453
|
+
// whenever it is not the page showing (a call keeps it beside the page).
|
|
2454
|
+
const chatCollapsed = () => pj() && current ? !(ws(current).side === 'chat' || inCallHere(current)) : recall('chat-collapsed', '') === '1'
|
|
2337
2455
|
const chatWidthFor = (body, w) => Math.round(Math.min(Math.max(w, CHAT_MIN), Math.max(CHAT_MIN, Math.min(CHAT_MAX, body.clientWidth - 560))))
|
|
2338
2456
|
|
|
2339
2457
|
function applyChatLayout () {
|
|
@@ -2342,7 +2460,7 @@ function applyChatLayout () {
|
|
|
2342
2460
|
const w = Number(recall('chat-width', '')) || 0
|
|
2343
2461
|
if (w) body.style.setProperty('--chat-open', `${chatWidthFor(body, w)}px`)
|
|
2344
2462
|
const collapsed = chatCollapsed()
|
|
2345
|
-
body.classList.toggle('chat-collapsed', collapsed)
|
|
2463
|
+
body.classList.toggle('chat-collapsed', collapsed && !pj())
|
|
2346
2464
|
const btn = $('#chat-resize')
|
|
2347
2465
|
if (btn) btn.setAttribute('aria-valuenow', String(collapsed ? 0 : w || 380))
|
|
2348
2466
|
renderChatBadge()
|
|
@@ -2361,12 +2479,19 @@ function renderChatBadge () {
|
|
|
2361
2479
|
const rail = $('#chat-rail')
|
|
2362
2480
|
const s = sum()
|
|
2363
2481
|
if (!badge || !rail) return
|
|
2364
|
-
const
|
|
2365
|
-
? renderable(state.messages.get(current)).filter((m) => (m.ts || 0) > chatSeenTs && shownName(m.by, owners(s)) !== s.status.me?.name && !ownAiChatter(m, owners(s)))
|
|
2366
|
-
:
|
|
2482
|
+
const fresh = s && chatCollapsed()
|
|
2483
|
+
? renderable(state.messages.get(current)).filter((m) => (m.ts || 0) > chatSeenTs && shownName(m.by, owners(s)) !== s.status.me?.name && !ownAiChatter(m, owners(s)))
|
|
2484
|
+
: []
|
|
2485
|
+
// With the sidebar, what was written to you alone counts on its own row, the rest on the channel's.
|
|
2486
|
+
const direct = new Map()
|
|
2487
|
+
if (pj()) for (const m of fresh) if (m.to) direct.set(m.by, (direct.get(m.by) || 0) + 1)
|
|
2488
|
+
const n = pj() ? fresh.filter((m) => !m.to).length : fresh.length
|
|
2489
|
+
const dmChanged = JSON.stringify([...direct]) !== JSON.stringify([...dmNew])
|
|
2490
|
+
dmNew = direct
|
|
2367
2491
|
badge.hidden = !n
|
|
2368
2492
|
badge.textContent = n > 99 ? '99+' : String(n)
|
|
2369
2493
|
rail.title = n ? `Open chat · ${n} new message${n === 1 ? '' : 's'}` : 'Open chat'
|
|
2494
|
+
if (n !== chatNew || dmChanged) { chatNew = n; renderCodeSide() }
|
|
2370
2495
|
}
|
|
2371
2496
|
|
|
2372
2497
|
function bindChatPane () {
|
|
@@ -2719,8 +2844,10 @@ function renderMessages (incoming = false, force = false) {
|
|
|
2719
2844
|
const nearBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 80
|
|
2720
2845
|
const who = owners(s)
|
|
2721
2846
|
// A person's AI sessions working things out among themselves isn't shown: only what they say to people.
|
|
2722
|
-
const
|
|
2847
|
+
const every = renderable(state.messages.get(current)).filter((m) => !ownAiChatter(m, who)) // peers can push anything into the room
|
|
2723
2848
|
const name = s.status.me.name
|
|
2849
|
+
// With the sidebar, a direct message's row shows that conversation alone, and the channel what was said to everyone.
|
|
2850
|
+
const list = !pj() ? every : state.to ? every.filter((m) => m.to && ((m.by === state.to && m.to === name) || (m.to === state.to && shownName(m.by, who) === name))) : every.filter((m) => !m.to)
|
|
2724
2851
|
const colors = new Map(s.status.peers.map((p) => [p.name, p.color]))
|
|
2725
2852
|
colors.set(name, s.status.me.color)
|
|
2726
2853
|
const names = mentionNames(s)
|
package/src/ui/tree.js
CHANGED
|
@@ -51,8 +51,8 @@ export function renderTree (el, tree, { me, expanded, selected }) {
|
|
|
51
51
|
const open = expanded[d.path] ?? depth === 0
|
|
52
52
|
// The chat files folder (session.js): each person's own copy of what was sent in chat.
|
|
53
53
|
if (d.path === CHAT_FILES) {
|
|
54
|
-
rows.push(`<div class="t-row t-dir t-chat" role="treeitem" aria-expanded="${open}" tabindex="-1" data-dir="${esc(d.path)}" style="--depth:${depth}" title="Files sent in this
|
|
55
|
-
<span class="t-caret${open ? ' open' : ''}">${I.caret}</span><span class="t-name">${esc(d.name)}</span><span class="t-badge chat">${I.lock}
|
|
54
|
+
rows.push(`<div class="t-row t-dir t-chat" role="treeitem" aria-expanded="${open}" tabindex="-1" data-dir="${esc(d.path)}" style="--depth:${depth}" title="Files sent in this codebase's chat. Only people in the codebase get them; never synced or committed.">
|
|
55
|
+
<span class="t-caret${open ? ' open' : ''}">${I.caret}</span><span class="t-name">${esc(d.name)}</span><span class="t-badge chat">${I.lock}codebase only</span></div>`)
|
|
56
56
|
if (open) walk(d, depth + 1)
|
|
57
57
|
continue
|
|
58
58
|
}
|
|
@@ -107,7 +107,7 @@ export function changeCardHtml (f, { who = (n) => n, colorOf = () => null, kept
|
|
|
107
107
|
</li>`
|
|
108
108
|
const more = by.length - CARD_PEOPLE
|
|
109
109
|
return `<div class="tcard-path">${esc(f.path)}</div>
|
|
110
|
-
<div class="tcard-total"><span class="add">+${f.added}</span> <span class="del">−${f.removed}</span><span class="tcard-in">in this
|
|
110
|
+
<div class="tcard-total"><span class="add">+${f.added}</span> <span class="del">−${f.removed}</span><span class="tcard-in">in this codebase${f.kind === 'created' ? ' · new file' : ''}</span></div>
|
|
111
111
|
${by.length ? `<ul class="tcard-people">${by.slice(0, CARD_PEOPLE).map(person).join('')}${more > 0 ? `<li class="tcard-more">and ${more} more</li>` : ''}</ul>` : ''}
|
|
112
112
|
<div class="tcard-foot">${CARD_FOOT[kept] || 'Click to open'}</div>`
|
|
113
113
|
}
|
package/src/ui/voice.js
CHANGED
|
@@ -37,7 +37,7 @@ const NO_SCREEN = "Quilt can't see your screen. Allow it for Quilt in System Set
|
|
|
37
37
|
const NO_MIC = "Quilt can't use your microphone. Allow it for Quilt in System Settings → Privacy & Security → Microphone, then try again."
|
|
38
38
|
|
|
39
39
|
/** "Call" in the chat's header, shown while no call is going. */
|
|
40
|
-
export const callButtonMarkup = () => `<button type="button" class="chat-call" id="chat-call" data-call-join="ask" title="Start a voice call in this
|
|
40
|
+
export const callButtonMarkup = () => `<button type="button" class="chat-call" id="chat-call" data-call-join="ask" title="Start a voice call in this codebase" hidden>${I.headset}<span>Call</span></button>`
|
|
41
41
|
/** The call going on, pinned above the message box. */
|
|
42
42
|
export const callPinMarkup = () => '<div class="call-pin" id="call-pin" role="region" aria-label="Voice call" hidden></div>'
|
|
43
43
|
/** A shared screen (or what to share), over the middle of the session. */
|
|
@@ -341,7 +341,7 @@ export function renderCall () {
|
|
|
341
341
|
pin.innerHTML = '<div class="cp-top"><span class="call-dot"></span><b>Joining the call…</b></div>'
|
|
342
342
|
} else if (asking && !here) {
|
|
343
343
|
pin.innerHTML = `<div class="cp-top"><span class="call-dot"></span><b>${others.length ? `${esc(names(others.map((p) => p.name)))} ${others.length === 1 ? 'is' : 'are'} in a call` : 'Start a call'}</b><button type="button" class="btn sm ghost cp-end" data-call-cancel>Cancel</button></div>
|
|
344
|
-
<p class="cp-note">This call is transcribed: what you say is written down for everyone in the
|
|
344
|
+
<p class="cp-note">This call is transcribed: what you say is written down for everyone in the codebase, agents included. Audio is never kept.</p>
|
|
345
345
|
<div class="cp-two"><button type="button" class="btn sm primary" data-call-join="transcribed">${others.length ? 'Join' : 'Start'}, transcribed</button><button type="button" class="btn sm" data-call-join="plain">${others.length ? 'Join' : 'Start'}, not transcribed</button></div>`
|
|
346
346
|
} else if (!here) {
|
|
347
347
|
pin.innerHTML = `<div class="cp-top"><span class="call-dot"></span><span class="call-faces">${others.map((p) => face(p.id, p.name, p.color, p.muted)).join('')}${agentFaces}</span>
|
|
@@ -350,13 +350,13 @@ export function renderCall () {
|
|
|
350
350
|
} else {
|
|
351
351
|
const mine = c.transcribing && view.transcribe
|
|
352
352
|
const tag = view.transcribe
|
|
353
|
-
? `<button type="button" class="call-tx${mine ? ' on' : ''}" data-call-options aria-expanded="${options}" title="${mine ? 'What you say is written down for the
|
|
354
|
-
: owner ? `<button type="button" class="call-tx" data-call-options aria-expanded="${options}" title="Transcripts for this
|
|
353
|
+
? `<button type="button" class="call-tx${mine ? ' on' : ''}" data-call-options aria-expanded="${options}" title="${mine ? 'What you say is written down for the codebase' : 'Transcripts are on, but not for you'}"><span class="d"></span>${mine ? 'Transcribing' : 'Not transcribed'}</button>`
|
|
354
|
+
: owner ? `<button type="button" class="call-tx" data-call-options aria-expanded="${options}" title="Transcripts for this codebase's calls"><span class="d"></span>Transcripts off</button>` : ''
|
|
355
355
|
const myChoice = !view.transcribe ? '' : c.transcribing
|
|
356
|
-
? '<div class="cp-opt"><span>What you say is written down for everyone in the
|
|
356
|
+
? '<div class="cp-opt"><span>What you say is written down for everyone in the codebase, agents included.</span><button type="button" class="btn sm" data-call-me="off">Stop transcribing me</button></div>'
|
|
357
357
|
: '<div class="cp-opt"><span>Transcripts are on for this call. What you say is not written down.</span><button type="button" class="btn sm" data-call-me="on">Transcribe me</button></div>'
|
|
358
358
|
const ownerChoice = owner
|
|
359
|
-
? `<div class="cp-opt"><span><b>Transcripts</b> · ${view.transcribe ? 'On: people who agree are written down for the
|
|
359
|
+
? `<div class="cp-opt"><span><b>Transcripts</b> · ${view.transcribe ? 'On: people who agree are written down for the codebase and its agents.' : 'Off: nothing said in calls is written down.'}</span><button type="button" class="btn sm" data-call-owner="${view.transcribe ? 'off' : 'on'}">${view.transcribe ? 'Turn off' : 'Turn on'}</button></div>`
|
|
360
360
|
: ''
|
|
361
361
|
pin.innerHTML = `<div class="cp-top"><span class="call-dot"></span><b>Call</b><span class="call-sub">${esc(dur)}</span>
|
|
362
362
|
<button type="button" class="call-ic cp-end" data-call-share aria-pressed="${c.sharing}" title="${c.sharing ? 'Stop sharing your screen' : 'Share your screen'}" aria-label="${c.sharing ? 'Stop sharing your screen' : 'Share your screen'}">${c.sharing ? I.screenOff : I.screenShare}</button>
|