copilotz 1.0.0-rc.8 → 1.0.0-rc.9

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +2 -2
  3. package/hosts/web/pwa.js +1 -1
  4. package/hosts/web/server.js +8 -1
  5. package/hosts/web/style.d.ts +1 -1
  6. package/hosts/web/style.js +10 -0
  7. package/hosts/web/toolkit/button.js +6 -0
  8. package/hosts/web/toolkit/copy-button.js +4 -0
  9. package/hosts/web/toolkit/icon-button.js +6 -0
  10. package/hosts/web/toolkit/icon.d.ts +1 -0
  11. package/hosts/web/toolkit/icon.js +2 -0
  12. package/hosts/web/toolkit/input.js +6 -0
  13. package/package.json +1 -1
  14. package/plugins/access/spaces/contract.d.ts +24 -3
  15. package/plugins/access/spaces/views/web/palette.js +10 -7
  16. package/plugins/access/spaces/views/web/panel.d.ts +3 -2
  17. package/plugins/access/spaces/views/web/panel.js +28 -13
  18. package/plugins/access/spaces/views/web/sections.d.ts +31 -0
  19. package/plugins/access/spaces/views/web/sections.js +22 -0
  20. package/plugins/access/spaces/views/web/space.d.ts +4 -2
  21. package/plugins/access/spaces/views/web/space.js +16 -6
  22. package/plugins/access/spaces/views/web/style.d.ts +1 -1
  23. package/plugins/access/spaces/views/web/style.js +39 -0
  24. package/plugins/access/spaces/views/web/tabs.d.ts +18 -6
  25. package/plugins/access/spaces/views/web/tabs.js +24 -8
  26. package/plugins/access/spaces/web.js +16 -2
  27. package/plugins/agents/chat/views/web/style.d.ts +1 -1
  28. package/plugins/agents/chat/views/web/style.js +10 -6
  29. package/plugins/agents/memory/web.js +9 -1
  30. package/plugins/agents/routines/web.js +1 -1
  31. package/plugins/agents/skills/web.js +3 -1
  32. package/plugins/compute/apps/web.js +3 -1
  33. package/plugins/compute/computers/program/version.d.ts +1 -1
  34. package/plugins/compute/computers/program/version.js +1 -1
  35. package/plugins/compute/computers/resources/downloads.js +1 -1
  36. package/plugins/compute/computers/views/web/asks.d.ts +3 -1
  37. package/plugins/compute/computers/views/web/asks.js +5 -3
  38. package/plugins/compute/computers/web.js +9 -2
  39. package/plugins/interfaces/api/web.js +3 -1
  40. package/plugins/interfaces/whatsapp/web.js +8 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## 1.0.0-rc.9 — 2026-10-31
2
+
3
+ - **A space's page has a few tabs, and their sections.** A `spaceTabs` entry `under` another tab is
4
+ a section of it, listed in its menu, with an optional `group` heading; a tab with sections names
5
+ its own View among them (`own`) and shows them in a menu beside (`menu: "side"`) or as tabs above
6
+ (`top`, the default). A section's key opens its tab there (`?tab=memories`), so every address
7
+ still works, and the palette lists sections too. The tabs now: Chats, Board and Documents (an
8
+ app's), Computer (Computers, Environment, Apps), Routines and Settings (General, Members,
9
+ Memories, Skills, Channels: WhatsApp, API). Where there's no room for a menu beside (a phone),
10
+ Settings is a list to tap into, and a section says how to get back; in the side panel, sections
11
+ are tabs under the panel's. Who's waiting to join shows on Settings and on Members.
12
+ - **On phones, an app's page.** The viewport spans the screen (`viewport-fit=cover`; the composer
13
+ keeps clear of the home bar) and the keyboard resizes the page where browsers allow
14
+ (`interactive-widget`); pinching still zooms. The page never scrolls sideways or bounces as a
15
+ whole, and a tap is a tap (no double-tap zoom, no grey flash). On touch screens, text is 16px,
16
+ fields too at least (so Safari never zooms in on one you type in), and buttons, icon buttons,
17
+ fields and copy buttons are 44px targets (40px small).
18
+ - **A conversation scrolls up and down only.** What's wider (a table, code) scrolls in its own box;
19
+ text wraps; a file's chip and a tool call being written no longer widen it.
20
+ - **What an agent asks you never covers the conversation.** The command or the file it shows scrolls
21
+ within a few lines (a command can wrap into dozens), with a copy button, so the answers are always
22
+ in sight; the cards keep to at most 60% of the chat's height and scroll there.
23
+
1
24
  ## 1.0.0-rc.8 — 2026-10-31
2
25
 
3
26
  - **Agents' prompts only grow, so the prompt cache keeps them whole.** A turn context (the
package/README.md CHANGED
@@ -22,7 +22,7 @@ bun add copilotz # Bun
22
22
  deno add jsr:@copilotz/copilotz # Deno (or `deno add npm:copilotz`)
23
23
  ```
24
24
 
25
- On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.8"`), and
25
+ On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.9"`), and
26
26
  the imports below are the same everywhere. Some pieces need a package of their own, installed beside
27
27
  it: `esbuild` to bundle the web host on Node, `@electric-sql/pglite` for PostgreSQL in the process,
28
28
  and `@types/react` for the front ends' types.
@@ -204,7 +204,7 @@ and an app serves it from there by default:
204
204
  import { computerDownloads } from "copilotz/plugins/compute/downloads";
205
205
 
206
206
  plugins: [...plugins, await computerDownloads()], // this Copilotz's release
207
- plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.8" })], // its own: /computer/download/
207
+ plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.9" })], // its own: /computer/download/
208
208
  plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })], // or elsewhere
209
209
  ```
210
210
 
package/hosts/web/pwa.js CHANGED
@@ -92,7 +92,7 @@ function offlinePage(theme, title) {
92
92
  ? `@media (prefers-color-scheme: dark){body{background:${dark.bg};color:${dark.fg}}p{color:${dark.muted ?? dark.fg}}button{background:${dark.button ?? dark.fg};color:${dark.on ?? dark.bg}}}`
93
93
  : "";
94
94
  return `<!doctype html><html lang="en"><head><meta charset="utf-8">` +
95
- `<meta name="viewport" content="width=device-width, initial-scale=1">` +
95
+ `<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content">` +
96
96
  `<title>${safe(title)}: offline</title><style>` +
97
97
  `body{margin:0;min-height:100vh;display:grid;place-items:center;font:15px/1.55 ui-sans-serif,system-ui,sans-serif;` +
98
98
  `background:${light.bg};color:${light.fg}}main{max-width:360px;padding:24px;text-align:center}` +
@@ -91,11 +91,18 @@ const installable = (options) => {
91
91
  "",
92
92
  ].join("\n");
93
93
  };
94
+ /**
95
+ * The page: on phones, an app's. It spans the whole screen (`viewport-fit=cover`:
96
+ * the shell keeps its content clear of the notch and the home bar with the
97
+ * safe-area insets), and the keyboard resizes it rather than covering it
98
+ * (`interactive-widget`, where browsers take it). Zoom stays: nothing caps
99
+ * the scale, so people can still pinch to read.
100
+ */
94
101
  const page = (options, entry) => `<!doctype html>
95
102
  <html lang="en">
96
103
  <head>
97
104
  <meta charset="utf-8">
98
- <meta name="viewport" content="width=device-width, initial-scale=1">
105
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content">
99
106
  ${look(options.theme)}${installable(options)}<title>${options.title ?? "Copilotz"}</title>
100
107
  <script id="copilotz-config" type="application/json">${
101
108
  // Escaped, so nothing in it can end the script.
@@ -5,4 +5,4 @@
5
5
  * pieces (`toolkit/`); a front end's own CSS is in no layer, so it always
6
6
  * wins over both.
7
7
  */
8
- export declare const BASE = "\n@layer copilotz-base, copilotz-toolkit;\n@layer copilotz-base {\n:root {\n font: 15px/1.55 var(--font-sans);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n}\n*, *::before, *::after { box-sizing: border-box; }\nhtml, body, #app { height: 100%; }\nbody { margin: 0; background: var(--background); color: var(--foreground); }\nbutton, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }\na { color: inherit; }\ncode, kbd, pre, samp { font-family: var(--font-mono); font-variant-ligatures: none; }\n:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n::selection { background: color-mix(in oklab, var(--primary-text) 28%, transparent); }\n.copilotz-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n@media (prefers-reduced-motion: reduce) {\n *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;\n transition-duration: .01ms !important; scroll-behavior: auto !important; }\n}\n}\n";
8
+ export declare const BASE = "\n@layer copilotz-base, copilotz-toolkit;\n@layer copilotz-base {\n:root {\n font: 15px/1.55 var(--font-sans);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n}\n*, *::before, *::after { box-sizing: border-box; }\nhtml, body, #app { height: 100%; }\n/* An app's page: it never scrolls sideways or bounces as a whole (its panes scroll); a tap is a\n tap (no double-tap zoom, no grey flash), and pinching still zooms. */\nhtml, body { overflow-x: clip; overscroll-behavior: none; }\nhtml { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }\nbody { margin: 0; background: var(--background); color: var(--foreground); }\nbutton, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }\na { color: inherit; }\ncode, kbd, pre, samp { font-family: var(--font-mono); font-variant-ligatures: none; }\n:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n::selection { background: color-mix(in oklab, var(--primary-text) 28%, transparent); }\n.copilotz-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n/* Touch screens: text a little larger, and fields at 16px at least, so phones never zoom in on\n one you type in (Safari does under 16px). Important, so every field's size gives way. */\n@media (pointer: coarse) {\n :root { font-size: 16px; }\n input, textarea, select { font-size: max(16px, 1em) !important; }\n}\n@media (prefers-reduced-motion: reduce) {\n *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;\n transition-duration: .01ms !important; scroll-behavior: auto !important; }\n}\n}\n";
@@ -18,6 +18,10 @@ export const BASE = `
18
18
  }
19
19
  *, *::before, *::after { box-sizing: border-box; }
20
20
  html, body, #app { height: 100%; }
21
+ /* An app's page: it never scrolls sideways or bounces as a whole (its panes scroll); a tap is a
22
+ tap (no double-tap zoom, no grey flash), and pinching still zooms. */
23
+ html, body { overflow-x: clip; overscroll-behavior: none; }
24
+ html { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
21
25
  body { margin: 0; background: var(--background); color: var(--foreground); }
22
26
  button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
23
27
  a { color: inherit; }
@@ -26,6 +30,12 @@ code, kbd, pre, samp { font-family: var(--font-mono); font-variant-ligatures: no
26
30
  ::selection { background: color-mix(in oklab, var(--primary-text) 28%, transparent); }
27
31
  .copilotz-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
28
32
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
33
+ /* Touch screens: text a little larger, and fields at 16px at least, so phones never zoom in on
34
+ one you type in (Safari does under 16px). Important, so every field's size gives way. */
35
+ @media (pointer: coarse) {
36
+ :root { font-size: 16px; }
37
+ input, textarea, select { font-size: max(16px, 1em) !important; }
38
+ }
29
39
  @media (prefers-reduced-motion: reduce) {
30
40
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
31
41
  transition-duration: .01ms !important; scroll-behavior: auto !important; }
@@ -15,6 +15,12 @@ const SHEET = sheet("button", `
15
15
  .copilotz-button[aria-busy=true] { cursor: progress; }
16
16
  .copilotz-button-sm { min-height: 30px; padding: 0 11px; gap: 6px; font-size: 13px; }
17
17
  .copilotz-button-lg { min-height: 44px; padding: 0 18px; font-size: 15px; }
18
+ /* Touch screens: targets a finger finds (44px, as phones' own guidelines ask) */
19
+ @media (pointer: coarse) {
20
+ .copilotz-button { min-height: 44px; }
21
+ .copilotz-button-sm { min-height: 40px; }
22
+ .copilotz-button-lg { min-height: 48px; }
23
+ }
18
24
  .copilotz-button-outline { background: var(--card); color: var(--card-foreground); border-color: var(--input);
19
25
  box-shadow: var(--shadow-sm); }
20
26
  .copilotz-button-outline:hover:not(:disabled) { background: var(--muted); }
@@ -9,6 +9,10 @@ const SHEET = sheet("copy-button", `
9
9
  font-size: 12px; cursor: pointer; transition: background-color .15s, color .15s; }
10
10
  .copilotz-copy:hover { background: var(--accent); color: var(--accent-foreground); }
11
11
  .copilotz-copy span:empty { display: none; }
12
+ /* Touch screens: a target a finger finds */
13
+ @media (pointer: coarse) {
14
+ .copilotz-copy { height: 40px; min-width: 40px; justify-content: center; }
15
+ }
12
16
  `);
13
17
  export function CopyButton({ text, label = "Copy" }) {
14
18
  const [copied, setCopied] = useState(false);
@@ -14,6 +14,12 @@ const SHEET = sheet("icon-button", `
14
14
  .copilotz-icon-button:disabled { opacity: .5; cursor: default; }
15
15
  .copilotz-icon-button-sm { width: 28px; height: 28px; border-radius: var(--radius-sm); }
16
16
  .copilotz-icon-button-lg { width: 38px; height: 38px; }
17
+ /* Touch screens: targets a finger finds (44px, as phones' own guidelines ask) */
18
+ @media (pointer: coarse) {
19
+ .copilotz-icon-button { width: 44px; height: 44px; }
20
+ .copilotz-icon-button-sm { width: 40px; height: 40px; }
21
+ .copilotz-icon-button-lg { width: 48px; height: 48px; }
22
+ }
17
23
  .copilotz-icon-button-outline { background: var(--card); color: var(--card-foreground); border-color: var(--input);
18
24
  box-shadow: var(--shadow-sm); }
19
25
  .copilotz-icon-button-outline:hover:not(:disabled) { background: var(--muted); color: var(--card-foreground); }
@@ -19,6 +19,7 @@ declare const PATHS: {
19
19
  readonly building: "M4 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16M16 9h2a2 2 0 0 1 2 2v10M2 21h20M8 7h4M8 11h4M8 15h4";
20
20
  readonly chart: "M3 3v18h18M8 17v-5M13 17V8M18 17v-8";
21
21
  readonly chat: "M21 12a8.5 8.5 0 0 1-12.4 7.6L3 21l1.4-5.4A8.5 8.5 0 1 1 21 12z";
22
+ readonly "chat-round": "M7.9 20A9 9 0 1 0 4 16.1L2 22z";
22
23
  readonly check: "M5 12.5 9.5 17 19 7.5";
23
24
  readonly "check-circle": "M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0zM8 12.5l2.7 2.7L16 9.8";
24
25
  readonly chevron: "M9 6l6 6-6 6";
@@ -11,6 +11,8 @@ const PATHS = {
11
11
  building: "M4 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16M16 9h2a2 2 0 0 1 2 2v10M2 21h20M8 7h4M8 11h4M8 15h4",
12
12
  chart: "M3 3v18h18M8 17v-5M13 17V8M18 17v-8",
13
13
  chat: "M21 12a8.5 8.5 0 0 1-12.4 7.6L3 21l1.4-5.4A8.5 8.5 0 1 1 21 12z",
14
+ // A round bubble: a messaging app's channel (WhatsApp).
15
+ "chat-round": "M7.9 20A9 9 0 1 0 4 16.1L2 22z",
14
16
  check: "M5 12.5 9.5 17 19 7.5",
15
17
  "check-circle": "M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0zM8 12.5l2.7 2.7L16 9.8",
16
18
  chevron: "M9 6l6 6-6 6",
@@ -20,6 +20,12 @@ const SHEET = sheet("input", `
20
20
  .copilotz-input-lg { height: 44px; padding: 0 14px; }
21
21
  .copilotz-input-lg > input { font-size: 15px; }
22
22
  .copilotz-input-end { display: flex; align-items: center; gap: 2px; }
23
+ /* Touch screens: fields a finger finds (their text is 16px at least: the page's base) */
24
+ @media (pointer: coarse) {
25
+ .copilotz-input { height: 44px; }
26
+ .copilotz-input-sm { height: 40px; }
27
+ .copilotz-input-lg { height: 48px; }
28
+ }
23
29
  `);
24
30
  export function Input({ icon, end, size = "md", invalid, className, ...rest }) {
25
31
  const bad = invalid ?? (rest["aria-invalid"] === true || rest["aria-invalid"] === "true");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotz",
3
- "version": "1.0.0-rc.8",
3
+ "version": "1.0.0-rc.9",
4
4
  "description": "Copilotz: one runtime for Node, Deno, Bun, Cloudflare Workers and the browser.",
5
5
  "keywords": [
6
6
  "agents",
@@ -21,7 +21,12 @@
21
21
  * `{ in, mode }`: `page`, the tab's content under the space's header (the
22
22
  * page is its frame: no title of its own), or `panel`, the same View,
23
23
  * compact. Lowest `order` first; the address says which tab is open
24
- * (`/space/<id>?tab=chats`), the first when it says none.
24
+ * (`/space/<id>?tab=chats`), the first when it says none. One `under`
25
+ * another tab is a section of it, in its menu: the space's settings take
26
+ * members, memories, skills, its channels (`group`: "Channels") and the
27
+ * API, in a menu beside them (`menu: "side"`, their own View named
28
+ * `own`: "General"); the computer takes its environment and apps, as tabs
29
+ * above. A section's key opens its tab there (`?tab=memories`).
25
30
  * - `spaceSidebar`: what a space shows under it in the sidebar once it's
26
31
  * unfolded (its latest chats): a View with item `{ _id }` and hints
27
32
  * `{ in, path }`, the address open, to mark what's current.
@@ -33,7 +38,10 @@
33
38
  *
34
39
  * ```ts
35
40
  * resources: {
36
- * spaceTabs: { notes: { title: "Notes", view: "notes", icon: "note", order: 50 } },
41
+ * spaceTabs: {
42
+ * notes: { title: "Notes", view: "notes", icon: "note", order: 50 },
43
+ * slack: { title: "Slack", view: "slack.space", under: "settings", group: "Channels" },
44
+ * },
37
45
  * spaceSidebar: { chats: { view: "chats.recent", title: "chats" } },
38
46
  * spaceInvite: { agents: { title: "Agents", view: "agent.add", personal: true } },
39
47
  * }
@@ -49,13 +57,26 @@ export type { Profile } from "./collections/profile.js";
49
57
  export { idsIn, nameOf, namesFor, namesIn, namesOf, type NamesResource, PROFILE, withNames, } from "./shared/names.js";
50
58
  export { PERSONAL } from "./shared/personal.js";
51
59
  export { AGENT_ROLES } from "./views/web/who.js";
52
- /** A `spaceTabs` resource: a tab on a space's page and in its side panel. */
60
+ /**
61
+ * A `spaceTabs` resource: a tab on a space's page and in its side panel, or,
62
+ * `under` another tab, one of that tab's sections (the space's settings take
63
+ * memories, skills, channels; its computer, its environment and apps).
64
+ */
53
65
  export type SpaceTab = {
54
66
  title: string;
55
67
  /** The View it shows: item `{ _id }`, hints `{ in, mode: "page" | "panel" }`. */
56
68
  view: string;
57
69
  icon?: IconName;
70
+ /** Among its tabs, or among its tab's sections: lowest first. */
58
71
  order?: number;
72
+ /** A section of this tab (its key), listed in its menu rather than among the tabs. */
73
+ under?: string;
74
+ /** Among its tab's sections, the heading it's listed under ("Channels"). */
75
+ group?: string;
76
+ /** A tab with sections: its own View's name among them ("General"; its title otherwise). */
77
+ own?: string;
78
+ /** A tab with sections: a menu beside them (`side`, as settings) or tabs above (`top`). */
79
+ menu?: "side" | "top";
59
80
  };
60
81
  /** A `spaceSidebar` resource: a View under a space in the sidebar, item `{ _id }`, hints `{ in, path }`. */
61
82
  export type SpaceSidebar = {
@@ -103,14 +103,17 @@ export const spacesPaletteView = (_, ctx) => {
103
103
  step: leaveStep(here, call),
104
104
  });
105
105
  if (searching) {
106
+ // Its tabs, and their sections (Memories: in Settings).
106
107
  for (const tab of tabsOf(ctx.resources.spaceTabs)) {
107
- items.push({
108
- key: `space:tab:${tab.key}`,
109
- label: tab.title,
110
- ...(tab.icon ? { icon: tab.icon } : {}),
111
- description: name,
112
- href: spacePath(here._id, tab.key),
113
- });
108
+ for (const part of [tab, ...tab.sections]) {
109
+ items.push({
110
+ key: `space:tab:${part.key}`,
111
+ label: part.title,
112
+ ...(part.icon ? { icon: part.icon } : {}),
113
+ description: part === tab ? name : `${name} · ${tab.title}`,
114
+ href: spacePath(here._id, part.key, part === tab && tab.sections.length > 0),
115
+ });
116
+ }
114
117
  }
115
118
  }
116
119
  groups.push({ title: "This space", order: 10, items });
@@ -3,8 +3,9 @@
3
3
  * shell's `panel`): its name, a link to its page, and its tabs, compact:
4
4
  * the same Views as on its page, with hints `{ in, mode: "panel" }`, each
5
5
  * read only once chosen (and kept while the panel is open, so a terminal
6
- * keeps what it showed). The tab last chosen opens next time. Where tabs
7
- * don't all fit, the others show as icons.
6
+ * keeps what it showed). A tab with sections (its settings, its computer)
7
+ * shows them as tabs of its own under it. The tab (or section) last chosen
8
+ * opens next time. Where tabs don't all fit, the others show as icons.
8
9
  */
9
10
  import { type ReactNode } from "react";
10
11
  import type { ViewContext } from "../../../../../runtime/mod.js";
@@ -4,13 +4,15 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
4
4
  * shell's `panel`): its name, a link to its page, and its tabs, compact:
5
5
  * the same Views as on its page, with hints `{ in, mode: "panel" }`, each
6
6
  * read only once chosen (and kept while the panel is open, so a terminal
7
- * keeps what it showed). The tab last chosen opens next time. Where tabs
8
- * don't all fit, the others show as icons.
7
+ * keeps what it showed). A tab with sections (its settings, its computer)
8
+ * shows them as tabs of its own under it. The tab (or section) last chosen
9
+ * opens next time. Where tabs don't all fit, the others show as icons.
9
10
  */
10
11
  import { useEffect, useId, useState } from "react";
11
12
  import { Avatar, Icon, IconButton, keep, kept, LazyView, Skeleton, Tabs, } from "../../../../../hosts/web/mod.js";
12
13
  import { STYLE } from "./style.js";
13
- import { chosen, spacePath, tabsOf } from "./tabs.js";
14
+ import { TabSections } from "./sections.js";
15
+ import { chosen, sectionOf, spacePath, tabsOf } from "./tabs.js";
14
16
  import { ownersOf, spaceName } from "./who.js";
15
17
  import { namesIn } from "../../shared/names.js";
16
18
  export const spacePanelView = (item, ctx) => {
@@ -30,25 +32,38 @@ function SpacePanel({ space, tabs, viewer = "", names }) {
30
32
  const key = `copilotz-space-panel-tab:${viewer}`;
31
33
  const [asked, setAsked] = useState(() => kept(key) ?? undefined);
32
34
  const tab = chosen(tabs, asked);
33
- const [opened, setOpened] = useState(() => tab ? [tab.key] : []);
35
+ const section = sectionOf(tab, asked);
36
+ // What's shown: the tab's own View, or its section.
37
+ const shown = section ?? tab;
38
+ const [opened, setOpened] = useState(() => shown ? [shown.key] : []);
34
39
  useEffect(() => {
35
- if (tab && !opened.includes(tab.key))
36
- setOpened([...opened, tab.key]);
37
- }, [tab?.key]);
40
+ if (shown && !opened.includes(shown.key))
41
+ setOpened([...opened, shown.key]);
42
+ }, [shown?.key]);
43
+ const pick = (next) => {
44
+ setAsked(next);
45
+ keep(key, next);
46
+ };
38
47
  const id = useId();
39
48
  const personal = space.kind === "personal";
40
49
  const name = spaceName(space, viewer, names);
41
50
  return (_jsxs("section", { className: "space-panel", "aria-label": `${name}, beside this chat`, children: [_jsxs("header", { className: "space-panel-head", children: [personal
42
51
  ? (_jsx("span", { className: "space-panel-mark", children: _jsx(Icon, { name: "person", size: 14 }) }))
43
- : _jsx(Avatar, { name: space.name, kind: "space", size: 26 }), _jsxs("div", { className: "space-panel-titles", children: [_jsx("h2", { children: name }), _jsx("span", { children: personal ? "Just you" : "Shared space" })] }), _jsx(IconButton, { icon: "external", label: `Open ${name}'s page`, size: "sm", href: spacePath(space._id, tab?.key) })] }), tabs.length > 1
44
- ? (_jsx(Tabs, { label: `${name}'s tabs`, className: "space-panel-tabs", value: tab?.key ?? "", panel: `${id}-tab`, onChange: (next) => {
45
- setAsked(next);
46
- keep(key, next);
47
- }, tabs: tabs.map((t) => ({
52
+ : _jsx(Avatar, { name: space.name, kind: "space", size: 26 }), _jsxs("div", { className: "space-panel-titles", children: [_jsx("h2", { children: name }), _jsx("span", { children: personal ? "Just you" : "Shared space" })] }), _jsx(IconButton, { icon: "external", label: `Open ${name}'s page`, size: "sm", href: spacePath(space._id, shown?.key, shown?.key === tab?.key) })] }), tabs.length > 1
53
+ ? (_jsx(Tabs, { label: `${name}'s tabs`, className: "space-panel-tabs", value: tab?.key ?? "", panel: `${id}-tab`, onChange: pick, tabs: tabs.map((t) => ({
48
54
  value: t.key,
49
55
  label: _jsx("span", { className: "space-panel-tab-label", children: t.title }),
50
56
  ...(t.icon ? { icon: t.icon } : {}),
51
57
  title: t.title,
52
58
  })) }))
53
- : null, _jsx("div", { id: `${id}-tab`, role: "tabpanel", className: "space-panel-body", children: tabs.filter((t) => opened.includes(t.key)).map((t) => (_jsx("div", { className: "space-panel-tab", hidden: t.key !== tab?.key, children: _jsx(LazyView, { kind: t.view, item: { _id: space._id }, hints: { in: space._id, mode: "panel" } }) }, t.key))) })] }));
59
+ : null, _jsx("div", { id: `${id}-tab`, role: "tabpanel", className: "space-panel-body", children: tabs.map((t) => {
60
+ // Each part read once chosen, then kept (hidden) while the panel stays.
61
+ const parts = [t, ...t.sections].filter((p) => opened.includes(p.key));
62
+ if (!parts.length)
63
+ return null;
64
+ const views = parts.map((p) => (_jsx("div", { className: "space-panel-tab", hidden: p.key !== shown?.key, children: _jsx(LazyView, { kind: p.view, item: { _id: space._id }, hints: { in: space._id, mode: "panel" } }) }, p.key)));
65
+ return (_jsx("div", { className: "space-panel-part", hidden: t.key !== tab?.key, children: t.sections.length
66
+ ? (_jsx(TabSections, { tab: t, ...(t.key === tab?.key && section ? { section } : {}), picked: true, menu: "top", onPick: pick, children: views }))
67
+ : views }, t.key));
68
+ }) })] }));
54
69
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A tab's sections (the tabs `under` it, see contract.ts), around the one
3
+ * shown: the tab's own View first (named `own`: "General"), then each
4
+ * section, those of a `group` under its heading ("Channels").
5
+ *
6
+ * - `side` (the space's settings, on its page): a menu beside, as settings
7
+ * pages have. Where there's no room for both (a phone), the menu is a list
8
+ * to tap into, and a section, once chosen, says how to get back to it.
9
+ * - `top` (the computer's, and every tab's in the side panel): tabs above.
10
+ *
11
+ * On the page each is a link (`href`, and `onPick` for the keyboard's
12
+ * arrows); in the panel, a choice (`onPick`).
13
+ */
14
+ import type { ReactNode } from "react";
15
+ import type { ShownTab } from "./tabs.js";
16
+ export declare function TabSections({ tab, section, picked, menu, href, back, onPick, counts, children }: {
17
+ tab: ShownTab;
18
+ /** The section shown; none: the tab's own View. */
19
+ section?: ShownTab;
20
+ /** Whether the address chose what's shown (a phone shows the list until it does). */
21
+ picked: boolean;
22
+ menu: "side" | "top";
23
+ href?: (key: string) => string;
24
+ /** Where the menu is, to get back to it (where a phone lists it). */
25
+ back?: string;
26
+ onPick?: (key: string) => void;
27
+ /** What waits on someone, by section (who asked to join). */
28
+ counts?: Record<string, number>;
29
+ /** What's shown: the section's View, or the tab's own. */
30
+ children: ReactNode;
31
+ }): ReactNode;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Badge, Icon, NavItem, Tabs } from "../../../../../hosts/web/mod.js";
3
+ export function TabSections({ tab, section, picked, menu, href, back, onPick, counts = {}, children }) {
4
+ const items = [{ ...tab, title: tab.own ?? tab.title, group: undefined }, ...tab.sections];
5
+ const current = section ?? items[0];
6
+ if (menu === "top") {
7
+ return (_jsxs("div", { className: "space-sections space-sections-top", children: [_jsx(Tabs, { label: `${tab.title}: its parts`, className: "space-sections-tabs", value: current.key, onChange: (key) => onPick?.(key), tabs: items.map((item) => ({
8
+ value: item.key,
9
+ label: item.title,
10
+ ...(item.icon ? { icon: item.icon } : {}),
11
+ ...(counts[item.key] ? { count: counts[item.key] } : {}),
12
+ ...(href ? { href: href(item.key) } : {}),
13
+ })) }), _jsx("div", { className: "space-sections-body", children: children })] }));
14
+ }
15
+ return (_jsx("div", { className: "space-sections", children: _jsxs("div", { className: "space-sections-side", "data-picked": picked, children: [_jsx("nav", { className: "space-sections-menu", "aria-label": tab.title, children: items.map((item, i) => (_jsxs("div", { className: "space-sections-item", children: [item.group && item.group !== items[i - 1]?.group
16
+ ? _jsx("p", { className: "space-sections-group", children: item.group })
17
+ : null, _jsx(NavItem, { ...(href ? { href: href(item.key) } : { onClick: () => onPick?.(item.key) }), ...(item.icon ? { icon: item.icon } : {}), ...(item.key === current.key ? { current: "page" } : {}), end: counts[item.key]
18
+ ? _jsx(Badge, { tone: "primary", children: counts[item.key] })
19
+ : _jsx(Icon, { name: "chevron", size: 16, className: "space-sections-chevron" }), children: item.title })] }, item.key))) }), _jsxs("div", { className: "space-sections-body", children: [_jsxs("div", { className: "space-sections-back", children: [back
20
+ ? (_jsxs("a", { href: back, className: "space-sections-back-link", children: [_jsx(Icon, { name: "chevron-left", size: 16 }), tab.title] }))
21
+ : null, _jsx("h2", { className: "space-sections-title", children: current.title })] }), children] })] }) }));
22
+ }
@@ -3,8 +3,10 @@
3
3
  * renamed in place by those who manage it; Personal or shared; its people;
4
4
  * inviting someone; a new chat there), then its tabs, which front ends add
5
5
  * (`spaceTabs`, see contract.ts): the one the address asks for
6
- * (`?tab=computer`), the first otherwise, each a link. The tab's View gets
7
- * the space (`{ _id }`) and hints `{ in, mode: "page" }`. An archived space
6
+ * (`?tab=computer`), the first otherwise, each a link. A tab with sections
7
+ * (its settings, its computer) shows them around the one asked for
8
+ * (`?tab=memories` opens Settings at Memories; see sections.tsx). The View
9
+ * shown gets the space (`{ _id }`) and hints `{ in, mode: "page" }`. An archived space
8
10
  * says so, calmly, over its tabs, with Restore for those who manage it. A
9
11
  * space the person doesn't reach says so.
10
12
  */
@@ -4,8 +4,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
4
4
  * renamed in place by those who manage it; Personal or shared; its people;
5
5
  * inviting someone; a new chat there), then its tabs, which front ends add
6
6
  * (`spaceTabs`, see contract.ts): the one the address asks for
7
- * (`?tab=computer`), the first otherwise, each a link. The tab's View gets
8
- * the space (`{ _id }`) and hints `{ in, mode: "page" }`. An archived space
7
+ * (`?tab=computer`), the first otherwise, each a link. A tab with sections
8
+ * (its settings, its computer) shows them around the one asked for
9
+ * (`?tab=memories` opens Settings at Memories; see sections.tsx). The View
10
+ * shown gets the space (`{ _id }`) and hints `{ in, mode: "page" }`. An archived space
9
11
  * says so, calmly, over its tabs, with Restore for those who manage it. A
10
12
  * space the person doesn't reach says so.
11
13
  */
@@ -13,7 +15,8 @@ import { useState } from "react";
13
15
  import { Button, EmptyState, go, message, Notice, Page, Skeleton, Tabs, Title, } from "../../../../../hosts/web/mod.js";
14
16
  import { SpaceHeader } from "./header.js";
15
17
  import { STYLE } from "./style.js";
16
- import { chosen, spacePath, tabsOf } from "./tabs.js";
18
+ import { TabSections } from "./sections.js";
19
+ import { chosen, sectionOf, spacePath, tabsOf } from "./tabs.js";
17
20
  import { ownersOf, spaceName } from "./who.js";
18
21
  import { namesIn } from "../../shared/names.js";
19
22
  export const spaceView = (item, ctx) => {
@@ -33,8 +36,12 @@ export const spaceView = (item, ctx) => {
33
36
  const tabs = tabsOf(ctx.resources.spaceTabs);
34
37
  const query = (ctx.hints.query ?? {});
35
38
  const tab = chosen(tabs, query.tab);
39
+ const section = sectionOf(tab, query.tab);
36
40
  const manage = space.can.includes("manage");
37
41
  const waiting = manage ? (requests ?? []).length : 0;
42
+ // Who's waiting to join, on what lets them in (and on the tab it's in).
43
+ const counts = waiting ? { members: waiting } : {};
44
+ const countOf = (t) => (counts[t.key] ?? 0) + t.sections.reduce((n, s) => n + (counts[s.key] ?? 0), 0);
38
45
  // Its people by name, and whose it is (someone else's Personal).
39
46
  const names = namesIn(ctx, [
40
47
  ...members.map((m) => m.member),
@@ -45,10 +52,13 @@ export const spaceView = (item, ctx) => {
45
52
  value: t.key,
46
53
  label: t.title,
47
54
  ...(t.icon ? { icon: t.icon } : {}),
48
- // Who's waiting to join, on the tab that lets them in.
49
- ...(t.key === "members" && waiting ? { count: waiting } : {}),
55
+ ...(countOf(t) ? { count: countOf(t) } : {}),
50
56
  href: spacePath(id, t.key),
51
- })) }), _jsx("div", { id: "space-tab", role: "tabpanel", className: "space-tab", "data-tab": tab?.key, children: tab ? ctx.show(tab.view, { _id: id }, { in: id, mode: "page" }) : null })] }))
57
+ })) }), _jsx("div", { id: "space-tab", role: "tabpanel", className: "space-tab", "data-tab": section?.key ?? tab?.key, children: tab && tab.sections.length
58
+ ? (_jsx(TabSections, { tab: tab, ...(section ? { section } : {}), picked: !!section || query.open === "1", menu: tab.menu ?? "top", href: (key) => spacePath(id, key, key === tab.key), back: spacePath(id, tab.key), onPick: (key) => go(spacePath(id, key, key === tab.key)), counts: counts, children: ctx.show((section ?? tab).view, { _id: id }, { in: id, mode: "page" }) }))
59
+ : tab
60
+ ? ctx.show(tab.view, { _id: id }, { in: id, mode: "page" })
61
+ : null })] }))
52
62
  : (_jsx(EmptyState, { icon: "info", title: "Nothing here yet", className: "space-empty", children: "This app adds nothing to a space's page." }))] }));
53
63
  };
54
64
  /** An archived space, said calmly: still readable, listed apart; Restore for those who manage it. */
@@ -6,4 +6,4 @@
6
6
  * the org's sections (About, Members). Only layout: the pieces are the
7
7
  * toolkit's.
8
8
  */
9
- export declare const STYLE = "\n/* The sidebar: spaces as a tree */\n.spaces { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }\n.spaces-item { display: grid; }\n.spaces-row { position: relative; }\n.spaces-row > .copilotz-nav-item { padding-right: 36px; }\n.spaces-fold { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); color: var(--muted-foreground); }\n.spaces-fold .copilotz-icon { transition: transform .15s; }\n.spaces-fold[aria-expanded=true] .copilotz-icon { transform: rotate(90deg); }\n.spaces-under { position: relative; display: grid; margin: 1px 0 8px 20px; padding-left: 10px; }\n.spaces-under::before { content: \"\"; position: absolute; top: 3px; bottom: 3px; left: 0; width: 1px;\n background: var(--sidebar-border); }\n.spaces-under > .copilotz-loading { min-height: 32px; padding: 6px; }\n.spaces-personal, .spaces-new-icon { display: grid; place-items: center; flex: none; width: 22px; height: 22px;\n border-radius: var(--radius-full); background: var(--muted); color: var(--secondary-foreground); }\n.spaces [aria-current] .spaces-personal { background: var(--card); color: var(--primary-text); }\n.spaces-new-icon { border: 1px dashed var(--input); border-radius: var(--radius-sm); background: transparent; }\n.spaces-form { margin-top: 2px; }\n.spaces-error { margin: 6px 10px 0; color: var(--destructive-text); font-size: 12.5px; }\n.spaces-archived { display: grid; margin-top: 4px; }\n.spaces-archived-icon { display: grid; place-items: center; flex: none; width: 22px; height: 22px; }\n.spaces-archived-end { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }\n.spaces-archived-end .copilotz-icon { transition: transform .15s; }\n.spaces-archived[data-open] .spaces-archived-end .copilotz-icon { transform: rotate(90deg); }\n.spaces-archived-list { margin: 1px 0 6px 12px; }\n.spaces-archived-list .copilotz-avatar { opacity: .75; }\n\n/* Invitations to you: in the sidebar, and on home */\n.invitations { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }\n.invitation { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;\n padding: 14px 14px 14px 16px; border-color: var(--primary-border);\n background: color-mix(in oklab, var(--primary-soft) 45%, var(--card)); animation: invitation-in .3s ease-out; }\n@keyframes invitation-in { from { opacity: 0; transform: translateY(-4px); } }\n.invitation-compact { grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px;\n margin: 2px 0 4px; padding: 11px 12px; }\n.invitation-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-full);\n background: var(--primary-soft); color: var(--primary-text); }\n.invitation-text { display: grid; gap: 2px; min-width: 0; }\n.invitation-title { margin: 0; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }\n.invitation-compact .invitation-title { font-size: 13.5px; }\n.invitation-title b { font-weight: 650; }\n.invitation-meta { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45;\n overflow-wrap: anywhere; }\n.invitation-answers { display: flex; flex-wrap: wrap; gap: 6px; }\n.invitation-compact .invitation-answers { margin-top: 8px; }\n@media (max-width: 600px) {\n .invitation:not(.invitation-compact) { grid-template-columns: auto minmax(0, 1fr); }\n .invitation:not(.invitation-compact) .invitation-answers { grid-column: 2; }\n}\n\n/* A space's page */\n.space-mark-personal { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-lg);\n background: var(--primary-soft); color: var(--primary-text); }\n.space-rename { color: var(--muted-foreground); }\n.space-faces { display: flex; align-items: center; padding: 0 4px 0 6px; border-radius: var(--radius-full);\n text-decoration: none; }\n.space-faces > * { margin-left: -6px; outline: 2px solid var(--background); }\n.space-faces-more { min-width: 28px; min-height: 28px; }\n.space-narrow { display: none; }\n.space-tabs { position: sticky; top: 0; z-index: 4; display: flex; width: 100%; margin-top: -2px;\n background: var(--background); -webkit-mask-image: linear-gradient(to right, currentColor calc(100% - 24px), transparent);\n mask-image: linear-gradient(to right, currentColor calc(100% - 24px), transparent); }\n.space-tabs .copilotz-tab { padding: 0 10px; }\n.space-tab { padding-top: 22px; }\n.space-loading { display: grid; gap: 14px; margin-top: 8px; }\n.space-missing { display: grid; place-items: center; padding: 32px; }\n.space-empty { margin-top: 48px; }\n.space-archived { margin: -4px 0 18px; }\n@container copilotz-page (max-width: 640px) {\n .space-wide, .space-faces { display: none; }\n .space-narrow { display: inline-grid; }\n .space-mark { --size: 36px !important; }\n .space-mark-personal { width: 36px; height: 36px; border-radius: var(--radius-md); }\n}\n@media (max-width: 760px) {\n .space-tabs { position: static; }\n}\n\n/* Members, and inviting people */\n.space-members, .space-settings, .space-inviting { container: space-tab / inline-size; display: grid; gap: 24px; }\n.space-inviting { gap: 16px; }\n.space-inviting-kind { display: grid; gap: 22px; }\n.space-members-compact, .space-settings-compact { gap: 18px; }\n.space-section { display: grid; gap: 10px; }\n.space-section-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground);\n font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }\n.space-count { font-variant-numeric: tabular-nums; letter-spacing: 0; }\n.space-rows { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }\n.space-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px;\n padding: 10px 10px 10px 14px; }\n.space-row-asking { border-color: var(--warning-border); }\n.space-row-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md);\n background: var(--primary-soft); color: var(--primary-text); }\n.space-row-text { display: grid; gap: 1px; min-width: 0; }\n.space-row-name { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-weight: 620; }\n.space-row-name .copilotz-time { color: var(--muted-foreground); font-size: 12px; font-weight: 450; }\n.space-row-what { margin: 0; overflow: hidden; color: var(--muted-foreground); font-size: 12.5px;\n text-overflow: ellipsis; white-space: nowrap; }\n.space-row-end { display: flex; align-items: center; gap: 6px; }\n.space-row-end > .copilotz-select { min-width: 116px; }\n.space-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;\n min-height: 30px; margin-bottom: -4px; }\n.space-section-head .copilotz-button { margin-right: -6px; }\n.space-section-about { margin: -2px 2px 2px; color: var(--muted-foreground); font-size: 13px; line-height: 1.5; }\n\n/* Agents among the members */\n.space-row-face { display: grid; }\n.space-row-link { min-width: 0; overflow: hidden; color: inherit; text-decoration: none; text-overflow: ellipsis;\n white-space: nowrap; }\n.space-row-link:hover { text-decoration: underline; text-underline-offset: 3px;\n text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }\n.space-row-handle { flex: none; color: var(--muted-foreground); font: 500 12.5px var(--font-mono); }\n.space-row-name .copilotz-badge { flex: none; }\n.space-row-agent[aria-busy] { opacity: .7; }\n.space-agents-none { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;\n padding: 14px 16px; border-style: dashed; box-shadow: none; background: transparent; }\n.space-agents-none p { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }\n.space-invite { display: grid; gap: 7px; }\n.space-invite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }\n.space-invite-row > .copilotz-select { min-width: 128px; }\n.space-invite-note { margin: 0 2px; color: var(--muted-foreground); font-size: 12.5px; }\n.space-invite-note > span { display: inline-flex; align-items: center; gap: 6px; }\n.space-row-mail { border-radius: var(--radius-full); background: var(--muted); color: var(--muted-foreground); }\n.space-row-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.space-invite-error { color: var(--destructive-text); }\n.space-invite-done { color: var(--success-text); }\n@container space-tab (max-width: 520px) {\n .space-row { gap: 10px; padding-left: 12px; }\n .space-row-agent { grid-template-columns: 32px minmax(0, 1fr); }\n .space-row-agent .space-row-end { grid-column: 2; }\n .space-row-agent .space-row-handle { display: none; }\n .space-row-asking { grid-template-columns: 32px minmax(0, 1fr); }\n .space-row-asking .space-row-end { grid-column: 1 / -1; flex-wrap: wrap; }\n .space-invite-row { grid-template-columns: minmax(0, 1fr) auto; }\n .space-invite-row > .copilotz-input { grid-column: 1 / -1; }\n}\n@container space-tab (max-width: 340px) {\n .space-row { grid-template-columns: 32px minmax(0, 1fr); }\n .space-row-end { grid-column: 2; }\n}\n\n/* A message naming agents that don't answer here: over where you type */\n.space-not-here-title { display: inline-flex; align-items: center; gap: 8px; }\n.space-not-here-faces { display: inline-flex; }\n.space-not-here-faces > * + * { margin-left: -5px; outline: 2px solid var(--info-soft); }\n@media (max-width: 760px) {\n .space-not-here { flex-wrap: wrap; }\n .space-not-here .copilotz-notice-body { flex-basis: calc(100% - 30px); }\n .space-not-here .copilotz-notice-action { width: 100%; justify-content: flex-end; margin: 2px 0 0; }\n}\n\n/* Settings */\n.space-setting-list { display: grid; }\n.space-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 400px); align-items: start;\n gap: 10px 32px; padding: 18px 20px; }\n.space-setting + .space-setting { border-top: 1px solid var(--border); }\n.space-setting h3 { margin: 0 0 3px; font-size: 14.5px; font-weight: 650; }\n.space-setting-text { margin: 0; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5; }\n.space-setting-control { display: grid; justify-items: start; min-width: 0; }\n.space-setting-form { display: grid; gap: 6px; width: 100%; }\n.space-setting-inline { display: flex; gap: 8px; }\n.space-setting-inline > .copilotz-input { flex: 1; min-width: 0; }\n.space-setting-control > .copilotz-input { width: 100%; }\n.space-setting-form > .copilotz-select { width: 100%; }\n.space-setting-note { display: flex; align-items: center; gap: 6px; margin: 0 2px; font-size: 12.5px; }\n.space-setting-about { display: grid; gap: 14px; padding: 18px 20px; }\n.space-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 22px; margin: 0;\n font-size: 14px; }\n.space-facts dt { color: var(--muted-foreground); }\n.space-facts dd { min-width: 0; margin: 0; }\n.space-facts-id { display: flex; align-items: center; gap: 6px; }\n.space-facts-id code { min-width: 0; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }\n.space-archive-means { display: grid; gap: 10px; margin: 0; padding: 0 0 0 18px; color: var(--secondary-foreground);\n font-size: 14px; line-height: 1.5; }\n.space-archive-means b { color: var(--foreground); font-weight: 620; }\n.space-archive-means + .copilotz-notice { margin-top: 14px; }\n@container space-tab (max-width: 620px) {\n .space-setting { grid-template-columns: minmax(0, 1fr); padding: 16px; }\n .space-setting-control { justify-items: stretch; }\n}\n\n/* In the side panel */\n.space-panel { container: space-panel / inline-size; display: flex; flex-direction: column; height: 100%; min-height: 0; }\n.space-panel-head { flex: none; display: flex; align-items: center; gap: 10px; min-height: 58px;\n padding: 9px max(10px, var(--copilotz-inset-end, 0px)) 9px 16px; border-bottom: 1px solid var(--border); }\n.space-panel-mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px;\n border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-text); }\n.space-panel-titles { flex: 1; display: grid; min-width: 0; line-height: 1.25; }\n.space-panel-titles h2 { margin: 0; overflow: hidden; font-family: var(--font-display); font-size: 15px;\n font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }\n.space-panel-titles span { color: var(--muted-foreground); font-size: 12px; }\n.space-panel-tabs { flex: none; align-self: flex-start; max-width: calc(100% - 24px); margin: 10px 12px 0; }\n.space-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;\n scrollbar-color: var(--input) transparent; }\n.space-panel-tab { min-height: 100%; padding: 14px 14px 20px; }\n.space-panel-tab[hidden] { display: none; }\n.space-panel-missing { padding: 24px; color: var(--muted-foreground); }\n@container space-panel (max-width: 560px) {\n .space-panel-tabs .copilotz-tab[aria-selected=false] { padding: 0 9px; }\n .space-panel-tabs .copilotz-tab[aria-selected=false] .space-panel-tab-label { position: absolute; width: 1px;\n height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n}\n\n/* The org's sections: its people, and what it is */\n.org-row { grid-template-columns: 34px minmax(0, 1fr) auto; }\n.org-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.org-row-spacer { width: 30px; }\n.org-row .space-row-end > .copilotz-badge { min-width: 116px; justify-content: center; }\n.org-note { margin: -8px 0 0; }\n.org-remove { display: grid; gap: 18px; }\n.org-remove-means { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; color: var(--secondary-foreground);\n font-size: 14px; line-height: 1.5; }\n.org-remove-means li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }\n.org-remove-means .copilotz-icon { margin-top: 3px; color: var(--muted-foreground); }\n.org-about-role { display: inline-flex; padding-top: 4px; }\n.org-about-role .copilotz-badge { gap: 4px; font-size: 12.5px; padding: 3px 10px; }\n.org-about-roles { display: grid; gap: 6px; color: var(--secondary-foreground); line-height: 1.5; }\n.org-about-roles b { color: var(--foreground); font-weight: 620; }\n.org-about-sees .copilotz-notice-body { line-height: 1.55; }\n@container space-tab (max-width: 520px) {\n .org-row { grid-template-columns: 34px minmax(0, 1fr); }\n .org-row .space-row-end { grid-column: 2; }\n}\n";
9
+ export declare const STYLE = "\n/* The sidebar: spaces as a tree */\n.spaces { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }\n.spaces-item { display: grid; }\n.spaces-row { position: relative; }\n.spaces-row > .copilotz-nav-item { padding-right: 36px; }\n.spaces-fold { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); color: var(--muted-foreground); }\n.spaces-fold .copilotz-icon { transition: transform .15s; }\n.spaces-fold[aria-expanded=true] .copilotz-icon { transform: rotate(90deg); }\n.spaces-under { position: relative; display: grid; margin: 1px 0 8px 20px; padding-left: 10px; }\n.spaces-under::before { content: \"\"; position: absolute; top: 3px; bottom: 3px; left: 0; width: 1px;\n background: var(--sidebar-border); }\n.spaces-under > .copilotz-loading { min-height: 32px; padding: 6px; }\n.spaces-personal, .spaces-new-icon { display: grid; place-items: center; flex: none; width: 22px; height: 22px;\n border-radius: var(--radius-full); background: var(--muted); color: var(--secondary-foreground); }\n.spaces [aria-current] .spaces-personal { background: var(--card); color: var(--primary-text); }\n.spaces-new-icon { border: 1px dashed var(--input); border-radius: var(--radius-sm); background: transparent; }\n.spaces-form { margin-top: 2px; }\n.spaces-error { margin: 6px 10px 0; color: var(--destructive-text); font-size: 12.5px; }\n.spaces-archived { display: grid; margin-top: 4px; }\n.spaces-archived-icon { display: grid; place-items: center; flex: none; width: 22px; height: 22px; }\n.spaces-archived-end { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }\n.spaces-archived-end .copilotz-icon { transition: transform .15s; }\n.spaces-archived[data-open] .spaces-archived-end .copilotz-icon { transform: rotate(90deg); }\n.spaces-archived-list { margin: 1px 0 6px 12px; }\n.spaces-archived-list .copilotz-avatar { opacity: .75; }\n\n/* Invitations to you: in the sidebar, and on home */\n.invitations { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }\n.invitation { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;\n padding: 14px 14px 14px 16px; border-color: var(--primary-border);\n background: color-mix(in oklab, var(--primary-soft) 45%, var(--card)); animation: invitation-in .3s ease-out; }\n@keyframes invitation-in { from { opacity: 0; transform: translateY(-4px); } }\n.invitation-compact { grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px;\n margin: 2px 0 4px; padding: 11px 12px; }\n.invitation-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-full);\n background: var(--primary-soft); color: var(--primary-text); }\n.invitation-text { display: grid; gap: 2px; min-width: 0; }\n.invitation-title { margin: 0; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }\n.invitation-compact .invitation-title { font-size: 13.5px; }\n.invitation-title b { font-weight: 650; }\n.invitation-meta { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45;\n overflow-wrap: anywhere; }\n.invitation-answers { display: flex; flex-wrap: wrap; gap: 6px; }\n.invitation-compact .invitation-answers { margin-top: 8px; }\n@media (max-width: 600px) {\n .invitation:not(.invitation-compact) { grid-template-columns: auto minmax(0, 1fr); }\n .invitation:not(.invitation-compact) .invitation-answers { grid-column: 2; }\n}\n\n/* A space's page */\n.space-mark-personal { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-lg);\n background: var(--primary-soft); color: var(--primary-text); }\n.space-rename { color: var(--muted-foreground); }\n.space-faces { display: flex; align-items: center; padding: 0 4px 0 6px; border-radius: var(--radius-full);\n text-decoration: none; }\n.space-faces > * { margin-left: -6px; outline: 2px solid var(--background); }\n.space-faces-more { min-width: 28px; min-height: 28px; }\n.space-narrow { display: none; }\n.space-tabs { position: sticky; top: 0; z-index: 4; display: flex; width: 100%; margin-top: -2px;\n background: var(--background); -webkit-mask-image: linear-gradient(to right, currentColor calc(100% - 24px), transparent);\n mask-image: linear-gradient(to right, currentColor calc(100% - 24px), transparent); }\n.space-tabs .copilotz-tab { padding: 0 10px; }\n.space-tab { padding-top: 22px; }\n.space-loading { display: grid; gap: 14px; margin-top: 8px; }\n.space-missing { display: grid; place-items: center; padding: 32px; }\n.space-empty { margin-top: 48px; }\n.space-archived { margin: -4px 0 18px; }\n@container copilotz-page (max-width: 640px) {\n .space-wide, .space-faces { display: none; }\n .space-narrow { display: inline-grid; }\n .space-mark { --size: 36px !important; }\n .space-mark-personal { width: 36px; height: 36px; border-radius: var(--radius-md); }\n}\n@media (max-width: 760px) {\n .space-tabs { position: static; }\n}\n\n/* A tab's sections (sections.tsx): a menu beside them (settings), or tabs above (the computer's) */\n.space-sections { container: space-sections / inline-size; }\n.space-sections-side { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: start; }\n.space-sections-menu { position: sticky; top: 60px; display: grid; gap: 2px; }\n.space-sections-group { margin: 14px 0 4px; padding: 0 10px; color: var(--muted-foreground);\n font-family: var(--font-display); font-size: 11.5px; font-weight: 650; letter-spacing: .08em;\n text-transform: uppercase; }\n.space-sections-chevron { display: none; color: var(--muted-foreground); }\n.space-sections-body { min-width: 0; }\n.space-sections-back { display: none; }\n.space-sections-back-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -6px;\n padding-right: 8px; color: var(--muted-foreground); font-size: 14px; text-decoration: none; }\n.space-sections-back-link:hover { color: var(--foreground); }\n.space-sections-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 640;\n letter-spacing: -.01em; }\n.space-sections-top { display: grid; gap: 20px; }\n.space-sections-tabs { justify-self: start; }\n/* Without room for both (a phone): the menu is a list to tap into; a section says how to get back */\n@container space-sections (max-width: 640px) {\n .space-sections-side { grid-template-columns: minmax(0, 1fr); gap: 0; }\n .space-sections-side[data-picked=false] .space-sections-body,\n .space-sections-side[data-picked=true] .space-sections-menu { display: none; }\n .space-sections-menu { position: static; gap: 0; }\n .space-sections-menu .copilotz-nav-item { min-height: 52px; padding: 8px 12px; font-size: 15px; }\n .space-sections-chevron { display: inline-flex; }\n /* Listed, nothing is open yet: none looks chosen */\n .space-sections-side[data-picked=false] .copilotz-nav-item[aria-current] { border-color: transparent;\n background: transparent; box-shadow: none; }\n .space-sections-side[data-picked=false] .copilotz-nav-item[aria-current] .copilotz-nav-label { font-weight: inherit; }\n .space-sections-side[data-picked=true] .space-sections-back { display: grid; gap: 4px; margin: -12px 0 18px; }\n}\n\n/* Members, and inviting people */\n.space-members, .space-settings, .space-inviting { container: space-tab / inline-size; display: grid; gap: 24px; }\n.space-inviting { gap: 16px; }\n.space-inviting-kind { display: grid; gap: 22px; }\n.space-members-compact, .space-settings-compact { gap: 18px; }\n.space-section { display: grid; gap: 10px; }\n.space-section-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground);\n font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }\n.space-count { font-variant-numeric: tabular-nums; letter-spacing: 0; }\n.space-rows { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }\n.space-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px;\n padding: 10px 10px 10px 14px; }\n.space-row-asking { border-color: var(--warning-border); }\n.space-row-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md);\n background: var(--primary-soft); color: var(--primary-text); }\n.space-row-text { display: grid; gap: 1px; min-width: 0; }\n.space-row-name { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-weight: 620; }\n.space-row-name .copilotz-time { color: var(--muted-foreground); font-size: 12px; font-weight: 450; }\n.space-row-what { margin: 0; overflow: hidden; color: var(--muted-foreground); font-size: 12.5px;\n text-overflow: ellipsis; white-space: nowrap; }\n.space-row-end { display: flex; align-items: center; gap: 6px; }\n.space-row-end > .copilotz-select { min-width: 116px; }\n.space-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;\n min-height: 30px; margin-bottom: -4px; }\n.space-section-head .copilotz-button { margin-right: -6px; }\n.space-section-about { margin: -2px 2px 2px; color: var(--muted-foreground); font-size: 13px; line-height: 1.5; }\n\n/* Agents among the members */\n.space-row-face { display: grid; }\n.space-row-link { min-width: 0; overflow: hidden; color: inherit; text-decoration: none; text-overflow: ellipsis;\n white-space: nowrap; }\n.space-row-link:hover { text-decoration: underline; text-underline-offset: 3px;\n text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }\n.space-row-handle { flex: none; color: var(--muted-foreground); font: 500 12.5px var(--font-mono); }\n.space-row-name .copilotz-badge { flex: none; }\n.space-row-agent[aria-busy] { opacity: .7; }\n.space-agents-none { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;\n padding: 14px 16px; border-style: dashed; box-shadow: none; background: transparent; }\n.space-agents-none p { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }\n.space-invite { display: grid; gap: 7px; }\n.space-invite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }\n.space-invite-row > .copilotz-select { min-width: 128px; }\n.space-invite-note { margin: 0 2px; color: var(--muted-foreground); font-size: 12.5px; }\n.space-invite-note > span { display: inline-flex; align-items: center; gap: 6px; }\n.space-row-mail { border-radius: var(--radius-full); background: var(--muted); color: var(--muted-foreground); }\n.space-row-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.space-invite-error { color: var(--destructive-text); }\n.space-invite-done { color: var(--success-text); }\n@container space-tab (max-width: 520px) {\n .space-row { gap: 10px; padding-left: 12px; }\n .space-row-agent { grid-template-columns: 32px minmax(0, 1fr); }\n .space-row-agent .space-row-end { grid-column: 2; }\n .space-row-agent .space-row-handle { display: none; }\n .space-row-asking { grid-template-columns: 32px minmax(0, 1fr); }\n .space-row-asking .space-row-end { grid-column: 1 / -1; flex-wrap: wrap; }\n .space-invite-row { grid-template-columns: minmax(0, 1fr) auto; }\n .space-invite-row > .copilotz-input { grid-column: 1 / -1; }\n}\n@container space-tab (max-width: 340px) {\n .space-row { grid-template-columns: 32px minmax(0, 1fr); }\n .space-row-end { grid-column: 2; }\n}\n\n/* A message naming agents that don't answer here: over where you type */\n.space-not-here-title { display: inline-flex; align-items: center; gap: 8px; }\n.space-not-here-faces { display: inline-flex; }\n.space-not-here-faces > * + * { margin-left: -5px; outline: 2px solid var(--info-soft); }\n@media (max-width: 760px) {\n .space-not-here { flex-wrap: wrap; }\n .space-not-here .copilotz-notice-body { flex-basis: calc(100% - 30px); }\n .space-not-here .copilotz-notice-action { width: 100%; justify-content: flex-end; margin: 2px 0 0; }\n}\n\n/* Settings */\n.space-setting-list { display: grid; }\n.space-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 400px); align-items: start;\n gap: 10px 32px; padding: 18px 20px; }\n.space-setting + .space-setting { border-top: 1px solid var(--border); }\n.space-setting h3 { margin: 0 0 3px; font-size: 14.5px; font-weight: 650; }\n.space-setting-text { margin: 0; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5; }\n.space-setting-control { display: grid; justify-items: start; min-width: 0; }\n.space-setting-form { display: grid; gap: 6px; width: 100%; }\n.space-setting-inline { display: flex; gap: 8px; }\n.space-setting-inline > .copilotz-input { flex: 1; min-width: 0; }\n.space-setting-control > .copilotz-input { width: 100%; }\n.space-setting-form > .copilotz-select { width: 100%; }\n.space-setting-note { display: flex; align-items: center; gap: 6px; margin: 0 2px; font-size: 12.5px; }\n.space-setting-about { display: grid; gap: 14px; padding: 18px 20px; }\n.space-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 22px; margin: 0;\n font-size: 14px; }\n.space-facts dt { color: var(--muted-foreground); }\n.space-facts dd { min-width: 0; margin: 0; }\n.space-facts-id { display: flex; align-items: center; gap: 6px; }\n.space-facts-id code { min-width: 0; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }\n.space-archive-means { display: grid; gap: 10px; margin: 0; padding: 0 0 0 18px; color: var(--secondary-foreground);\n font-size: 14px; line-height: 1.5; }\n.space-archive-means b { color: var(--foreground); font-weight: 620; }\n.space-archive-means + .copilotz-notice { margin-top: 14px; }\n@container space-tab (max-width: 620px) {\n .space-setting { grid-template-columns: minmax(0, 1fr); padding: 16px; }\n .space-setting-control { justify-items: stretch; }\n}\n\n/* In the side panel */\n.space-panel { container: space-panel / inline-size; display: flex; flex-direction: column; height: 100%; min-height: 0; }\n.space-panel-head { flex: none; display: flex; align-items: center; gap: 10px; min-height: 58px;\n padding: 9px max(10px, var(--copilotz-inset-end, 0px)) 9px 16px; border-bottom: 1px solid var(--border); }\n.space-panel-mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px;\n border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-text); }\n.space-panel-titles { flex: 1; display: grid; min-width: 0; line-height: 1.25; }\n.space-panel-titles h2 { margin: 0; overflow: hidden; font-family: var(--font-display); font-size: 15px;\n font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }\n.space-panel-titles span { color: var(--muted-foreground); font-size: 12px; }\n.space-panel-tabs { flex: none; align-self: flex-start; max-width: calc(100% - 24px); margin: 10px 12px 0; }\n.space-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;\n scrollbar-color: var(--input) transparent; }\n.space-panel-tab { min-height: 100%; padding: 14px 14px 20px; }\n.space-panel-tab[hidden] { display: none; }\n/* A tab with sections, in the panel: its own tabs, under the panel's */\n.space-panel-part { min-height: 100%; display: flex; flex-direction: column; }\n.space-panel-part[hidden] { display: none; }\n.space-panel-part > .space-sections-top { flex: 1; display: flex; flex-direction: column; gap: 0; }\n.space-panel-part .space-sections-tabs { flex: none; max-width: calc(100% - 28px); margin: 12px 14px 0; }\n.space-panel-part .space-sections-body { flex: 1; display: flex; flex-direction: column; }\n.space-panel-part .space-sections-body > .space-panel-tab { flex: 1; min-height: auto; }\n.space-panel-missing { padding: 24px; color: var(--muted-foreground); }\n@container space-panel (max-width: 560px) {\n .space-panel-tabs .copilotz-tab[aria-selected=false] { padding: 0 9px; }\n .space-panel-tabs .copilotz-tab[aria-selected=false] .space-panel-tab-label { position: absolute; width: 1px;\n height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n}\n\n/* The org's sections: its people, and what it is */\n.org-row { grid-template-columns: 34px minmax(0, 1fr) auto; }\n.org-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.org-row-spacer { width: 30px; }\n.org-row .space-row-end > .copilotz-badge { min-width: 116px; justify-content: center; }\n.org-note { margin: -8px 0 0; }\n.org-remove { display: grid; gap: 18px; }\n.org-remove-means { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; color: var(--secondary-foreground);\n font-size: 14px; line-height: 1.5; }\n.org-remove-means li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }\n.org-remove-means .copilotz-icon { margin-top: 3px; color: var(--muted-foreground); }\n.org-about-role { display: inline-flex; padding-top: 4px; }\n.org-about-role .copilotz-badge { gap: 4px; font-size: 12.5px; padding: 3px 10px; }\n.org-about-roles { display: grid; gap: 6px; color: var(--secondary-foreground); line-height: 1.5; }\n.org-about-roles b { color: var(--foreground); font-weight: 620; }\n.org-about-sees .copilotz-notice-body { line-height: 1.55; }\n@container space-tab (max-width: 520px) {\n .org-row { grid-template-columns: 34px minmax(0, 1fr); }\n .org-row .space-row-end { grid-column: 2; }\n}\n";
@@ -84,6 +84,38 @@ export const STYLE = `
84
84
  .space-tabs { position: static; }
85
85
  }
86
86
 
87
+ /* A tab's sections (sections.tsx): a menu beside them (settings), or tabs above (the computer's) */
88
+ .space-sections { container: space-sections / inline-size; }
89
+ .space-sections-side { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: start; }
90
+ .space-sections-menu { position: sticky; top: 60px; display: grid; gap: 2px; }
91
+ .space-sections-group { margin: 14px 0 4px; padding: 0 10px; color: var(--muted-foreground);
92
+ font-family: var(--font-display); font-size: 11.5px; font-weight: 650; letter-spacing: .08em;
93
+ text-transform: uppercase; }
94
+ .space-sections-chevron { display: none; color: var(--muted-foreground); }
95
+ .space-sections-body { min-width: 0; }
96
+ .space-sections-back { display: none; }
97
+ .space-sections-back-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -6px;
98
+ padding-right: 8px; color: var(--muted-foreground); font-size: 14px; text-decoration: none; }
99
+ .space-sections-back-link:hover { color: var(--foreground); }
100
+ .space-sections-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 640;
101
+ letter-spacing: -.01em; }
102
+ .space-sections-top { display: grid; gap: 20px; }
103
+ .space-sections-tabs { justify-self: start; }
104
+ /* Without room for both (a phone): the menu is a list to tap into; a section says how to get back */
105
+ @container space-sections (max-width: 640px) {
106
+ .space-sections-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
107
+ .space-sections-side[data-picked=false] .space-sections-body,
108
+ .space-sections-side[data-picked=true] .space-sections-menu { display: none; }
109
+ .space-sections-menu { position: static; gap: 0; }
110
+ .space-sections-menu .copilotz-nav-item { min-height: 52px; padding: 8px 12px; font-size: 15px; }
111
+ .space-sections-chevron { display: inline-flex; }
112
+ /* Listed, nothing is open yet: none looks chosen */
113
+ .space-sections-side[data-picked=false] .copilotz-nav-item[aria-current] { border-color: transparent;
114
+ background: transparent; box-shadow: none; }
115
+ .space-sections-side[data-picked=false] .copilotz-nav-item[aria-current] .copilotz-nav-label { font-weight: inherit; }
116
+ .space-sections-side[data-picked=true] .space-sections-back { display: grid; gap: 4px; margin: -12px 0 18px; }
117
+ }
118
+
87
119
  /* Members, and inviting people */
88
120
  .space-members, .space-settings, .space-inviting { container: space-tab / inline-size; display: grid; gap: 24px; }
89
121
  .space-inviting { gap: 16px; }
@@ -202,6 +234,13 @@ export const STYLE = `
202
234
  scrollbar-color: var(--input) transparent; }
203
235
  .space-panel-tab { min-height: 100%; padding: 14px 14px 20px; }
204
236
  .space-panel-tab[hidden] { display: none; }
237
+ /* A tab with sections, in the panel: its own tabs, under the panel's */
238
+ .space-panel-part { min-height: 100%; display: flex; flex-direction: column; }
239
+ .space-panel-part[hidden] { display: none; }
240
+ .space-panel-part > .space-sections-top { flex: 1; display: flex; flex-direction: column; gap: 0; }
241
+ .space-panel-part .space-sections-tabs { flex: none; max-width: calc(100% - 28px); margin: 12px 14px 0; }
242
+ .space-panel-part .space-sections-body { flex: 1; display: flex; flex-direction: column; }
243
+ .space-panel-part .space-sections-body > .space-panel-tab { flex: 1; min-height: auto; }
205
244
  .space-panel-missing { padding: 24px; color: var(--muted-foreground); }
206
245
  @container space-panel (max-width: 560px) {
207
246
  .space-panel-tabs .copilotz-tab[aria-selected=false] { padding: 0 9px; }
@@ -1,18 +1,30 @@
1
1
  /**
2
2
  * A space's tabs, as the front ends add them (`spaceTabs`, see contract.ts):
3
- * in their order, which one the address asks for, and each one's address;
4
- * and the kinds of member its invite surface adds (`spaceInvite`).
3
+ * in their order, each with its sections (the tabs `under` it), which one
4
+ * the address asks for (a section's key opens its tab there), and each one's
5
+ * address; and the kinds of member its invite surface adds (`spaceInvite`).
5
6
  */
6
7
  import type { SpaceTab } from "../../contract.js";
7
8
  export type ShownTab = SpaceTab & {
8
9
  key: string;
10
+ sections: ShownTab[];
9
11
  };
10
- /** The tabs given, lowest `order` first (by key when they tie), leaving out those taken away (`null`). */
12
+ /**
13
+ * The tabs given, lowest `order` first (by key when they tie), leaving out
14
+ * those taken away (`null`), each with its sections in their order. A
15
+ * section whose tab isn't there is a tab of its own.
16
+ */
11
17
  export declare function tabsOf(given: unknown): ShownTab[];
12
- /** The tab asked for (`?tab=`), or the first. */
18
+ /** The tab asked for (`?tab=`): the one with that key, or the one with that section; or the first. */
13
19
  export declare const chosen: (tabs: ShownTab[], asked?: unknown) => ShownTab | undefined;
14
- /** A space's page, at a tab. */
15
- export declare const spacePath: (space: string, tab?: string) => string;
20
+ /** The section asked for in a tab: one of its own, by key (none: the tab's own View). */
21
+ export declare const sectionOf: (tab: ShownTab | undefined, asked?: unknown) => ShownTab | undefined;
22
+ /**
23
+ * A space's page, at a tab (a section's key opens its tab there). With
24
+ * `chose`, the address says the tab's own View was chosen, not just its tab
25
+ * opened: a phone shows a tab's menu of sections until one is.
26
+ */
27
+ export declare const spacePath: (space: string, tab?: string, chose?: boolean) => string;
16
28
  /** A kind of member to add: people (spaces' own), or a front end's View. */
17
29
  export type Kind = {
18
30
  key: string;
@@ -1,13 +1,29 @@
1
- /** The tabs given, lowest `order` first (by key when they tie), leaving out those taken away (`null`). */
1
+ const ordered = (a, b) => (a.order ?? 0) - (b.order ?? 0) || a.key.localeCompare(b.key);
2
+ /**
3
+ * The tabs given, lowest `order` first (by key when they tie), leaving out
4
+ * those taken away (`null`), each with its sections in their order. A
5
+ * section whose tab isn't there is a tab of its own.
6
+ */
2
7
  export function tabsOf(given) {
3
- return Object.entries((given ?? {}))
4
- .flatMap(([key, tab]) => tab?.view && tab.title ? [{ ...tab, key }] : [])
5
- .sort((a, b) => (a.order ?? 0) - (b.order ?? 0) || a.key.localeCompare(b.key));
8
+ const all = Object.entries((given ?? {}))
9
+ .flatMap(([key, tab]) => tab?.view && tab.title ? [{ ...tab, key, sections: [] }] : []);
10
+ const keys = new Set(all.map((t) => t.key));
11
+ const top = all.filter((t) => !t.under || t.under === t.key || !keys.has(t.under)).sort(ordered);
12
+ for (const tab of top) {
13
+ tab.sections = all.filter((t) => t.under === tab.key && t !== tab).sort(ordered);
14
+ }
15
+ return top;
6
16
  }
7
- /** The tab asked for (`?tab=`), or the first. */
8
- export const chosen = (tabs, asked) => tabs.find((t) => t.key === asked) ?? tabs[0];
9
- /** A space's page, at a tab. */
10
- export const spacePath = (space, tab) => `/space/${encodeURIComponent(space)}${tab ? `?tab=${encodeURIComponent(tab)}` : ""}`;
17
+ /** The tab asked for (`?tab=`): the one with that key, or the one with that section; or the first. */
18
+ export const chosen = (tabs, asked) => tabs.find((t) => t.key === asked || t.sections.some((s) => s.key === asked)) ?? tabs[0];
19
+ /** The section asked for in a tab: one of its own, by key (none: the tab's own View). */
20
+ export const sectionOf = (tab, asked) => tab?.sections.find((s) => s.key === asked);
21
+ /**
22
+ * A space's page, at a tab (a section's key opens its tab there). With
23
+ * `chose`, the address says the tab's own View was chosen, not just its tab
24
+ * opened: a phone shows a tab's menu of sections until one is.
25
+ */
26
+ export const spacePath = (space, tab, chose) => `/space/${encodeURIComponent(space)}${tab ? `?tab=${encodeURIComponent(tab)}` : ""}${tab && chose ? "&open=1" : ""}`;
11
27
  /**
12
28
  * The kinds of member a space takes, as its invite surface shows them:
13
29
  * People first, then the `spaceInvite` resources in their order; a
@@ -66,8 +66,22 @@ export const spacesWeb = definePlugin({
66
66
  spaces: { title: "Spaces", view: "spaces", order: 10 },
67
67
  },
68
68
  spaceTabs: {
69
- members: { title: "Members", view: "space.members", icon: "users", order: 80 },
70
- settings: { title: "Settings", view: "space.settings", icon: "settings", order: 90 },
69
+ // Settings: the space itself ("General"), then its sections, in a menu beside them.
70
+ settings: {
71
+ title: "Settings",
72
+ view: "space.settings",
73
+ icon: "settings",
74
+ order: 90,
75
+ own: "General",
76
+ menu: "side",
77
+ },
78
+ members: {
79
+ title: "Members",
80
+ view: "space.members",
81
+ icon: "users",
82
+ under: "settings",
83
+ order: 10,
84
+ },
71
85
  },
72
86
  panel: { view: "space.panel", on: ["thread"], title: "Space" },
73
87
  palette: { spaces: { view: "spaces.palette", order: 10 } },
@@ -3,4 +3,4 @@
3
3
  * space's chats (its tab) and its latest (in the sidebar). Only layout, on the theme's variables; the
4
4
  * pieces (buttons, chips, notices, markdown…) are the web host's toolkit.
5
5
  */
6
- export declare const STYLE = "\n.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--background); }\n\n/* The header */\n.chat-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 58px;\n padding: 9px max(16px, var(--copilotz-inset-end, 0px)) 9px max(24px, var(--copilotz-inset, 0px));\n border-bottom: 1px solid var(--border); }\n.chat-head-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }\n.chat-head h1 { margin: 0; min-width: 0; font-family: var(--font-display); font-size: 16px; font-weight: 620;\n letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chat-space { flex: none; }\n.chat-people { flex: none; display: flex; align-items: center; padding-left: 6px; }\n.chat-people > * { margin-left: -6px; outline: 2px solid var(--background); }\n.chat-people-more { min-width: 26px; min-height: 26px; }\n.chat-head-new { display: none; }\n\n/* What was said */\n.chat-body { position: relative; flex: 1; min-height: 0; display: flex; }\n.chat-transcript { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain;\n scrollbar-width: thin; scrollbar-color: var(--input) transparent; }\n.chat-log { max-width: 800px; margin: 0 auto; padding: 28px 24px 36px; display: flex; flex-direction: column; }\n.chat-jump { position: absolute; z-index: 5; bottom: 14px; left: 50%; transform: translateX(-50%);\n border-radius: var(--radius-full); box-shadow: var(--shadow-md); animation: chat-rise .2s ease-out; }\n@keyframes chat-rise { from { opacity: 0; transform: translate(-50%, 6px); } }\n\n/* A message */\n.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; margin-top: 22px; }\n.msg:first-child { margin-top: 0; }\n.msg-follows { margin-top: 6px; }\n.msg-gutter { padding-top: 1px; }\n.msg-main { min-width: 0; }\n.msg-head { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; min-height: 22px;\n margin-bottom: 3px; font-size: 13.5px; line-height: 1.4; }\n.msg-name { font-weight: 650; color: var(--foreground); }\na.msg-name { text-decoration: none; }\na.msg-name:hover { text-decoration: underline; text-underline-offset: 3px;\n text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }\n.msg-to { color: var(--muted-foreground); font-size: 12.5px; }\n.msg-head-again { min-height: 0; margin: 10px 0 2px; }\n.msg-writing { color: var(--primary-text); font-size: 12px; font-weight: 560; }\n.msg-writing::after { content: \"\u2026\"; }\n.msg-body { overflow-wrap: anywhere; }\n.msg-bubble { display: inline-block; max-width: min(100%, 640px); padding: 9px 15px; background: var(--muted);\n border-radius: var(--radius-xs) var(--radius-2xl) var(--radius-2xl) var(--radius-2xl);\n white-space: pre-wrap; line-height: 1.5; }\n.msg-mine { grid-template-columns: minmax(0, 1fr); justify-items: end; margin-top: 26px; }\n.msg-mine.msg-follows { margin-top: 6px; }\n.msg-mine .msg-main { position: relative; display: flex; flex-direction: column; align-items: flex-end;\n max-width: min(86%, 640px); }\n.msg-mine .msg-bubble { background: var(--bubble); color: var(--bubble-foreground);\n border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-xs) var(--radius-2xl); }\n.msg-mine .msg-head { justify-content: flex-end; min-height: 0; margin: 0 4px 4px; }\n.msg-mine-time { position: absolute; right: calc(100% + 10px); bottom: 6px; opacity: 0; transition: opacity .15s; }\n.msg-mine:hover .msg-mine-time, .msg-mine:focus-within .msg-mine-time { opacity: 1; }\n.msg-aside { margin-left: 44px; padding-left: 14px; border-left: 2px solid var(--border); font-size: 14.5px; }\n.msg-aside.msg-mine { margin-left: 0; padding-left: 0; border-left: 0; }\n.msg-aside .msg-gutter .copilotz-avatar { --size: 24px !important; }\n.msg:has(> .msg-main > .msg-actions) { padding-bottom: 8px; }\n.msg-main:has(> .msg-actions) { position: relative; }\n.msg-actions { position: absolute; top: 100%; left: -6px; display: flex; gap: 2px; margin-top: 2px;\n opacity: 0; transition: opacity .15s; }\n.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }\n@media (hover: none) {\n .msg:has(> .msg-main > .msg-actions) { padding-bottom: 0; }\n .msg-actions { position: static; opacity: 1; margin: 2px 0 0 -6px; }\n}\n.msg-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--muted-foreground);\n font-size: 12.5px; }\n.msg-asked { margin-top: 8px; }\n.msg-sources { margin-top: 10px; font-size: 13px; }\n.msg-files { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; max-width: 100%;\n margin-top: 8px; }\n.msg-mine .msg-files { justify-content: flex-end; }\n\n/* A step: the tools an agent called */\n.msg-step > .copilotz-md { margin-bottom: 8px; }\n.step-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.step-what b, .live-calls b { font: 600 12.5px var(--font-mono); }\n.step-what b.step-who, .live-calls b.step-who { font: 600 13px var(--font-sans); }\n.step-chevron { display: inline-grid; color: var(--muted-foreground); transition: transform .15s; }\n.step[open] .step-chevron { transform: rotate(90deg); }\n.step-calls { display: grid; gap: 8px; margin-top: 10px; }\n.step-shown { display: grid; gap: 8px; margin: 2px 0 8px; min-width: 0; }\n.step-shown + .step { margin-top: 2px; }\n.step-call { overflow: hidden; }\n.step-call > header { padding: 7px 12px; border-bottom: 1px solid var(--border);\n background: color-mix(in oklab, var(--muted) 50%, var(--card)); font: 600 12.5px/1.4 var(--font-mono); }\n.step-io { display: grid; grid-template-columns: 56px minmax(0, 1fr); }\n.step-io + .step-io { border-top: 1px dashed var(--border); }\n.step-io > span { padding: 9px 0 0 12px; color: var(--muted-foreground); font-size: 11.5px; font-weight: 600;\n text-transform: uppercase; letter-spacing: .05em; }\n.step-io pre { margin: 0; padding: 8px 12px; max-height: 260px; overflow: auto; white-space: pre-wrap;\n overflow-wrap: anywhere; font: 12.5px/1.55 var(--font-mono); font-variant-ligatures: none; }\n\n/* Being written */\n.live-calls { list-style: none; display: grid; gap: 6px; margin: 2px 0 8px; padding: 0; }\n.live-calls li { display: flex; align-items: center; gap: 8px; color: var(--secondary-foreground); font-size: 13px; }\n.live-calls li[data-done] .copilotz-icon { color: var(--success); }\n.live-spinner { color: var(--primary-text); }\n.chat-thinking { height: 26px; color: var(--muted-foreground); }\n/* A model's call that broke, tried again: what came stays, dimmed, under how long until the next */\n.live-stale { opacity: .45; transition: opacity .3s; }\n.live-retry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0;\n color: var(--muted-foreground); font-size: 13px; font-variant-numeric: tabular-nums;\n animation: chat-fade .2s ease-out; }\n.live-retry-icon { flex: none; }\n.live-retry-try { padding: 0 7px; border-radius: var(--radius-full); background: var(--muted); font-size: 12px; }\n.live-retry-why { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-full);\n color: var(--muted-foreground); cursor: help; opacity: .8; }\n.live-retry-why:hover, .live-retry-why:focus-visible { opacity: 1; background: var(--muted); }\n\n/* A message of yours waiting for its agents to finish an earlier one */\n.msg-queued { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 7px;\n margin: 5px 4px 0; color: var(--muted-foreground); font-size: 12.5px; animation: chat-fade .2s ease-out; }\n.msg-queued .copilotz-button { min-height: 0; padding: 0; font-size: 12.5px; }\n\n/* Files */\n.file-picture { display: block; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-xl);\n overflow: hidden; background: var(--muted); cursor: zoom-in; }\n.file-picture img { display: block; max-width: min(320px, 100%); max-height: 240px; object-fit: cover; }\n.file-view { display: grid; margin: 0; }\n.file-view img { display: block; max-width: 100%; max-height: calc(92vh - 52px); margin: 0 auto; object-fit: contain; }\n.file-view figcaption { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; font-size: 13.5px; }\n.file-view figcaption span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.file-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 300px; padding: 8px 10px 8px 8px; }\n.file-chip-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px;\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }\n.file-chip-text { display: grid; min-width: 0; line-height: 1.3; }\n.file-chip-name { font-size: 13.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.file-chip small { color: var(--muted-foreground); font-size: 12px; }\n.file-chip-save { margin-left: 4px; color: var(--muted-foreground); }\n\n/* A voice message, or audio, on a message */\n.msg-mine .voice-note { border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-xs) var(--radius-2xl); }\n.msg-person .voice-note, .msg-agent .voice-note {\n border-radius: var(--radius-xs) var(--radius-2xl) var(--radius-2xl) var(--radius-2xl); }\n.msg-follows .voice-note { border-radius: var(--radius-2xl); }\n.msg-main > .msg-files:nth-child(1), .msg-head + .msg-files { margin-top: 0; }\n.voice-note-file { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; font-size: 12.5px; }\n.voice-note-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n font-weight: 560; }\n.voice-note-file small { flex: none; opacity: .7; font-size: 12px; }\n.voice-note-file .copilotz-icon-button { margin-left: auto; color: inherit; }\n.voice-said { display: grid; justify-items: start; margin: 2px 0 3px; }\n.voice-said-toggle { display: inline-flex; align-items: center; gap: 3px; margin-left: -5px;\n padding: 3px 7px 3px 3px; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font-size: 12.5px; font-weight: 580;\n opacity: .72; cursor: pointer; transition: opacity .15s, background-color .15s; }\n.voice-said-toggle:hover { opacity: 1; background: color-mix(in oklab, currentColor 8%, transparent); }\n.voice-said-toggle .copilotz-icon { transition: transform .15s; }\n.voice-said-toggle[aria-expanded=true] .copilotz-icon { transform: rotate(90deg); }\n.voice-said-text { margin: 1px 0 2px; font-size: 14px; line-height: 1.5; white-space: pre-wrap;\n overflow-wrap: anywhere; }\n\n/* Over where you type: what other front ends ask here (the conversation resource) */\n.chat-asks { flex: none; display: grid; gap: 8px; width: 100%; max-width: 848px; margin: 0 auto;\n padding: 2px 24px 10px; }\n.chat-asks:empty, .chat-asks .copilotz-loading { display: none; }\n\n/* Where you type */\n.chat-composer { flex: none; padding: 0 24px 14px;\n background: linear-gradient(to bottom, transparent, var(--background) 18px); }\n.chat-composer-inner { max-width: 800px; margin: 0 auto; }\n.chat-status { display: flex; align-items: center; gap: 10px; margin: 0 6px 8px; color: var(--muted-foreground);\n font-size: 13px; animation: chat-fade .2s ease-out; }\n.chat-status-dots { color: var(--primary-text); }\n.chat-status-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chat-status b { color: var(--secondary-foreground); font-weight: 600; }\n.chat-stop { min-height: 28px; gap: 7px; padding: 0 6px 0 10px; border-radius: var(--radius-full); font-size: 12.5px; }\n@keyframes chat-fade { from { opacity: 0; transform: translateY(3px); } }\n.chat-box { display: flex; flex-direction: column; border: 1px solid var(--input); border-radius: var(--radius-3xl);\n background: var(--card); box-shadow: var(--shadow-md); outline: 3px solid transparent;\n transition: border-color .15s, outline-color .15s; }\n.chat-box:focus-within { border-color: color-mix(in oklab, var(--ring) 40%, var(--input));\n outline-color: color-mix(in oklab, var(--ring) 9%, transparent); }\n.chat-box-over { border-color: var(--ring); border-style: dashed; background: var(--primary-soft); }\n.chat-box-live { border-color: color-mix(in oklab, var(--destructive) 35%, var(--input)); }\n.chat-box-text[hidden] { display: none; }\n.chat-input { min-height: 54px; padding: 15px 20px 4px; font-size: 15px; }\n.chat-box-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px 10px; }\n.chat-box-end { display: flex; align-items: center; gap: 4px; }\n.chat-send { border-radius: var(--radius-full); }\n.chat-status-spin { color: var(--primary-text); }\n\n/* Recording a voice message */\n.voice-rec { display: grid; gap: 4px; padding: 12px 8px 8px 10px; animation: chat-fade .15s ease-out; }\n.voice-rec-meter { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 40px;\n padding: 0 12px 0 10px; }\n.voice-rec-dot { flex: none; width: 10px; height: 10px; border-radius: var(--radius-full);\n background: var(--muted-foreground); opacity: .45; }\n.voice-rec-dot-on { background: var(--destructive); opacity: 1; animation: voice-pulse 1.4s ease-in-out infinite; }\n@keyframes voice-pulse { 50% { opacity: .3; } }\n.voice-rec-time { flex: none; display: flex; align-items: baseline; gap: 5px; font-size: 15px; font-weight: 620;\n font-variant-numeric: tabular-nums; }\n.voice-rec-wave { flex: 1; height: 34px; color: var(--foreground); }\n.voice-rec-starting { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted-foreground);\n font-size: 13.5px; }\n.voice-rec-limit { color: var(--muted-foreground); font-size: 12.5px; font-weight: 450; }\n.voice-rec-limit-soon { color: var(--warning-text); font-weight: 620; }\n.voice-rec-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.voice-rec-end { display: flex; align-items: center; gap: 8px; }\n.voice-rec-stop { gap: 7px; min-height: 34px; padding: 0 14px 0 12px; border-radius: var(--radius-full); }\n.voice-take { margin: 12px 12px 0; padding: 7px 6px 7px 7px; border: 1px solid var(--border);\n border-radius: var(--radius-2xl); background: color-mix(in oklab, var(--muted) 55%, var(--card));\n animation: chat-fade .15s ease-out; }\n.chat-attached + .voice-take { margin-top: 8px; }\n.voice-take-row { display: flex; align-items: center; gap: 6px; min-width: 0; }\n.voice-take-player { flex: 1; }\n.voice-take-actions { flex: none; display: flex; gap: 2px; }\n.voice-take-note { margin: 4px 4px 0 46px; color: var(--muted-foreground); font-size: 12px; }\n.voice-error { display: flex; align-items: center; gap: 10px; margin: 12px 12px 0; padding: 7px 7px 7px 12px;\n border: 1px solid var(--destructive-border); border-radius: var(--radius-xl); background: var(--destructive-soft);\n color: var(--destructive-text); font-size: 13.5px; line-height: 1.4; animation: chat-fade .15s ease-out; }\n.voice-error p { flex: 1; min-width: 0; margin: 0; }\n.voice-error .copilotz-button { flex: none; }\n.voice-failed { margin: 0 0 10px; animation: chat-fade .2s ease-out; }\n.chat-refusal { margin: 0 0 10px; animation: chat-fade .2s ease-out; }\n.chat-refusal:empty { display: none; }\n.chat-mention-handle { color: var(--muted-foreground); font: 500 12px var(--font-mono); }\n.chat-attached { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 12px 0; }\n.chat-attached-file { display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 5px 4px 5px 5px;\n border: 1px solid var(--border); border-radius: var(--radius-lg);\n background: color-mix(in oklab, var(--muted) 50%, var(--card)); }\n.chat-attached-file img, .chat-attached-icon { flex: none; width: 36px; height: 36px;\n border-radius: var(--radius-sm); object-fit: cover; }\n.chat-attached-icon { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }\n.chat-attached-name { display: grid; min-width: 0; line-height: 1.3; }\n.chat-attached-name span { font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chat-attached-name small { font-size: 11.5px; color: var(--muted-foreground); }\n.chat-attached-bad { border-color: var(--destructive-border); background: var(--destructive-soft); }\n.chat-attached-bad small { color: var(--destructive-text); }\n.chat-error { margin: 8px 6px 0; color: var(--destructive-text); font-size: 13px; }\n.chat-hint { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 16px;\n margin: 9px 0 0; color: var(--muted-foreground); font-size: 12px; }\n.chat-keys { display: inline-flex; align-items: center; gap: 4px; }\n.chat-suggestions { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;\n margin: 18px 0 0; padding: 0; }\n\n/* Home */\n.chat-home { overflow-y: auto; }\n.chat-home-body { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%;\n max-width: 760px; margin: 0 auto; padding: 48px 0 10vh; }\n.chat-home .chat-composer { background: none; padding-bottom: 0; }\n.chat-home-hero { display: grid; justify-items: center; gap: 4px; margin-bottom: 28px; padding: 0 24px;\n text-align: center; }\n.chat-home-hero h1 { margin: 16px 0 0; font-family: var(--font-display); font-size: clamp(25px, 4vw, 32px);\n line-height: 1.2; letter-spacing: -.025em; font-weight: 680; }\n.chat-home-hero p { margin: 0; color: var(--muted-foreground); font-size: 16px; }\n.chat-home-hero b { color: var(--secondary-foreground); font-weight: 600; }\n.chat-home-where { display: inline-flex; align-items: center; gap: 6px; }\n.chat-home-top { display: grid; gap: 10px; margin: 0 0 32px; padding: 0 24px; }\n.chat-home-top:empty, .chat-home-top > .copilotz-loading { display: none; }\n\n/* Not here */\n.chat-missing { display: grid; place-items: center; padding: 24px; }\n\n/* The sidebar: starting one, and a space's latest under it */\n.chat-new { width: 100%; justify-content: flex-start; min-height: 40px; padding: 0 12px; margin: 2px 0 4px; }\n.chat-new[aria-current] { border-color: var(--primary-border); }\n.chats-recent { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }\n.chats-recent .copilotz-nav-item { min-height: 32px; padding-block: 4px; font-size: 13.5px; }\n.chats-recent .copilotz-nav-quiet { font-size: 13px; }\n.chats-recent > .copilotz-skeleton { margin: 2px 0; }\n.chats-recent-none { margin: 4px 10px 6px; color: var(--muted-foreground); font-size: 12.5px; }\n\n/* A space's chats: its tab */\n.chats { container: chats / inline-size; display: grid; gap: 18px; }\n.chats-tools { display: flex; align-items: center; gap: 10px; }\n.chats-search { flex: 1; }\n.chats-group { display: grid; gap: 8px; }\n.chats-group h3 { margin: 0 2px; color: var(--muted-foreground); font-size: 12px; font-weight: 650;\n letter-spacing: .06em; text-transform: uppercase; }\n.chats-list { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);\n border-radius: var(--radius-xl); background: var(--card); }\n.chats-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;\n min-height: 56px; padding: 8px 12px 8px 10px; border-radius: var(--radius-lg); color: inherit;\n text-decoration: none; transition: background-color .12s; }\n.chats-row:hover { background: var(--accent); }\n.chats-row-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md);\n background: var(--primary-soft); color: var(--primary-text); }\n.chats-row-text { display: grid; gap: 2px; min-width: 0; }\n.chats-row-title, .chats-row-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chats-row-title { font-weight: 600; }\n.chats-row-last { color: var(--muted-foreground); font-size: 13px; }\n.chats-row-meta { display: grid; justify-items: end; gap: 2px; color: var(--muted-foreground); font-size: 12px;\n white-space: nowrap; }\n.chats-row-meta .copilotz-time { font-size: 12px; }\n.chats-item { position: relative; }\n.chats-row-menu { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); opacity: 0;\n transition: opacity .12s; }\n.chats-item:is(:hover, :focus-within) .chats-row-menu, .chats-row-menu:has([aria-expanded=true]) { opacity: 1; }\n.chats-item:is(:hover, :focus-within) .chats-row-meta { visibility: hidden; }\n@media (pointer: coarse) {\n .chats-row-menu { opacity: 1; right: 4px; }\n .chats-row { padding-right: 44px; }\n .chats-item:is(:hover, :focus-within) .chats-row-meta { visibility: visible; }\n}\n.chats-none { margin: 4px 2px; color: var(--muted-foreground); font-size: 13px; text-align: center; }\n.chats-empty { margin: 40px auto 24px; }\n.chats-compact { gap: 14px; }\n.chats-compact .chats-list { padding: 2px; }\n.chats-compact .chats-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 48px; gap: 10px;\n padding: 6px 10px; }\n.chats-compact .chats-row-title { font-size: 13.5px; }\n.chats-compact .chats-row-last { font-size: 12.5px; }\n@container chats (max-width: 480px) {\n .chats-tools .copilotz-button { padding: 0 12px; }\n .chats-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 12px; }\n .chats-row-icon, .chats-row-count { display: none; }\n}\n\n@media (max-width: 760px) {\n .chat-head { padding-right: max(8px, var(--copilotz-inset-end, 0px)); gap: 8px; }\n .chat-head-new { display: inline-grid; }\n .chat-space { display: none; }\n .chat-people > :nth-child(n+3) { display: none; }\n .chat-log { padding: 20px 16px 28px; }\n .msg { column-gap: 10px; grid-template-columns: 26px minmax(0, 1fr); }\n .msg-gutter .copilotz-avatar { --size: 26px !important; }\n .msg-mine { grid-template-columns: minmax(0, 1fr); }\n .msg-aside { margin-left: 10px; padding-left: 10px; }\n .chat-composer { padding: 0 10px 10px; }\n .chat-asks { padding: 2px 10px 8px; }\n .voice-rec-meter { gap: 10px; padding: 0 6px 0 8px; }\n .voice-error { flex-wrap: wrap; }\n .voice-error p { flex-basis: calc(100% - 30px); }\n .voice-error .copilotz-button { margin-left: auto; }\n .voice-failed { flex-wrap: wrap; }\n .voice-failed .copilotz-notice-body { flex-basis: calc(100% - 30px); }\n .voice-failed .copilotz-notice-action { width: 100%; justify-content: flex-end; margin: 2px 0 0; }\n .chat-keys { display: none; }\n .chat-home-body { padding: 72px 0 6vh; }\n .chat-home .chat-composer { padding: 0 14px; }\n .chat-home-top { padding: 0 14px; margin-bottom: 24px; }\n}\n";
6
+ export declare const STYLE = "\n.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--background); }\n\n/* The header */\n.chat-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 58px;\n padding: 9px max(16px, var(--copilotz-inset-end, 0px)) 9px max(24px, var(--copilotz-inset, 0px));\n border-bottom: 1px solid var(--border); }\n.chat-head-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }\n.chat-head h1 { margin: 0; min-width: 0; font-family: var(--font-display); font-size: 16px; font-weight: 620;\n letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chat-space { flex: none; }\n.chat-people { flex: none; display: flex; align-items: center; padding-left: 6px; }\n.chat-people > * { margin-left: -6px; outline: 2px solid var(--background); }\n.chat-people-more { min-width: 26px; min-height: 26px; }\n.chat-head-new { display: none; }\n\n/* What was said */\n.chat-body { position: relative; flex: 1; min-height: 0; display: flex; }\n/* It scrolls up and down only: what's wider (a table, code) scrolls in its own box, text wraps. */\n.chat-transcript { flex: 1; min-width: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;\n scrollbar-width: thin; scrollbar-color: var(--input) transparent; }\n.chat-log { max-width: 800px; margin: 0 auto; padding: 28px 24px 36px; display: flex; flex-direction: column; }\n.chat-jump { position: absolute; z-index: 5; bottom: 14px; left: 50%; transform: translateX(-50%);\n border-radius: var(--radius-full); box-shadow: var(--shadow-md); animation: chat-rise .2s ease-out; }\n@keyframes chat-rise { from { opacity: 0; transform: translate(-50%, 6px); } }\n\n/* A message */\n.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; margin-top: 22px; }\n.msg:first-child { margin-top: 0; }\n.msg-follows { margin-top: 6px; }\n.msg-gutter { padding-top: 1px; }\n.msg-main { min-width: 0; }\n.msg-head { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; min-height: 22px;\n margin-bottom: 3px; font-size: 13.5px; line-height: 1.4; }\n.msg-name { font-weight: 650; color: var(--foreground); }\na.msg-name { text-decoration: none; }\na.msg-name:hover { text-decoration: underline; text-underline-offset: 3px;\n text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }\n.msg-to { color: var(--muted-foreground); font-size: 12.5px; }\n.msg-head-again { min-height: 0; margin: 10px 0 2px; }\n.msg-writing { color: var(--primary-text); font-size: 12px; font-weight: 560; }\n.msg-writing::after { content: \"\u2026\"; }\n.msg-body { overflow-wrap: anywhere; }\n.msg-bubble { display: inline-block; max-width: min(100%, 640px); padding: 9px 15px; background: var(--muted);\n border-radius: var(--radius-xs) var(--radius-2xl) var(--radius-2xl) var(--radius-2xl);\n white-space: pre-wrap; line-height: 1.5; }\n.msg-mine { grid-template-columns: minmax(0, 1fr); justify-items: end; margin-top: 26px; }\n.msg-mine.msg-follows { margin-top: 6px; }\n.msg-mine .msg-main { position: relative; display: flex; flex-direction: column; align-items: flex-end;\n max-width: min(86%, 640px); }\n.msg-mine .msg-bubble { background: var(--bubble); color: var(--bubble-foreground);\n border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-xs) var(--radius-2xl); }\n.msg-mine .msg-head { justify-content: flex-end; min-height: 0; margin: 0 4px 4px; }\n.msg-mine-time { position: absolute; right: calc(100% + 10px); bottom: 6px; opacity: 0; transition: opacity .15s; }\n.msg-mine:hover .msg-mine-time, .msg-mine:focus-within .msg-mine-time { opacity: 1; }\n.msg-aside { margin-left: 44px; padding-left: 14px; border-left: 2px solid var(--border); font-size: 14.5px; }\n.msg-aside.msg-mine { margin-left: 0; padding-left: 0; border-left: 0; }\n.msg-aside .msg-gutter .copilotz-avatar { --size: 24px !important; }\n.msg:has(> .msg-main > .msg-actions) { padding-bottom: 8px; }\n.msg-main:has(> .msg-actions) { position: relative; }\n.msg-actions { position: absolute; top: 100%; left: -6px; display: flex; gap: 2px; margin-top: 2px;\n opacity: 0; transition: opacity .15s; }\n.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }\n@media (hover: none) {\n .msg:has(> .msg-main > .msg-actions) { padding-bottom: 0; }\n .msg-actions { position: static; opacity: 1; margin: 2px 0 0 -6px; }\n}\n.msg-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--muted-foreground);\n font-size: 12.5px; }\n.msg-asked { margin-top: 8px; }\n.msg-sources { margin-top: 10px; font-size: 13px; }\n.msg-files { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; max-width: 100%;\n margin-top: 8px; }\n.msg-mine .msg-files { justify-content: flex-end; }\n\n/* A step: the tools an agent called */\n.msg-step > .copilotz-md { margin-bottom: 8px; }\n.step-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.step-what b, .live-calls b { font: 600 12.5px var(--font-mono); }\n.step-what b.step-who, .live-calls b.step-who { font: 600 13px var(--font-sans); }\n.step-chevron { display: inline-grid; color: var(--muted-foreground); transition: transform .15s; }\n.step[open] .step-chevron { transform: rotate(90deg); }\n.step-calls { display: grid; gap: 8px; margin-top: 10px; }\n.step-shown { display: grid; gap: 8px; margin: 2px 0 8px; min-width: 0; }\n.step-shown + .step { margin-top: 2px; }\n.step-call { overflow: hidden; }\n.step-call > header { padding: 7px 12px; border-bottom: 1px solid var(--border);\n background: color-mix(in oklab, var(--muted) 50%, var(--card)); font: 600 12.5px/1.4 var(--font-mono); }\n.step-io { display: grid; grid-template-columns: 56px minmax(0, 1fr); }\n.step-io + .step-io { border-top: 1px dashed var(--border); }\n.step-io > span { padding: 9px 0 0 12px; color: var(--muted-foreground); font-size: 11.5px; font-weight: 600;\n text-transform: uppercase; letter-spacing: .05em; }\n.step-io pre { margin: 0; padding: 8px 12px; max-height: 260px; overflow: auto; white-space: pre-wrap;\n overflow-wrap: anywhere; font: 12.5px/1.55 var(--font-mono); font-variant-ligatures: none; }\n\n/* Being written */\n.live-calls { list-style: none; display: grid; gap: 6px; margin: 2px 0 8px; padding: 0; }\n.live-calls li { display: flex; align-items: center; gap: 8px; color: var(--secondary-foreground); font-size: 13px; }\n.live-calls li > span { min-width: 0; overflow-wrap: anywhere; }\n.live-calls li[data-done] .copilotz-icon { color: var(--success); }\n.live-spinner { color: var(--primary-text); }\n.chat-thinking { height: 26px; color: var(--muted-foreground); }\n/* A model's call that broke, tried again: what came stays, dimmed, under how long until the next */\n.live-stale { opacity: .45; transition: opacity .3s; }\n.live-retry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0;\n color: var(--muted-foreground); font-size: 13px; font-variant-numeric: tabular-nums;\n animation: chat-fade .2s ease-out; }\n.live-retry-icon { flex: none; }\n.live-retry-try { padding: 0 7px; border-radius: var(--radius-full); background: var(--muted); font-size: 12px; }\n.live-retry-why { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-full);\n color: var(--muted-foreground); cursor: help; opacity: .8; }\n.live-retry-why:hover, .live-retry-why:focus-visible { opacity: 1; background: var(--muted); }\n\n/* A message of yours waiting for its agents to finish an earlier one */\n.msg-queued { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 7px;\n margin: 5px 4px 0; color: var(--muted-foreground); font-size: 12.5px; animation: chat-fade .2s ease-out; }\n.msg-queued .copilotz-button { min-height: 0; padding: 0; font-size: 12.5px; }\n\n/* Files */\n.file-picture { display: block; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-xl);\n overflow: hidden; background: var(--muted); cursor: zoom-in; }\n.file-picture img { display: block; max-width: min(320px, 100%); max-height: 240px; object-fit: cover; }\n.file-view { display: grid; margin: 0; }\n.file-view img { display: block; max-width: 100%; max-height: calc(92vh - 52px); margin: 0 auto; object-fit: contain; }\n.file-view figcaption { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; font-size: 13.5px; }\n.file-view figcaption span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.file-chip { display: inline-flex; align-items: center; gap: 10px; max-width: min(300px, 100%); padding: 8px 10px 8px 8px; }\n.file-chip-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px;\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }\n.file-chip-text { display: grid; min-width: 0; line-height: 1.3; }\n.file-chip-name { font-size: 13.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.file-chip small { color: var(--muted-foreground); font-size: 12px; }\n.file-chip-save { margin-left: 4px; color: var(--muted-foreground); }\n\n/* A voice message, or audio, on a message */\n.msg-mine .voice-note { border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-xs) var(--radius-2xl); }\n.msg-person .voice-note, .msg-agent .voice-note {\n border-radius: var(--radius-xs) var(--radius-2xl) var(--radius-2xl) var(--radius-2xl); }\n.msg-follows .voice-note { border-radius: var(--radius-2xl); }\n.msg-main > .msg-files:nth-child(1), .msg-head + .msg-files { margin-top: 0; }\n.voice-note-file { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; font-size: 12.5px; }\n.voice-note-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n font-weight: 560; }\n.voice-note-file small { flex: none; opacity: .7; font-size: 12px; }\n.voice-note-file .copilotz-icon-button { margin-left: auto; color: inherit; }\n.voice-said { display: grid; justify-items: start; margin: 2px 0 3px; }\n.voice-said-toggle { display: inline-flex; align-items: center; gap: 3px; margin-left: -5px;\n padding: 3px 7px 3px 3px; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font-size: 12.5px; font-weight: 580;\n opacity: .72; cursor: pointer; transition: opacity .15s, background-color .15s; }\n.voice-said-toggle:hover { opacity: 1; background: color-mix(in oklab, currentColor 8%, transparent); }\n.voice-said-toggle .copilotz-icon { transition: transform .15s; }\n.voice-said-toggle[aria-expanded=true] .copilotz-icon { transform: rotate(90deg); }\n.voice-said-text { margin: 1px 0 2px; font-size: 14px; line-height: 1.5; white-space: pre-wrap;\n overflow-wrap: anywhere; }\n\n/* Over where you type: what other front ends ask here (the conversation resource) */\n/* However much it asks, the conversation keeps some room, and what's asked scrolls in its own. */\n.chat-asks { flex: none; display: grid; gap: 8px; width: 100%; max-width: 848px; max-height: 60%; margin: 0 auto;\n padding: 2px 24px 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;\n scrollbar-color: var(--input) transparent; }\n.chat-asks:empty, .chat-asks .copilotz-loading { display: none; }\n\n/* Where you type */\n.chat-composer { flex: none; padding: 0 24px max(14px, env(safe-area-inset-bottom));\n background: linear-gradient(to bottom, transparent, var(--background) 18px); }\n.chat-composer-inner { max-width: 800px; margin: 0 auto; }\n.chat-status { display: flex; align-items: center; gap: 10px; margin: 0 6px 8px; color: var(--muted-foreground);\n font-size: 13px; animation: chat-fade .2s ease-out; }\n.chat-status-dots { color: var(--primary-text); }\n.chat-status-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chat-status b { color: var(--secondary-foreground); font-weight: 600; }\n.chat-stop { min-height: 28px; gap: 7px; padding: 0 6px 0 10px; border-radius: var(--radius-full); font-size: 12.5px; }\n@keyframes chat-fade { from { opacity: 0; transform: translateY(3px); } }\n.chat-box { display: flex; flex-direction: column; border: 1px solid var(--input); border-radius: var(--radius-3xl);\n background: var(--card); box-shadow: var(--shadow-md); outline: 3px solid transparent;\n transition: border-color .15s, outline-color .15s; }\n.chat-box:focus-within { border-color: color-mix(in oklab, var(--ring) 40%, var(--input));\n outline-color: color-mix(in oklab, var(--ring) 9%, transparent); }\n.chat-box-over { border-color: var(--ring); border-style: dashed; background: var(--primary-soft); }\n.chat-box-live { border-color: color-mix(in oklab, var(--destructive) 35%, var(--input)); }\n.chat-box-text[hidden] { display: none; }\n.chat-input { min-height: 54px; padding: 15px 20px 4px; font-size: 15px; }\n.chat-box-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px 10px; }\n.chat-box-end { display: flex; align-items: center; gap: 4px; }\n.chat-send { border-radius: var(--radius-full); }\n.chat-status-spin { color: var(--primary-text); }\n\n/* Recording a voice message */\n.voice-rec { display: grid; gap: 4px; padding: 12px 8px 8px 10px; animation: chat-fade .15s ease-out; }\n.voice-rec-meter { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 40px;\n padding: 0 12px 0 10px; }\n.voice-rec-dot { flex: none; width: 10px; height: 10px; border-radius: var(--radius-full);\n background: var(--muted-foreground); opacity: .45; }\n.voice-rec-dot-on { background: var(--destructive); opacity: 1; animation: voice-pulse 1.4s ease-in-out infinite; }\n@keyframes voice-pulse { 50% { opacity: .3; } }\n.voice-rec-time { flex: none; display: flex; align-items: baseline; gap: 5px; font-size: 15px; font-weight: 620;\n font-variant-numeric: tabular-nums; }\n.voice-rec-wave { flex: 1; height: 34px; color: var(--foreground); }\n.voice-rec-starting { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted-foreground);\n font-size: 13.5px; }\n.voice-rec-limit { color: var(--muted-foreground); font-size: 12.5px; font-weight: 450; }\n.voice-rec-limit-soon { color: var(--warning-text); font-weight: 620; }\n.voice-rec-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.voice-rec-end { display: flex; align-items: center; gap: 8px; }\n.voice-rec-stop { gap: 7px; min-height: 34px; padding: 0 14px 0 12px; border-radius: var(--radius-full); }\n.voice-take { margin: 12px 12px 0; padding: 7px 6px 7px 7px; border: 1px solid var(--border);\n border-radius: var(--radius-2xl); background: color-mix(in oklab, var(--muted) 55%, var(--card));\n animation: chat-fade .15s ease-out; }\n.chat-attached + .voice-take { margin-top: 8px; }\n.voice-take-row { display: flex; align-items: center; gap: 6px; min-width: 0; }\n.voice-take-player { flex: 1; }\n.voice-take-actions { flex: none; display: flex; gap: 2px; }\n.voice-take-note { margin: 4px 4px 0 46px; color: var(--muted-foreground); font-size: 12px; }\n.voice-error { display: flex; align-items: center; gap: 10px; margin: 12px 12px 0; padding: 7px 7px 7px 12px;\n border: 1px solid var(--destructive-border); border-radius: var(--radius-xl); background: var(--destructive-soft);\n color: var(--destructive-text); font-size: 13.5px; line-height: 1.4; animation: chat-fade .15s ease-out; }\n.voice-error p { flex: 1; min-width: 0; margin: 0; }\n.voice-error .copilotz-button { flex: none; }\n.voice-failed { margin: 0 0 10px; animation: chat-fade .2s ease-out; }\n.chat-refusal { margin: 0 0 10px; animation: chat-fade .2s ease-out; }\n.chat-refusal:empty { display: none; }\n.chat-mention-handle { color: var(--muted-foreground); font: 500 12px var(--font-mono); }\n.chat-attached { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 12px 0; }\n.chat-attached-file { display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 5px 4px 5px 5px;\n border: 1px solid var(--border); border-radius: var(--radius-lg);\n background: color-mix(in oklab, var(--muted) 50%, var(--card)); }\n.chat-attached-file img, .chat-attached-icon { flex: none; width: 36px; height: 36px;\n border-radius: var(--radius-sm); object-fit: cover; }\n.chat-attached-icon { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }\n.chat-attached-name { display: grid; min-width: 0; line-height: 1.3; }\n.chat-attached-name span { font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chat-attached-name small { font-size: 11.5px; color: var(--muted-foreground); }\n.chat-attached-bad { border-color: var(--destructive-border); background: var(--destructive-soft); }\n.chat-attached-bad small { color: var(--destructive-text); }\n.chat-error { margin: 8px 6px 0; color: var(--destructive-text); font-size: 13px; }\n.chat-hint { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 16px;\n margin: 9px 0 0; color: var(--muted-foreground); font-size: 12px; }\n.chat-keys { display: inline-flex; align-items: center; gap: 4px; }\n.chat-suggestions { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;\n margin: 18px 0 0; padding: 0; }\n\n/* Home */\n.chat-home { overflow-y: auto; }\n.chat-home-body { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%;\n max-width: 760px; margin: 0 auto; padding: 48px 0 10vh; }\n.chat-home .chat-composer { background: none; padding-bottom: 0; }\n.chat-home-hero { display: grid; justify-items: center; gap: 4px; margin-bottom: 28px; padding: 0 24px;\n text-align: center; }\n.chat-home-hero h1 { margin: 16px 0 0; font-family: var(--font-display); font-size: clamp(25px, 4vw, 32px);\n line-height: 1.2; letter-spacing: -.025em; font-weight: 680; }\n.chat-home-hero p { margin: 0; color: var(--muted-foreground); font-size: 16px; }\n.chat-home-hero b { color: var(--secondary-foreground); font-weight: 600; }\n.chat-home-where { display: inline-flex; align-items: center; gap: 6px; }\n.chat-home-top { display: grid; gap: 10px; margin: 0 0 32px; padding: 0 24px; }\n.chat-home-top:empty, .chat-home-top > .copilotz-loading { display: none; }\n\n/* Not here */\n.chat-missing { display: grid; place-items: center; padding: 24px; }\n\n/* The sidebar: starting one, and a space's latest under it */\n.chat-new { width: 100%; justify-content: flex-start; min-height: 40px; padding: 0 12px; margin: 2px 0 4px; }\n.chat-new[aria-current] { border-color: var(--primary-border); }\n.chats-recent { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0; }\n.chats-recent .copilotz-nav-item { min-height: 32px; padding-block: 4px; font-size: 13.5px; }\n.chats-recent .copilotz-nav-quiet { font-size: 13px; }\n.chats-recent > .copilotz-skeleton { margin: 2px 0; }\n.chats-recent-none { margin: 4px 10px 6px; color: var(--muted-foreground); font-size: 12.5px; }\n\n/* A space's chats: its tab */\n.chats { container: chats / inline-size; display: grid; gap: 18px; }\n.chats-tools { display: flex; align-items: center; gap: 10px; }\n.chats-search { flex: 1; }\n.chats-group { display: grid; gap: 8px; }\n.chats-group h3 { margin: 0 2px; color: var(--muted-foreground); font-size: 12px; font-weight: 650;\n letter-spacing: .06em; text-transform: uppercase; }\n.chats-list { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);\n border-radius: var(--radius-xl); background: var(--card); }\n.chats-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;\n min-height: 56px; padding: 8px 12px 8px 10px; border-radius: var(--radius-lg); color: inherit;\n text-decoration: none; transition: background-color .12s; }\n.chats-row:hover { background: var(--accent); }\n.chats-row-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md);\n background: var(--primary-soft); color: var(--primary-text); }\n.chats-row-text { display: grid; gap: 2px; min-width: 0; }\n.chats-row-title, .chats-row-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.chats-row-title { font-weight: 600; }\n.chats-row-last { color: var(--muted-foreground); font-size: 13px; }\n.chats-row-meta { display: grid; justify-items: end; gap: 2px; color: var(--muted-foreground); font-size: 12px;\n white-space: nowrap; }\n.chats-row-meta .copilotz-time { font-size: 12px; }\n.chats-item { position: relative; }\n.chats-row-menu { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); opacity: 0;\n transition: opacity .12s; }\n.chats-item:is(:hover, :focus-within) .chats-row-menu, .chats-row-menu:has([aria-expanded=true]) { opacity: 1; }\n.chats-item:is(:hover, :focus-within) .chats-row-meta { visibility: hidden; }\n@media (pointer: coarse) {\n .chats-row-menu { opacity: 1; right: 4px; }\n .chats-row { padding-right: 44px; }\n .chats-item:is(:hover, :focus-within) .chats-row-meta { visibility: visible; }\n}\n.chats-none { margin: 4px 2px; color: var(--muted-foreground); font-size: 13px; text-align: center; }\n.chats-empty { margin: 40px auto 24px; }\n.chats-compact { gap: 14px; }\n.chats-compact .chats-list { padding: 2px; }\n.chats-compact .chats-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 48px; gap: 10px;\n padding: 6px 10px; }\n.chats-compact .chats-row-title { font-size: 13.5px; }\n.chats-compact .chats-row-last { font-size: 12.5px; }\n@container chats (max-width: 480px) {\n .chats-tools .copilotz-button { padding: 0 12px; }\n .chats-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 12px; }\n .chats-row-icon, .chats-row-count { display: none; }\n}\n\n@media (max-width: 760px) {\n .chat-head { padding-right: max(8px, var(--copilotz-inset-end, 0px)); gap: 8px; }\n .chat-head-new { display: inline-grid; }\n .chat-space { display: none; }\n .chat-people > :nth-child(n+3) { display: none; }\n .chat-log { padding: 20px 16px 28px; }\n .msg { column-gap: 10px; grid-template-columns: 26px minmax(0, 1fr); }\n .msg-gutter .copilotz-avatar { --size: 26px !important; }\n .msg-mine { grid-template-columns: minmax(0, 1fr); }\n .msg-aside { margin-left: 10px; padding-left: 10px; }\n .chat-composer { padding: 0 10px max(10px, env(safe-area-inset-bottom)); }\n .chat-asks { padding: 2px 10px 8px; }\n .voice-rec-meter { gap: 10px; padding: 0 6px 0 8px; }\n .voice-error { flex-wrap: wrap; }\n .voice-error p { flex-basis: calc(100% - 30px); }\n .voice-error .copilotz-button { margin-left: auto; }\n .voice-failed { flex-wrap: wrap; }\n .voice-failed .copilotz-notice-body { flex-basis: calc(100% - 30px); }\n .voice-failed .copilotz-notice-action { width: 100%; justify-content: flex-end; margin: 2px 0 0; }\n .chat-keys { display: none; }\n .chat-home-body { padding: 72px 0 6vh; }\n .chat-home .chat-composer { padding: 0 14px; }\n .chat-home-top { padding: 0 14px; margin-bottom: 24px; }\n}\n";
@@ -21,7 +21,8 @@ export const STYLE = `
21
21
 
22
22
  /* What was said */
23
23
  .chat-body { position: relative; flex: 1; min-height: 0; display: flex; }
24
- .chat-transcript { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain;
24
+ /* It scrolls up and down only: what's wider (a table, code) scrolls in its own box, text wraps. */
25
+ .chat-transcript { flex: 1; min-width: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
25
26
  scrollbar-width: thin; scrollbar-color: var(--input) transparent; }
26
27
  .chat-log { max-width: 800px; margin: 0 auto; padding: 28px 24px 36px; display: flex; flex-direction: column; }
27
28
  .chat-jump { position: absolute; z-index: 5; bottom: 14px; left: 50%; transform: translateX(-50%);
@@ -100,6 +101,7 @@ a.msg-name:hover { text-decoration: underline; text-underline-offset: 3px;
100
101
  /* Being written */
101
102
  .live-calls { list-style: none; display: grid; gap: 6px; margin: 2px 0 8px; padding: 0; }
102
103
  .live-calls li { display: flex; align-items: center; gap: 8px; color: var(--secondary-foreground); font-size: 13px; }
104
+ .live-calls li > span { min-width: 0; overflow-wrap: anywhere; }
103
105
  .live-calls li[data-done] .copilotz-icon { color: var(--success); }
104
106
  .live-spinner { color: var(--primary-text); }
105
107
  .chat-thinking { height: 26px; color: var(--muted-foreground); }
@@ -127,7 +129,7 @@ a.msg-name:hover { text-decoration: underline; text-underline-offset: 3px;
127
129
  .file-view img { display: block; max-width: 100%; max-height: calc(92vh - 52px); margin: 0 auto; object-fit: contain; }
128
130
  .file-view figcaption { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; font-size: 13.5px; }
129
131
  .file-view figcaption span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
130
- .file-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 300px; padding: 8px 10px 8px 8px; }
132
+ .file-chip { display: inline-flex; align-items: center; gap: 10px; max-width: min(300px, 100%); padding: 8px 10px 8px 8px; }
131
133
  .file-chip-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px;
132
134
  border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }
133
135
  .file-chip-text { display: grid; min-width: 0; line-height: 1.3; }
@@ -157,12 +159,14 @@ a.msg-name:hover { text-decoration: underline; text-underline-offset: 3px;
157
159
  overflow-wrap: anywhere; }
158
160
 
159
161
  /* Over where you type: what other front ends ask here (the conversation resource) */
160
- .chat-asks { flex: none; display: grid; gap: 8px; width: 100%; max-width: 848px; margin: 0 auto;
161
- padding: 2px 24px 10px; }
162
+ /* However much it asks, the conversation keeps some room, and what's asked scrolls in its own. */
163
+ .chat-asks { flex: none; display: grid; gap: 8px; width: 100%; max-width: 848px; max-height: 60%; margin: 0 auto;
164
+ padding: 2px 24px 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
165
+ scrollbar-color: var(--input) transparent; }
162
166
  .chat-asks:empty, .chat-asks .copilotz-loading { display: none; }
163
167
 
164
168
  /* Where you type */
165
- .chat-composer { flex: none; padding: 0 24px 14px;
169
+ .chat-composer { flex: none; padding: 0 24px max(14px, env(safe-area-inset-bottom));
166
170
  background: linear-gradient(to bottom, transparent, var(--background) 18px); }
167
171
  .chat-composer-inner { max-width: 800px; margin: 0 auto; }
168
172
  .chat-status { display: flex; align-items: center; gap: 10px; margin: 0 6px 8px; color: var(--muted-foreground);
@@ -323,7 +327,7 @@ a.msg-name:hover { text-decoration: underline; text-underline-offset: 3px;
323
327
  .msg-gutter .copilotz-avatar { --size: 26px !important; }
324
328
  .msg-mine { grid-template-columns: minmax(0, 1fr); }
325
329
  .msg-aside { margin-left: 10px; padding-left: 10px; }
326
- .chat-composer { padding: 0 10px 10px; }
330
+ .chat-composer { padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
327
331
  .chat-asks { padding: 2px 10px 8px; }
328
332
  .voice-rec-meter { gap: 10px; padding: 0 6px 0 8px; }
329
333
  .voice-error { flex-wrap: wrap; }
@@ -20,7 +20,15 @@ export const memoryWeb = definePlugin({
20
20
  "memory.pick": { web: memoryPickView },
21
21
  },
22
22
  resources: {
23
- spaceTabs: { memories: { title: "Memories", view: "memories", icon: "sparkles", order: 20 } },
23
+ spaceTabs: {
24
+ memories: {
25
+ title: "Memories",
26
+ view: "memories",
27
+ icon: "sparkles",
28
+ under: "settings",
29
+ order: 20,
30
+ },
31
+ },
24
32
  palette: { memory: { view: "memory.palette", order: 40 } },
25
33
  },
26
34
  });
@@ -30,7 +30,7 @@ export const routinesWeb = definePlugin({
30
30
  "routine.step": { web: routineStepView },
31
31
  },
32
32
  resources: {
33
- spaceTabs: { routines: { title: "Routines", view: "routines", icon: "refresh", order: 40 } },
33
+ spaceTabs: { routines: { title: "Routines", view: "routines", icon: "refresh", order: 50 } },
34
34
  palette: { routines: { view: "routine.palette", order: 46 } },
35
35
  toolViews: { schedule_routine: "routine.step" },
36
36
  },
@@ -28,7 +28,9 @@ export const skillsWeb = definePlugin({
28
28
  "skill.step": { web: skillStepView },
29
29
  },
30
30
  resources: {
31
- spaceTabs: { skills: { title: "Skills", view: "skills", icon: "tool", order: 60 } },
31
+ spaceTabs: {
32
+ skills: { title: "Skills", view: "skills", icon: "tool", under: "settings", order: 30 },
33
+ },
32
34
  palette: { skills: { view: "skill.palette", order: 45 } },
33
35
  toolViews: { read_skill: "skill.step" },
34
36
  },
@@ -28,6 +28,8 @@ export const appsWeb = definePlugin({
28
28
  resources: {
29
29
  jobActions: { publish: { view: "app.publish", order: 10 } },
30
30
  envActions: { apps: { view: "app.env-apply", order: 10 } },
31
- spaceTabs: { apps: { title: "Apps", view: "app.space", icon: "globe", order: 35 } },
31
+ spaceTabs: {
32
+ apps: { title: "Apps", view: "app.space", icon: "globe", under: "computer", order: 20 },
33
+ },
32
34
  },
33
35
  });
@@ -1,2 +1,2 @@
1
1
  /** The computer program's version, as `computer.info` and `--version` say it, and its builds are named. */
2
- export declare const VERSION = "1.0.0-rc.8";
2
+ export declare const VERSION = "1.0.0-rc.9";
@@ -1,2 +1,2 @@
1
1
  /** The computer program's version, as `computer.info` and `--version` say it, and its builds are named. */
2
- export const VERSION = "1.0.0-rc.8";
2
+ export const VERSION = "1.0.0-rc.9";
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * ```ts
16
16
  * plugins: [...plugins, await computerDownloads()]
17
- * plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.8" })]
17
+ * plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.9" })]
18
18
  * plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })]
19
19
  * ```
20
20
  */
@@ -5,7 +5,9 @@
5
5
  * on which computer, with Allow once · Allow in this conversation · Always
6
6
  * allow · Deny (`computer.approve`, whose answer goes into the
7
7
  * conversation, and the agent carries on). A write shows what it will write
8
- * first (its `preview`: a new file's first lines, or an edit's change). The
8
+ * first (its `preview`: a new file's first lines, or an edit's change). What
9
+ * it shows scrolls in a few lines of its own, however long (a command can
10
+ * wrap into dozens), so the answers always show under it. The
9
11
  * cards wait for the agent's turn to be over (`working` false), so they
10
12
  * come once it has said why, gently; answered, one goes: `approval.pending`
11
13
  * is live. The agent shows as it's named (chat's `agentsShown`).
@@ -6,7 +6,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  * on which computer, with Allow once · Allow in this conversation · Always
7
7
  * allow · Deny (`computer.approve`, whose answer goes into the
8
8
  * conversation, and the agent carries on). A write shows what it will write
9
- * first (its `preview`: a new file's first lines, or an edit's change). The
9
+ * first (its `preview`: a new file's first lines, or an edit's change). What
10
+ * it shows scrolls in a few lines of its own, however long (a command can
11
+ * wrap into dozens), so the answers always show under it. The
10
12
  * cards wait for the agent's turn to be over (`working` false), so they
11
13
  * come once it has said why, gently; answered, one goes: `approval.pending`
12
14
  * is live. The agent shows as it's named (chat's `agentsShown`).
@@ -55,8 +57,8 @@ function Ask({ approval: a, computer, call }) {
55
57
  };
56
58
  const allow = (said, label, variant) => (_jsx(Tooltip, { text: reach(said, a, computer), children: _jsx(Button, { size: "sm", variant: variant, loading: busy === said, disabled: !!busy, onClick: () => void answer(said), children: label }) }));
57
59
  return (_jsxs(Card, { as: "article", padding: "none", className: "ask", "aria-label": sentence(a), children: [_jsx("span", { className: "ask-icon", "aria-hidden": "true", children: _jsx(Icon, { name: ICONS[a.work] ?? "tool", size: 16 }) }), _jsxs("div", { className: "ask-main", children: [_jsxs("p", { className: "ask-head", children: [_jsx("b", { children: a.agent }), " ", wants, _jsxs("span", { className: "ask-where", children: [computer ? _jsxs(_Fragment, { children: ["on ", computer, " \u00B7"] }) : null, _jsx(Time, { at: a.at })] })] }), a.work === "publish" ? _jsx(Publish, { approval: a }) : a.work === "writes" && preview
58
- ? (_jsx(CodeBlock, { className: "ask-what ask-preview", title: _jsx("code", { children: what }), code: previewOf(preview, verb), lines: 8, label: `What it will write in ${what}` }))
59
- : (_jsx(CodeBlock, { className: "ask-what", code: a.work === "writes" ? what : [{ text: "$ ", tone: "muted" }, { text: what }], lines: 6, label: a.work === "writes" ? "The file" : "The command" })), _jsxs("div", { className: "ask-answers", children: [allow("once", "Allow once", "primary"), allow("thread", "Allow in this conversation", "outline"), allow("always", "Always allow", "outline"), _jsx(Button, { size: "sm", variant: "ghost", className: "ask-deny", loading: busy === "deny", disabled: !!busy, onClick: () => void answer("deny"), children: "Deny" })] }), error ? _jsx("p", { role: "alert", className: "ask-error", children: error }) : null] })] }));
60
+ ? (_jsx(CodeBlock, { className: "ask-what ask-preview", title: _jsx("code", { children: what }), code: previewOf(preview, verb), height: 8, label: `What it will write in ${what}` }))
61
+ : (_jsx(CodeBlock, { className: "ask-what", code: a.work === "writes" ? what : [{ text: "$ ", tone: "muted" }, { text: what }], height: 6, copy: what, label: a.work === "writes" ? "The file" : "The command" })), _jsxs("div", { className: "ask-answers", children: [allow("once", "Allow once", "primary"), allow("thread", "Allow in this conversation", "outline"), allow("always", "Always allow", "outline"), _jsx(Button, { size: "sm", variant: "ghost", className: "ask-deny", loading: busy === "deny", disabled: !!busy, onClick: () => void answer("deny"), children: "Deny" })] }), error ? _jsx("p", { role: "alert", className: "ask-error", children: error }) : null] })] }));
60
62
  }
61
63
  /** What publishing would do: the app, where it'll be, what it's built from, and that it runs on its own. */
62
64
  function Publish({ approval: a }) {
@@ -69,8 +69,15 @@ export const computersWeb = definePlugin({
69
69
  resources: {
70
70
  sidebar: { waiting: { view: "computer.waiting", order: 5 } },
71
71
  spaceTabs: {
72
- computer: { title: "Computer", view: "computer.space", icon: "computer", order: 30 },
73
- env: { title: "Environment", view: "env.space", icon: "lock", order: 32 },
72
+ // The computer, then what goes with it: its environment (and the apps', apps/web.tsx).
73
+ computer: {
74
+ title: "Computer",
75
+ view: "computer.space",
76
+ icon: "computer",
77
+ order: 40,
78
+ own: "Computers",
79
+ },
80
+ env: { title: "Environment", view: "env.space", icon: "lock", under: "computer", order: 10 },
74
81
  },
75
82
  conversation: { "computer.asks": { view: "computer.asks", order: 10 } },
76
83
  palette: { computers: { view: "computer.palette", order: 30 } },
@@ -20,7 +20,9 @@ export const apiWeb = definePlugin({
20
20
  requires: ["api", "web-shell"],
21
21
  views: { "api.keys": { web: keysView }, "api.palette": { web: apiPaletteView } },
22
22
  resources: {
23
- spaceTabs: { api: { title: "API", view: "api.keys", icon: "terminal", order: 85 } },
23
+ spaceTabs: {
24
+ api: { title: "API", view: "api.keys", icon: "terminal", under: "settings", order: 50 },
25
+ },
24
26
  apiPresets: presets,
25
27
  palette: { api: { view: "api.palette", order: 40 } },
26
28
  },
@@ -23,7 +23,14 @@ export const whatsappWeb = definePlugin({
23
23
  resources: {
24
24
  palette: { whatsapp: { view: "whatsapp.palette", order: 40 } },
25
25
  spaceTabs: {
26
- whatsapp: { title: "WhatsApp", view: "whatsapp.space", icon: "send", order: 84 },
26
+ whatsapp: {
27
+ title: "WhatsApp",
28
+ view: "whatsapp.space",
29
+ icon: "chat-round",
30
+ under: "settings",
31
+ group: "Channels",
32
+ order: 40,
33
+ },
27
34
  },
28
35
  },
29
36
  });