heyquilt 0.3.184 → 0.3.185
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/RELEASES.md +4 -0
- package/package.json +1 -1
- package/src/api/routes/workspaces.js +2 -0
- package/src/app-workspaces.js +21 -0
- package/src/ui/app.css +12 -6
- package/src/ui/loom.js +3 -17
- package/src/ui/projects.js +4 -4
- package/src/ui/session.js +6 -12
- package/src/ui/voice.js +8 -5
- package/src/ui-server.js +17 -1
package/RELEASES.md
CHANGED
|
@@ -11,6 +11,10 @@ Format: `## <version> — <YYYY-MM-DD>`, an optional one-line summary, then bull
|
|
|
11
11
|
Lead each bullet with a short bold phrase. Inline `code` and **bold** are rendered;
|
|
12
12
|
nothing else is.
|
|
13
13
|
|
|
14
|
+
## 0.3.185 — 2026-11-23
|
|
15
|
+
|
|
16
|
+
- **A simpler Loom.** The three switches above the Loom are gone: Chat and Tasks, Detailed and Compact, Lanes and One column. The Loom always shows chat and tasks, every card in full, and a lane for each person (one column when the window is narrow).
|
|
17
|
+
|
|
14
18
|
## 0.3.184 — 2026-11-22
|
|
15
19
|
|
|
16
20
|
Connections for the agents you choose.
|
package/package.json
CHANGED
|
@@ -83,6 +83,8 @@ export function workspaceRoutes (ctx) {
|
|
|
83
83
|
access: access.access,
|
|
84
84
|
admin: access.admin,
|
|
85
85
|
via: access.via,
|
|
86
|
+
// The codebases in it, so an app knows which of the folders on its computer belong here.
|
|
87
|
+
rooms: sessions.map((s) => s.room),
|
|
86
88
|
// files: the row's count, kept by every upload, delete and sweep (setWorkspaceUsage).
|
|
87
89
|
counts: { sessions: sessions.length, members: members.length, open: sessions.filter((s) => isOpen(s, t)).length, files: ws.fileCount ?? 0 }
|
|
88
90
|
}
|
package/src/app-workspaces.js
CHANGED
|
@@ -2,3 +2,24 @@
|
|
|
2
2
|
// app, its agents' workspace tools and `quilt workspace` act as if the accounts API had them off,
|
|
3
3
|
// whatever the API says. QUILT_APP_WORKSPACES=1 brings them back (tests, and when they return).
|
|
4
4
|
export const appWorkspaces = (env = process.env) => /^(1|true)$/i.test(env.QUILT_APP_WORKSPACES || '')
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The folders on this computer whose codebase is in a project the folder doesn't know about:
|
|
8
|
+
* someone who joined a project's codebase with an invite, or whose partner moved it into a
|
|
9
|
+
* project, has no project in the folder's own settings. `workspaces`: the account's projects as
|
|
10
|
+
* the API lists them (each with its `rooms`); `folders`: [{ dir, room, workspace }]. Returns
|
|
11
|
+
* [{ dir, workspace }] to save. A folder whose room no listed project has is left as it is.
|
|
12
|
+
*/
|
|
13
|
+
export function projectsToLearn (workspaces = [], folders = []) {
|
|
14
|
+
const of = new Map()
|
|
15
|
+
for (const w of workspaces) for (const room of (w && w.rooms) || []) if (!of.has(room)) of.set(room, w.id)
|
|
16
|
+
const out = []
|
|
17
|
+
const seen = new Set()
|
|
18
|
+
for (const f of folders) {
|
|
19
|
+
const id = f && f.room ? of.get(f.room) : ''
|
|
20
|
+
if (!id || f.workspace === id || seen.has(f.dir)) continue
|
|
21
|
+
seen.add(f.dir)
|
|
22
|
+
out.push({ dir: f.dir, workspace: id })
|
|
23
|
+
}
|
|
24
|
+
return out
|
|
25
|
+
}
|
package/src/ui/app.css
CHANGED
|
@@ -1765,14 +1765,20 @@ body.has-asks .prail { margin-top: calc(var(--update-bar, 0px) + var(--asks-bar)
|
|
|
1765
1765
|
.ws.pj-cb[data-side-page="chat"] .ws-chat { display: flex; }
|
|
1766
1766
|
.ws.pj-cb:is([data-side-page="connections"], [data-side-page="artifacts"]) :is(#main, #mainbar) { display: none; }
|
|
1767
1767
|
.ws.pj-cb .ws-main > .pj-pmain { flex: 1; }
|
|
1768
|
-
/* a call
|
|
1769
|
-
.ws.pj-cb
|
|
1770
|
-
.ws.pj-cb[data-side
|
|
1771
|
-
.ws.pj-cb
|
|
1768
|
+
/* a call is in the channel: a screen someone shares there sits in the middle, the channel beside it */
|
|
1769
|
+
.ws.pj-cb[data-side-page="chat"]:has(#screen-stage:not([hidden])) .ws-main { display: flex; }
|
|
1770
|
+
.ws.pj-cb[data-side-page="chat"] .ws-body:has(#screen-stage:not([hidden])) { grid-template-columns: 244px minmax(0, 1fr) 380px; }
|
|
1771
|
+
.ws.pj-cb[data-side="shut"][data-side-page="chat"] .ws-body:has(#screen-stage:not([hidden])) { grid-template-columns: minmax(0, 1fr) 380px; }
|
|
1772
|
+
.ws.pj-cb[data-side-page="chat"] .ws-body:has(#screen-stage:not([hidden])) .ws-chat { border-left: 1px solid var(--border); }
|
|
1773
|
+
/* a call going on shows on its channel's row */
|
|
1774
|
+
.pj-side .pj-call { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--ok); }
|
|
1775
|
+
.pj-side .pj-call svg { width: 13px; height: 13px; color: inherit; }
|
|
1772
1776
|
@media (max-width: 900px) {
|
|
1773
|
-
.ws.pj-cb .ws-body
|
|
1777
|
+
.ws.pj-cb .ws-body { grid-template-columns: minmax(0, 1fr); }
|
|
1774
1778
|
.ws.pj-cb .pj-side { position: absolute; top: 0; bottom: 0; left: 0; z-index: 5; width: min(244px, 80vw); max-height: none; border-right: 1px solid var(--border); border-bottom: 0; box-shadow: var(--shadow-pop); }
|
|
1775
|
-
|
|
1779
|
+
/* too narrow for both: the screen takes the page, and Hide puts the channel back */
|
|
1780
|
+
.ws.pj-cb[data-side-page="chat"] .ws-body:has(#screen-stage:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
|
|
1781
|
+
.ws.pj-cb[data-side-page="chat"] .ws-body:has(#screen-stage:not([hidden])) .ws-chat { display: none; }
|
|
1776
1782
|
}
|
|
1777
1783
|
|
|
1778
1784
|
/* ---- Artifacts (files.js artifactsHtml): tiles across the page; an open artifact takes the page
|
package/src/ui/loom.js
CHANGED
|
@@ -60,7 +60,7 @@ export function renderLoom (el, { build, prefs, me, names, meAgent, onAction })
|
|
|
60
60
|
if (typing && typing === document.activeElement) return
|
|
61
61
|
if (!ticker) ticker = setInterval(tickClocks, 30000)
|
|
62
62
|
const wasLoom = showsLoom(el)
|
|
63
|
-
const merged =
|
|
63
|
+
const merged = el.clientWidth > 0 && el.clientWidth < MERGE_BELOW
|
|
64
64
|
lastWidth = el.clientWidth
|
|
65
65
|
model = build(merged, Math.max(0, el.clientWidth - 14)) // less a scrollbar
|
|
66
66
|
const html = loomHtml(model, { prefs, me, names, meAgent, merged })
|
|
@@ -117,25 +117,14 @@ function loomHtml (m, { prefs, me, names, meAgent, merged }) {
|
|
|
117
117
|
const turns = m.items.filter((it) => it.type === 'turn')
|
|
118
118
|
const convs = new Set(turns.map((t) => `${t.lane}|${t.conv}`)).size
|
|
119
119
|
const working = lanes.filter((l) => l.working).length
|
|
120
|
-
|
|
120
|
+
// One way to look at it: chat and tasks shown, every card in full, a lane per person (one column when narrow).
|
|
121
|
+
const dens = 'detailed'
|
|
121
122
|
const hidden = (prefs.hidden || []).filter(Boolean)
|
|
122
123
|
|
|
123
124
|
const bar = `<div class="loom-bar">
|
|
124
125
|
<div class="loom-title"><b>Everyone</b><span class="hint">${convs} conversation${convs === 1 ? '' : 's'} · ${m.files.size} file${m.files.size === 1 ? '' : 's'} changed${working ? ` · <span class="loom-live"><span class="pulse"></span>${working} working</span>` : ''}</span></div>
|
|
125
126
|
<span class="spacer"></span>
|
|
126
127
|
${hidden.map((n) => `<button class="loom-chip off" data-loom-unhide="${esc(n)}" title="Show ${esc(n)}'s lane">${I.eye}<span>${esc(n)}</span></button>`).join('')}
|
|
127
|
-
<div class="loom-seg" role="group" aria-label="Show">
|
|
128
|
-
<button class="loom-chip${prefs.chat !== false ? ' on' : ''}" data-loom-pref="chat" aria-pressed="${prefs.chat !== false}">${I.chat}<span>Chat</span></button>
|
|
129
|
-
<button class="loom-chip${prefs.tasks !== false ? ' on' : ''}" data-loom-pref="tasks" aria-pressed="${prefs.tasks !== false}">${I.board}<span>Tasks</span></button>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="loom-seg" role="group" aria-label="Detail">
|
|
132
|
-
<button class="loom-chip${dens === 'detailed' ? ' on' : ''}" data-loom-density="detailed" aria-pressed="${dens === 'detailed'}">Detailed</button>
|
|
133
|
-
<button class="loom-chip${dens === 'compact' ? ' on' : ''}" data-loom-density="compact" aria-pressed="${dens === 'compact'}">Compact</button>
|
|
134
|
-
</div>
|
|
135
|
-
<div class="loom-seg wide-only" role="group" aria-label="Layout">
|
|
136
|
-
<button class="loom-chip${prefs.layout !== 'merged' ? ' on' : ''}" data-loom-layout="lanes" aria-pressed="${prefs.layout !== 'merged'}" title="A lane per person">Lanes</button>
|
|
137
|
-
<button class="loom-chip${prefs.layout === 'merged' ? ' on' : ''}" data-loom-layout="merged" aria-pressed="${prefs.layout === 'merged'}" title="One column, in time order">One column</button>
|
|
138
|
-
</div>
|
|
139
128
|
</div>`
|
|
140
129
|
|
|
141
130
|
const heads = merged
|
|
@@ -714,9 +703,6 @@ function bind (el) {
|
|
|
714
703
|
if ((b = pick('[data-file]'))) return act('file', b.dataset.file)
|
|
715
704
|
if ((b = pick('[data-loom-hide]'))) return act('hide', b.dataset.loomHide)
|
|
716
705
|
if ((b = pick('[data-loom-unhide]'))) return act('unhide', b.dataset.loomUnhide)
|
|
717
|
-
if ((b = pick('[data-loom-pref]'))) return act('toggle', b.dataset.loomPref)
|
|
718
|
-
if ((b = pick('[data-loom-density]'))) return act('density', b.dataset.loomDensity)
|
|
719
|
-
if ((b = pick('[data-loom-layout]'))) return act('layout', b.dataset.loomLayout)
|
|
720
706
|
if (t.closest('a, button')) return
|
|
721
707
|
if (String(window.getSelection?.() || '')) return // selecting text in a card, not opening it
|
|
722
708
|
const c = pick('.lc-turn')
|
package/src/ui/projects.js
CHANGED
|
@@ -230,17 +230,17 @@ export function codeCrumbHtml (project) {
|
|
|
230
230
|
* `tasks`: its open tasks; `artifacts`: how many the project has, once known; `chatNew`: messages in its channel since it was last looked at;
|
|
231
231
|
* `people`: who is in it, you first ({ name, color }).
|
|
232
232
|
*/
|
|
233
|
-
export function codeSideHtml ({ page, name, project, tasks = 0, artifacts = 0, chatNew = 0, people = [], connections = false, canInvite = true, dms = [], dmOn = '' }) {
|
|
233
|
+
export function codeSideHtml ({ page, name, project, tasks = 0, artifacts = 0, chatNew = 0, people = [], connections = false, canInvite = true, dms = [], dmOn = '', call = 0 }) {
|
|
234
234
|
const nav = (v, icon, label, n, attr = `data-code-page="${v}"`) => `<button type="button" class="${page === v ? 'on' : ''}" ${attr}${page === v ? ' aria-current="page"' : ''}>${icon}<span class="nm">${label}</span>${n ? `<span class="ct">${n}</span>` : ''}</button>`
|
|
235
235
|
const isFolded = (k) => foldedNow().has(k)
|
|
236
236
|
const label = (k, text, n) => `<div class="side-label pj-side-label"><button type="button" class="pj-fold" data-fold="${k}" aria-expanded="${!isFolded(k)}" title="${isFolded(k) ? 'Show' : 'Hide'} ${text.toLowerCase()}"><span>${text}</span>${I.chevDown}</button>${isFolded(k) && n ? `<span class="ct new">${n}</span>` : ''}</div>`
|
|
237
|
-
// A folded section keeps the row you are on
|
|
238
|
-
const channel = !isFolded('channels') || page === 'chat' || chatNew
|
|
237
|
+
// A folded section keeps the row you are on, what is new, and a call going on.
|
|
238
|
+
const channel = !isFolded('channels') || page === 'chat' || chatNew || call
|
|
239
239
|
const inDm = page === 'chat' ? dmOn : ''
|
|
240
240
|
return `
|
|
241
241
|
<nav class="side-nav" aria-label="Pages">${nav('loom', I.users, 'Loom')}${nav('tasks', I.board, 'Tasks', tasks)}${project ? nav('artifacts', I.folder, 'Artifacts', artifacts) : ''}${connections ? nav('connections', I.link, 'Connections') : ''}</nav>
|
|
242
242
|
${label('channels', 'Channels', chatNew)}
|
|
243
|
-
<div class="side-sessions pj-rooms">${channel ? `<button type="button" class="${page === 'chat' && !inDm ? 'on' : ''}" data-code-page="chat" data-dm="" title="Everyone working in ${esc(name)}"${page === 'chat' && !inDm ? ' aria-current="page"' : ''}><span class="pj-hash">#</span><span class="nm">${esc(name)}</span>${chatNew ? `<span class="ct new">${chatNew > 99 ? '99+' : chatNew}</span>` : ''}</button>` : ''}</div>
|
|
243
|
+
<div class="side-sessions pj-rooms">${channel ? `<button type="button" class="${page === 'chat' && !inDm ? 'on' : ''}" data-code-page="chat" data-dm="" title="Everyone working in ${esc(name)}"${page === 'chat' && !inDm ? ' aria-current="page"' : ''}><span class="pj-hash">#</span><span class="nm">${esc(name)}</span>${call ? `<span class="pj-call" title="${call === 1 ? '1 person is' : `${call} people are`} in a call here">${I.headset}${call}</span>` : ''}${chatNew ? `<span class="ct new">${chatNew > 99 ? '99+' : chatNew}</span>` : ''}</button>` : ''}</div>
|
|
244
244
|
${dms.length ? `${label('dms', 'Direct messages')}
|
|
245
245
|
<div class="side-sessions pj-rooms">${isFolded('dms') && !inDm && !dms.some((t) => t.n) ? '' : dms.filter((t) => !isFolded('dms') || t.name === inDm || t.n).map((t) => `<button type="button" class="${t.name === inDm ? 'on' : ''}" data-dm="${esc(t.name)}" title="You and ${esc(t.name)}"${t.name === inDm ? ' aria-current="page"' : ''}>${avatar(t.name)}<span class="nm">${esc(t.name)}</span>${t.n ? `<span class="ct new">${t.n > 99 ? '99+' : t.n}</span>` : ''}</button>`).join('')}</div>` : ''}
|
|
246
246
|
<div class="side-foot side-nav">
|
package/src/ui/session.js
CHANGED
|
@@ -26,7 +26,7 @@ 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,
|
|
29
|
+
import { callButtonMarkup, callPinMarkup, screenStageMarkup, mountCall, unmountCall, renderCall, callCards, callCount } from './voice.js'
|
|
30
30
|
import { codeSideHtml, codeCrumbHtml, sideShut, toggleSideShut, toggleFolded } from './projects.js'
|
|
31
31
|
import { dmThreads } from './project-model.js'
|
|
32
32
|
|
|
@@ -220,7 +220,7 @@ export function mountSession (id) {
|
|
|
220
220
|
const st = sum().status
|
|
221
221
|
const colors = new Map([...st.peers.map((p) => [p.name, p.color]), [st.me.name, st.me.color]])
|
|
222
222
|
return { owner: !!st.access?.owner, me: st.me, colorOf: (n) => colors.get(n) }
|
|
223
|
-
}, () => renderMessages())
|
|
223
|
+
}, () => renderMessages(), () => renderCodeSide())
|
|
224
224
|
bindAccess()
|
|
225
225
|
bindChanges(id, mounted.signal, { onOpen: (path) => openFile(path, { tab: 'changes' }), close: () => setGitOpen(false), onCount: renderGitChip })
|
|
226
226
|
bindCatchUp($('#catchup'), { sessionId: () => current, onOpen: openFile })
|
|
@@ -402,7 +402,7 @@ function renderCodeSide () {
|
|
|
402
402
|
const page = side || (w.mode === 'tasks' ? 'tasks' : 'loom')
|
|
403
403
|
const open = (st.tasks || []).filter((t) => !t.archived && (t.column === 'todo' || t.column === 'doing')).length
|
|
404
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' })
|
|
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', call: callCount() })
|
|
406
406
|
const root = $('#ws')
|
|
407
407
|
root.dataset.sidePage = side
|
|
408
408
|
$('#code-crumb').innerHTML = codeCrumbHtml(projectHere())
|
|
@@ -2225,11 +2225,8 @@ async function refreshFile (path, highlight) {
|
|
|
2225
2225
|
function loomPrefs (w) {
|
|
2226
2226
|
const p = w.loom && typeof w.loom === 'object' ? w.loom : {}
|
|
2227
2227
|
const names = (list) => Array.isArray(list) ? list.filter((n) => typeof n === 'string') : []
|
|
2228
|
+
// The Loom is shown one way (chat and tasks in it, cards in full, a lane each): choices saved by an older app are dropped.
|
|
2228
2229
|
w.loom = {
|
|
2229
|
-
chat: p.chat !== false,
|
|
2230
|
-
tasks: p.tasks !== false,
|
|
2231
|
-
density: p.density === 'compact' ? 'compact' : 'detailed',
|
|
2232
|
-
layout: p.layout === 'merged' ? 'merged' : 'lanes',
|
|
2233
2230
|
hidden: names(p.hidden),
|
|
2234
2231
|
pinned: names(p.pinned), // lanes kept open when they don't all fit
|
|
2235
2232
|
opened: names(p.opened).slice(0, 20), // lanes opened from a strip, latest first
|
|
@@ -2287,11 +2284,8 @@ function loomAction (kind, value) {
|
|
|
2287
2284
|
}
|
|
2288
2285
|
if (kind === 'hide') prefs.hidden = [...new Set([...prefs.hidden, value])]
|
|
2289
2286
|
else if (kind === 'unhide') prefs.hidden = prefs.hidden.filter((n) => n !== value)
|
|
2290
|
-
else if (kind === 'toggle') prefs[value] = prefs[value] === false
|
|
2291
|
-
else if (kind === 'density') prefs.density = value
|
|
2292
|
-
else if (kind === 'layout') prefs.layout = value
|
|
2293
2287
|
else if (kind === 'pin') prefs.pinned = prefs.pinned.includes(value) ? prefs.pinned.filter((n) => n !== value) : [...prefs.pinned, value]
|
|
2294
|
-
else if (kind === 'open-lane')
|
|
2288
|
+
else if (kind === 'open-lane') prefs.opened = [value, ...prefs.opened.filter((n) => n !== value)].slice(0, 20)
|
|
2295
2289
|
else if (kind === 'conv-name') {
|
|
2296
2290
|
// Empty: back to the conversation's own name (its tool's title, or its first prompt).
|
|
2297
2291
|
const rest = Object.fromEntries(Object.entries(prefs.convNames).filter(([k]) => k !== value.conv))
|
|
@@ -2451,7 +2445,7 @@ let dmNew = new Map() // and for each direct message's row: who wrote -> how man
|
|
|
2451
2445
|
|
|
2452
2446
|
// With the sidebar (projects on), chat is a page from the sidebar, not a column: it counts as folded
|
|
2453
2447
|
// whenever it is not the page showing (a call keeps it beside the page).
|
|
2454
|
-
const chatCollapsed = () => pj() && current ?
|
|
2448
|
+
const chatCollapsed = () => pj() && current ? ws(current).side !== 'chat' : recall('chat-collapsed', '') === '1'
|
|
2455
2449
|
const chatWidthFor = (body, w) => Math.round(Math.min(Math.max(w, CHAT_MIN), Math.max(CHAT_MIN, Math.min(CHAT_MAX, body.clientWidth - 560))))
|
|
2456
2450
|
|
|
2457
2451
|
function applyChatLayout () {
|
package/src/ui/voice.js
CHANGED
|
@@ -65,8 +65,8 @@ function endPicking (id) {
|
|
|
65
65
|
* A session is on screen: wire the call into its chat. `who()`: { owner, me, colorOf(name) } now;
|
|
66
66
|
* `chatChanged()`: the chat's calls changed, draw its messages again.
|
|
67
67
|
*/
|
|
68
|
-
export function mountCall (id, signal, who, chatChanged = () => {}) {
|
|
69
|
-
shown = { id, who, chatChanged }
|
|
68
|
+
export function mountCall (id, signal, who, chatChanged = () => {}, callChanged = () => {}) {
|
|
69
|
+
shown = { id, who, chatChanged, callChanged, count: 0 }
|
|
70
70
|
asking = false
|
|
71
71
|
options = false
|
|
72
72
|
drawn = ''
|
|
@@ -297,6 +297,9 @@ function paintTalk () {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
+
/** How many people are in the call of the codebase on screen (0: no call). */
|
|
301
|
+
export const callCount = () => (shown && shown.count) || 0
|
|
302
|
+
|
|
300
303
|
/** The chat's call button and the pinned call, for the session on screen. */
|
|
301
304
|
export function renderCall () {
|
|
302
305
|
const btn = $('#chat-call')
|
|
@@ -310,6 +313,9 @@ export function renderCall () {
|
|
|
310
313
|
const elsewhere = !!(live && live.sid !== id)
|
|
311
314
|
const others = view.peers
|
|
312
315
|
const c = here ? live.call : null
|
|
316
|
+
// How many are in the call, for whoever shows it elsewhere (the channel's row in the sidebar).
|
|
317
|
+
const count = others.length + (here ? 1 : 0)
|
|
318
|
+
if (count !== shown.count) { shown.count = count; shown.callChanged(count) }
|
|
313
319
|
btn.hidden = here || joining || asking || others.length > 0
|
|
314
320
|
btn.disabled = elsewhere
|
|
315
321
|
pin.hidden = !(here || joining || asking || others.length)
|
|
@@ -483,6 +489,3 @@ export function callCards (id) {
|
|
|
483
489
|
}
|
|
484
490
|
})
|
|
485
491
|
}
|
|
486
|
-
|
|
487
|
-
/** Whether this window is in a call now (for the people list). */
|
|
488
|
-
export const inCallHere = (id) => !!(live && live.sid === id)
|
package/src/ui-server.js
CHANGED
|
@@ -35,7 +35,7 @@ import { queryHistory } from './history.js'
|
|
|
35
35
|
import { contentDisposition } from './api/file-paths.js'
|
|
36
36
|
import { apiCall, getSecrets, putSecretSettings, setSecretWho, deleteSecret, secretUses, saveSecrets, secretAsks, answerAsk } from './secrets-client.js'
|
|
37
37
|
import { envFilesIn, knownEnvFile, envValues } from './secret-import.js'
|
|
38
|
-
import { appWorkspaces } from './app-workspaces.js'
|
|
38
|
+
import { appWorkspaces, projectsToLearn } from './app-workspaces.js'
|
|
39
39
|
import { guessTool } from './tool-guess.js'
|
|
40
40
|
|
|
41
41
|
// A route's answer that streams through instead of going as JSON (an agent's speech).
|
|
@@ -563,6 +563,8 @@ export async function startUi ({ port = 7420, onShutdown, preview = false, repor
|
|
|
563
563
|
}
|
|
564
564
|
runs.set(id, entry)
|
|
565
565
|
const s = entry.run.session
|
|
566
|
+
// A codebase joined with an invite may be in a project: ask the account's list, which says (learnProjects).
|
|
567
|
+
if (appWorkspaces() && !readConfig(entry.run.dir)?.workspace) Promise.resolve().then(() => workspaceList()).catch(() => {})
|
|
566
568
|
// What the person said they want to build is the project's first ticket, for their AI to pick up.
|
|
567
569
|
const first = project && briefTicket(project.brief)
|
|
568
570
|
if (first) {
|
|
@@ -838,6 +840,7 @@ export async function startUi ({ port = 7420, onShutdown, preview = false, repor
|
|
|
838
840
|
try {
|
|
839
841
|
const workspaces = await listWorkspaces({ token })
|
|
840
842
|
workspacesOn = true
|
|
843
|
+
learnProjects(workspaces)
|
|
841
844
|
return { on: true, workspaces }
|
|
842
845
|
} catch (err) {
|
|
843
846
|
if (err.status === 404) { workspacesOn = false; return { on: false, workspaces: [] } }
|
|
@@ -865,6 +868,19 @@ export async function startUi ({ port = 7420, onShutdown, preview = false, repor
|
|
|
865
868
|
for (const r of recentList()) if (!r.unsupported) add(r.dir, '', '')
|
|
866
869
|
return out
|
|
867
870
|
}
|
|
871
|
+
// A codebase here that the account's projects list in a project is in that project here too
|
|
872
|
+
// (app-workspaces.js projectsToLearn): saved in its folder, so its page, its row and the project's page agree.
|
|
873
|
+
function learnProjects (workspaces) {
|
|
874
|
+
const folders = [...[...runs.values()].map((r) => ({ dir: r.run.dir, room: r.run.session.room, workspace: readConfig(r.run.dir)?.workspace || '' })), ...recentList().map((r) => ({ dir: r.dir, room: r.room, workspace: r.workspace || '' }))]
|
|
875
|
+
for (const { dir, workspace } of projectsToLearn(workspaces, folders)) {
|
|
876
|
+
const saved = readConfig(dir)
|
|
877
|
+
if (!saved) continue
|
|
878
|
+
writePrivateJson(path.join(dir, '.quilt', 'config.json'), { ...saved, workspace })
|
|
879
|
+
rememberWorkspace(dir, workspace)
|
|
880
|
+
const id = idFor(dir)
|
|
881
|
+
if (runs.has(id)) { runs.get(id).run.session.setWorkspace(workspace); pushStatus(id) }
|
|
882
|
+
}
|
|
883
|
+
}
|
|
868
884
|
const needOrgSlug = (slug) => { if (!/^[a-z0-9][a-z0-9-]{0,63}$/i.test(String(slug || ''))) throw httpError(400, 'Which org?'); return slug }
|
|
869
885
|
const ofWorkspace = (id) => ({
|
|
870
886
|
running: [...runs.keys()].filter((k) => (readConfig(runs.get(k).run.dir) || {}).workspace === id),
|