@lemonriver/core 0.3.0 → 0.5.0

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 (146) hide show
  1. package/README.md +14 -4
  2. package/dist/{build-Bqo69DWP.js → build-CS1goZxt.js} +1 -1
  3. package/dist/cli/bin.js +4 -4
  4. package/dist/{config-DJ5rkMMg.js → config-BpbcCbUv.js} +3835 -1532
  5. package/dist/{config-teo3kWz7.d.ts → config-CYNOR93W.d.ts} +1 -1
  6. package/dist/{dev-B2FJD5bJ.js → dev-BpYnfgLL.js} +2 -2
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.js +1 -1
  9. package/dist/locale/index.d.ts +1 -1
  10. package/dist/locale/index.js +1 -1
  11. package/dist/{preview-C93BOZL1.js → preview-HSzPPkSs.js} +1 -1
  12. package/dist/{types-DFK02XVv.d.ts → types-tdaXSyah.d.ts} +1 -0
  13. package/dist/{update-DsxZBtwv.js → update-CMRxtTc9.js} +18 -8
  14. package/dist/vite/index.d.ts +1 -1
  15. package/dist/vite/index.js +1 -1
  16. package/dist/{zh-tw-DwTAZKa6.js → zh-tw-DcrDeKxr.js} +5 -0
  17. package/package.json +2 -2
  18. package/src/agent/prompt.ts +2 -0
  19. package/src/agent/types.ts +14 -2
  20. package/src/app/components/agent/agent-panel.tsx +19 -5
  21. package/src/app/components/agent/connect-view.tsx +1 -1
  22. package/src/app/components/agent/provider-logo.tsx +10 -1
  23. package/src/app/components/player.tsx +105 -23
  24. package/src/app/components/present/curtain.tsx +52 -0
  25. package/src/app/components/present/last-slide-hint.tsx +36 -0
  26. package/src/app/components/sidebar/sidebar-footer.tsx +6 -1
  27. package/src/app/components/thumbnail-rail.tsx +1 -0
  28. package/src/app/lemonriver/agent/lemon.tsx +16 -1
  29. package/src/app/lemonriver/agent/provider-marks.tsx +53 -0
  30. package/src/app/lemonriver/agent-prefs/prefs.test.ts +173 -0
  31. package/src/app/lemonriver/agent-prefs/prefs.ts +137 -0
  32. package/src/app/lemonriver/agent-prefs/use-prefs.ts +36 -0
  33. package/src/app/lemonriver/agent-providers/section.tsx +75 -0
  34. package/src/app/lemonriver/agent-providers/use-providers.ts +61 -0
  35. package/src/app/lemonriver/board/blocks/block-panel.tsx +666 -0
  36. package/src/app/lemonriver/board/blocks/cache.ts +28 -0
  37. package/src/app/lemonriver/board/blocks/change-list.tsx +189 -0
  38. package/src/app/lemonriver/board/blocks/classify.test.ts +204 -0
  39. package/src/app/lemonriver/board/blocks/classify.ts +125 -0
  40. package/src/app/lemonriver/board/blocks/snapshot.ts +86 -0
  41. package/src/app/lemonriver/board/board-canvas.tsx +627 -104
  42. package/src/app/lemonriver/board/board-page.tsx +1687 -91
  43. package/src/app/lemonriver/board/board.css +58 -7
  44. package/src/app/lemonriver/board/layout.test.ts +84 -0
  45. package/src/app/lemonriver/board/layout.ts +112 -11
  46. package/src/app/lemonriver/board/model/agent-tasks.test.ts +200 -0
  47. package/src/app/lemonriver/board/model/agent-tasks.ts +191 -0
  48. package/src/app/lemonriver/board/model/apply-prompt.test.ts +121 -0
  49. package/src/app/lemonriver/board/model/apply-prompt.ts +115 -0
  50. package/src/app/lemonriver/board/model/apply.ts +71 -0
  51. package/src/app/lemonriver/board/model/cards.test.ts +95 -2
  52. package/src/app/lemonriver/board/model/cards.ts +88 -20
  53. package/src/app/lemonriver/board/model/changes.test.ts +244 -0
  54. package/src/app/lemonriver/board/model/changes.ts +268 -0
  55. package/src/app/lemonriver/board/model/filter.test.ts +50 -0
  56. package/src/app/lemonriver/board/model/filter.ts +42 -0
  57. package/src/app/lemonriver/board/model/history.test.ts +71 -0
  58. package/src/app/lemonriver/board/model/history.ts +51 -0
  59. package/src/app/lemonriver/board/model/restructure.test.ts +205 -0
  60. package/src/app/lemonriver/board/model/restructure.ts +169 -0
  61. package/src/app/lemonriver/board/model/structure.test.ts +249 -0
  62. package/src/app/lemonriver/board/model/structure.ts +209 -0
  63. package/src/app/lemonriver/board/model/timing.test.ts +113 -0
  64. package/src/app/lemonriver/board/model/timing.ts +117 -0
  65. package/src/app/lemonriver/board/page-node.tsx +236 -55
  66. package/src/app/lemonriver/board/status-style.ts +25 -0
  67. package/src/app/lemonriver/board/use-board-apply.ts +206 -0
  68. package/src/app/lemonriver/board/use-board-cards.ts +108 -5
  69. package/src/app/lemonriver/board/use-board-changes.ts +108 -0
  70. package/src/app/lemonriver/board/use-board-columns.ts +37 -56
  71. package/src/app/lemonriver/board/use-board-comments.ts +36 -0
  72. package/src/app/lemonriver/board/use-board-restructures.ts +107 -0
  73. package/src/app/lemonriver/board/use-history.ts +86 -0
  74. package/src/app/lemonriver/board/use-page-order.ts +65 -38
  75. package/src/app/lemonriver/board/use-target-minutes.ts +47 -0
  76. package/src/app/lemonriver/board/views/block-readings.tsx +46 -0
  77. package/src/app/lemonriver/board/views/list-view.tsx +356 -0
  78. package/src/app/lemonriver/board/views/progress.tsx +32 -0
  79. package/src/app/lemonriver/board/views/timeline-view.tsx +341 -0
  80. package/src/app/lemonriver/brand/mascot.tsx +86 -0
  81. package/src/app/lemonriver/brand/mascots/design-done.png +0 -0
  82. package/src/app/lemonriver/brand/mascots/design-idle.png +0 -0
  83. package/src/app/lemonriver/brand/mascots/design-needs-you.png +0 -0
  84. package/src/app/lemonriver/brand/mascots/design-working.png +0 -0
  85. package/src/app/lemonriver/brand/mascots/outline-done.png +0 -0
  86. package/src/app/lemonriver/brand/mascots/outline-idle.png +0 -0
  87. package/src/app/lemonriver/brand/mascots/outline-needs-you.png +0 -0
  88. package/src/app/lemonriver/brand/mascots/outline-working.png +0 -0
  89. package/src/app/lemonriver/brand/mascots/research-done.png +0 -0
  90. package/src/app/lemonriver/brand/mascots/research-idle.png +0 -0
  91. package/src/app/lemonriver/brand/mascots/research-needs-you.png +0 -0
  92. package/src/app/lemonriver/brand/mascots/research-working.png +0 -0
  93. package/src/app/lemonriver/brand/mascots/review-done.png +0 -0
  94. package/src/app/lemonriver/brand/mascots/review-idle.png +0 -0
  95. package/src/app/lemonriver/brand/mascots/review-needs-you.png +0 -0
  96. package/src/app/lemonriver/brand/mascots/review-working.png +0 -0
  97. package/src/app/lemonriver/chrome/app-chrome.tsx +2 -0
  98. package/src/app/lemonriver/features.test.ts +5 -0
  99. package/src/app/lemonriver/features.ts +2 -1
  100. package/src/app/lemonriver/home/brief-card.tsx +8 -1
  101. package/src/app/lemonriver/home/home-page.tsx +11 -7
  102. package/src/app/lemonriver/onboarding/onboarding.tsx +182 -0
  103. package/src/app/lemonriver/outline/build-team.tsx +278 -0
  104. package/src/app/lemonriver/outline/describe-page.tsx +380 -0
  105. package/src/app/lemonriver/outline/files.test.ts +90 -0
  106. package/src/app/lemonriver/outline/files.ts +69 -0
  107. package/src/app/lemonriver/outline/model.test.ts +672 -0
  108. package/src/app/lemonriver/outline/model.ts +455 -0
  109. package/src/app/lemonriver/outline/outline-page.tsx +537 -0
  110. package/src/app/lemonriver/outline/pending-pages.tsx +39 -0
  111. package/src/app/lemonriver/outline/rule.ts +3 -0
  112. package/src/app/lemonriver/outline/steps.tsx +43 -0
  113. package/src/app/lemonriver/outline/use-build-driver.ts +258 -0
  114. package/src/app/lemonriver/routes.test.tsx +6 -6
  115. package/src/app/lemonriver/routes.tsx +28 -0
  116. package/src/app/lemonriver/settings/settings-page.tsx +214 -0
  117. package/src/app/lemonriver/slide-extensions.tsx +45 -26
  118. package/src/app/lemonriver/text/en.ts +320 -0
  119. package/src/app/lemonriver/text/es.ts +311 -0
  120. package/src/app/lemonriver/text/ja.ts +313 -0
  121. package/src/app/lemonriver/text/text.test.ts +33 -0
  122. package/src/app/lemonriver/text/types.ts +339 -0
  123. package/src/app/lemonriver/text/zh-cn.ts +307 -0
  124. package/src/app/lemonriver/text/zh-tw.ts +307 -0
  125. package/src/app/lemonriver/theme/app.css +12 -1
  126. package/src/app/lemonriver/theme/lemon-icon.tsx +6 -0
  127. package/src/app/lemonriver/theme/pages.test.ts +4 -0
  128. package/src/app/lemonriver/theme/pages.ts +11 -2
  129. package/src/app/lemonriver/theme/theme-menu.tsx +3 -2
  130. package/src/app/lemonriver/theme/use-theme.tsx +2 -2
  131. package/src/app/lemonriver/update/beta-badge.tsx +26 -0
  132. package/src/app/lemonriver/update/prompt.test.ts +84 -0
  133. package/src/app/lemonriver/update/prompt.ts +48 -0
  134. package/src/app/lemonriver/update/update-prompt.tsx +113 -0
  135. package/src/app/lib/agent/use-agent.ts +4 -3
  136. package/src/app/routes/home.tsx +13 -5
  137. package/src/app/routes/slide.tsx +71 -14
  138. package/src/locale/en.ts +1 -0
  139. package/src/locale/es.ts +1 -0
  140. package/src/locale/ja.ts +1 -0
  141. package/src/locale/types.ts +1 -0
  142. package/src/locale/zh-cn.ts +1 -0
  143. package/src/locale/zh-tw.ts +1 -0
  144. package/src/app/assets/open-slide.svg +0 -39
  145. package/src/app/favicon.ico +0 -0
  146. package/src/app/favicon.svg +0 -39
@@ -1,4 +1,4 @@
1
- import { t as Locale } from "./types-DFK02XVv.js";
1
+ import { t as Locale } from "./types-tdaXSyah.js";
2
2
  //#region src/config.d.ts
3
3
  type LemonRiverBuildConfig = {
4
4
  showSlideBrowser?: boolean;
@@ -1,6 +1,6 @@
1
- import { V as PKG_NAMES } from "./update-DsxZBtwv.js";
1
+ import { V as PKG_NAMES } from "./update-CMRxtTc9.js";
2
2
  import { a as printUrls, i as printShortcutsHint, n as formatError, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
3
- import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-DJ5rkMMg.js";
3
+ import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-BpbcCbUv.js";
4
4
  import path from "node:path";
5
5
  import { existsSync } from "node:fs";
6
6
  import { fork } from "node:child_process";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as Plural, t as Locale } from "./types-DFK02XVv.js";
2
- import { i as OpenSlideConfig, n as LemonRiverBuildConfig, r as LemonRiverConfig, t as LemonRiverAgentConfig } from "./config-teo3kWz7.js";
1
+ import { n as Plural, t as Locale } from "./types-tdaXSyah.js";
2
+ import { i as OpenSlideConfig, n as LemonRiverBuildConfig, r as LemonRiverConfig, t as LemonRiverAgentConfig } from "./config-CYNOR93W.js";
3
3
  import { CSSProperties, ComponentType, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
4
4
  //#region src/app/components/image-placeholder.d.ts
5
5
  type ImagePlaceholderProps = {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "./zh-tw-DwTAZKa6.js";
1
+ import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "./zh-tw-DcrDeKxr.js";
2
2
  import { n as defaultDesign, r as designToCssVars, t as cssVarsToString } from "./design-Cpqx7SJs.js";
3
3
  import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { toast } from "sonner";
@@ -1,4 +1,4 @@
1
- import { n as Plural, t as Locale } from "../types-DFK02XVv.js";
1
+ import { n as Plural, t as Locale } from "../types-tdaXSyah.js";
2
2
  //#region src/locale/en.d.ts
3
3
  declare const en: Locale;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "../zh-tw-DwTAZKa6.js";
1
+ import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "../zh-tw-DcrDeKxr.js";
2
2
  //#region src/locale/format.ts
3
3
  function format(template, vars) {
4
4
  return template.replace(/\{(\w+)\}/g, (m, key) => {
@@ -1,5 +1,5 @@
1
1
  import { a as printUrls, i as printShortcutsHint, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
2
- import { t as createViteConfig } from "./config-DJ5rkMMg.js";
2
+ import { t as createViteConfig } from "./config-BpbcCbUv.js";
3
3
  import { mergeConfig, preview as preview$1 } from "vite";
4
4
  //#region src/cli/preview.ts
5
5
  async function preview(opts = {}) {
@@ -181,6 +181,7 @@ type Locale = {
181
181
  helpAria: string;
182
182
  exitAria: string;
183
183
  elapsedTime: string;
184
+ lastSlideHint: string;
184
185
  helpEyebrow: string;
185
186
  helpTitle: string;
186
187
  shortcutNext: string;
@@ -99,28 +99,37 @@ function declaredFrameworkSpecifier(userCwd) {
99
99
  for (const name of PKG_NAMES) if (name in deps) return name;
100
100
  return PKG_NAME;
101
101
  }
102
- function aliasTarget(value) {
103
- if (!value.startsWith("npm:")) return null;
104
- const rest = value.slice(4);
102
+ function aliasTarget(key, value) {
103
+ if (value.startsWith("npm:")) {
104
+ const rest = value.slice(4);
105
+ const at = rest.lastIndexOf("@");
106
+ return at > 0 ? rest.slice(0, at) : rest;
107
+ }
108
+ if (!value.startsWith("workspace:")) return null;
109
+ const rest = value.slice(10);
110
+ if (!rest.includes("@")) return null;
105
111
  const at = rest.lastIndexOf("@");
106
- return at > 0 ? rest.slice(0, at) : rest;
112
+ const target = at > 0 ? rest.slice(0, at) : rest;
113
+ return target === key ? null : target;
107
114
  }
108
115
  function readFrameworkDependency(userCwd) {
109
116
  const deps = readDeps(userCwd);
110
117
  for (const name of PKG_NAMES) {
111
118
  const value = deps[name];
112
119
  if (value === void 0) continue;
113
- const aliased = aliasTarget(value);
120
+ const aliased = aliasTarget(name, value);
114
121
  return {
115
122
  key: name,
116
123
  pkg: aliased ?? name,
117
- addTarget: aliased ? `${name}@npm:${aliased}@latest` : `${name}@latest`
124
+ addTarget: aliased ? `${name}@npm:${aliased}@latest` : `${name}@latest`,
125
+ workspace: value.startsWith("workspace:")
118
126
  };
119
127
  }
120
128
  return {
121
129
  key: PKG_NAME,
122
130
  pkg: PKG_NAME,
123
- addTarget: `${PKG_NAME}@latest`
131
+ addTarget: `${PKG_NAME}@latest`,
132
+ workspace: false
124
133
  };
125
134
  }
126
135
  //#endregion
@@ -1063,7 +1072,8 @@ async function updatePackage(ctx) {
1063
1072
  function registerUpdateRoutes(server, ctx) {
1064
1073
  server.middlewares.use("/__update-check", async (req, res, next) => {
1065
1074
  if ((req.method ?? "GET") !== "GET") return next();
1066
- const latest = await fetchLatest(readFrameworkDependency(ctx.userCwd).pkg, Date.now());
1075
+ const dependency = readFrameworkDependency(ctx.userCwd);
1076
+ const latest = dependency.workspace ? null : await fetchLatest(dependency.pkg, Date.now());
1067
1077
  const result = {
1068
1078
  current: ctx.coreVersion,
1069
1079
  latest,
@@ -1,4 +1,4 @@
1
- import { r as LemonRiverConfig } from "../config-teo3kWz7.js";
1
+ import { r as LemonRiverConfig } from "../config-CYNOR93W.js";
2
2
  import { InlineConfig } from "vite";
3
3
  //#region src/vite/config.d.ts
4
4
  type CreateViteConfigOptions = {
@@ -1,2 +1,2 @@
1
- import { t as createViteConfig } from "../config-DJ5rkMMg.js";
1
+ import { t as createViteConfig } from "../config-BpbcCbUv.js";
2
2
  export { createViteConfig };
@@ -168,6 +168,7 @@ const en = {
168
168
  helpAria: "Keyboard shortcuts (?)",
169
169
  exitAria: "Exit (Esc)",
170
170
  elapsedTime: "Elapsed time",
171
+ lastSlideHint: "Last slide · Press Esc to exit",
171
172
  helpEyebrow: "Present mode",
172
173
  helpTitle: "Keyboard shortcuts",
173
174
  shortcutNext: "Next slide",
@@ -796,6 +797,7 @@ const es = {
796
797
  helpAria: "Atajos de teclado (?)",
797
798
  exitAria: "Salir (Esc)",
798
799
  elapsedTime: "Tiempo transcurrido",
800
+ lastSlideHint: "Última diapositiva · Pulsa Esc para salir",
799
801
  helpEyebrow: "Modo presentación",
800
802
  helpTitle: "Atajos de teclado",
801
803
  shortcutNext: "Diapositiva siguiente",
@@ -1424,6 +1426,7 @@ const ja = {
1424
1426
  helpAria: "キーボードショートカット (?)",
1425
1427
  exitAria: "終了 (Esc)",
1426
1428
  elapsedTime: "経過時間",
1429
+ lastSlideHint: "最後のスライドです · Esc で終了",
1427
1430
  helpEyebrow: "発表モード",
1428
1431
  helpTitle: "キーボードショートカット",
1429
1432
  shortcutNext: "次のスライド",
@@ -2052,6 +2055,7 @@ const zhCN = {
2052
2055
  helpAria: "键盘快捷键 (?)",
2053
2056
  exitAria: "退出 (Esc)",
2054
2057
  elapsedTime: "已用时",
2058
+ lastSlideHint: "已是最后一页 · 按 Esc 退出放映",
2055
2059
  helpEyebrow: "演示模式",
2056
2060
  helpTitle: "键盘快捷键",
2057
2061
  shortcutNext: "下一张",
@@ -2680,6 +2684,7 @@ const zhTW = {
2680
2684
  helpAria: "鍵盤快速鍵 (?)",
2681
2685
  exitAria: "離開 (Esc)",
2682
2686
  elapsedTime: "已耗時",
2687
+ lastSlideHint: "已是最後一頁 · 按 Esc 結束播放",
2683
2688
  helpEyebrow: "簡報模式",
2684
2689
  helpTitle: "鍵盤快速鍵",
2685
2690
  shortcutNext: "下一張",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lemonriver/core",
3
- "version": "0.3.0",
4
- "description": "Runtime and CLI for LemonRiver — write slides in slides/, we handle the rest.",
3
+ "version": "0.5.0",
4
+ "description": "The LemonRiver runtime: deck viewer, story board, present mode, agent panel and export.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -1,3 +1,4 @@
1
+ import { OUTLINE_RULE } from '../app/lemonriver/outline/rule.ts';
1
2
  import { UNTITLED_SLIDE_ID_RE } from '../editing/placeholder-id.ts';
2
3
  import { parseQuestions } from './provider.ts';
3
4
  import type { AgentQuestion, AgentTurnContext } from './types.ts';
@@ -14,6 +15,7 @@ export function systemPromptAppend(askInstruction: string): string {
14
15
  'The workspace is a LemonRiver project: decks live under slides/<id>/index.tsx and the dev server hot-reloads every edit, so the user sees changes immediately.',
15
16
  'Use the project skills: create-slide to draft a new deck, apply-comments to resolve @slide-comment markers left by the inspector, create-theme for themes, and slide-authoring as the technical reference before writing a page.',
16
17
  PAGE_BY_PAGE,
18
+ OUTLINE_RULE,
17
19
  'Keep replies short and concrete: the panel is narrow. Prefer doing the work over describing it, and finish with a one-line summary of what changed.',
18
20
  askInstruction,
19
21
  ].join(' ');
@@ -1,13 +1,23 @@
1
1
  export const AGENT_PROVIDER_IDS = ['claude', 'codex'] as const;
2
2
 
3
- export type AgentProviderId = (typeof AGENT_PROVIDER_IDS)[number];
3
+ // Extra providers this release adds. They stay out of the panel until the user
4
+ // switches them on in Settings, so a default workspace behaves as before.
5
+ export const LEMONRIVER_PROVIDER_IDS = ['workbuddy', 'dumate'] as const;
6
+
7
+ export type AgentProviderId =
8
+ | (typeof AGENT_PROVIDER_IDS)[number]
9
+ | (typeof LEMONRIVER_PROVIDER_IDS)[number];
4
10
 
5
11
  export const AGENT_EFFORTS = ['minimal', 'low', 'medium', 'high', 'xhigh', 'max'] as const;
6
12
 
7
13
  export type AgentEffort = (typeof AGENT_EFFORTS)[number];
8
14
 
9
15
  export function isAgentProviderId(value: unknown): value is AgentProviderId {
10
- return typeof value === 'string' && (AGENT_PROVIDER_IDS as readonly string[]).includes(value);
16
+ return (
17
+ typeof value === 'string' &&
18
+ ((AGENT_PROVIDER_IDS as readonly string[]).includes(value) ||
19
+ (LEMONRIVER_PROVIDER_IDS as readonly string[]).includes(value))
20
+ );
11
21
  }
12
22
 
13
23
  export function isAgentEffort(value: unknown): value is AgentEffort {
@@ -19,6 +29,8 @@ export type AgentModelOption = {
19
29
  id: string;
20
30
  label: string;
21
31
  efforts: AgentEffort[];
32
+ // The effort that option's client is set to, for the follow-the-client row.
33
+ clientEffort?: AgentEffort | null;
22
34
  };
23
35
 
24
36
  export type AgentProviderStatus = {
@@ -48,6 +48,8 @@ import type {
48
48
  RespondPayload,
49
49
  } from '../../../agent/types';
50
50
  import { PanelLemon } from '../../lemonriver/agent/lemon';
51
+ import { BuildTeam } from '../../lemonriver/outline/build-team';
52
+ import { useLrText } from '../../lemonriver/text';
51
53
  import { Composer, ContextChip } from './composer';
52
54
  import { ConnectView } from './connect-view';
53
55
  import { HistoryView } from './history-view';
@@ -289,6 +291,7 @@ export function AgentPanel({
289
291
  </div>
290
292
  </header>
291
293
 
294
+ {context.slideId && <BuildTeam slideId={context.slideId} />}
292
295
  {loading ? (
293
296
  <p className="px-4 py-5 text-[12px] text-muted-foreground">{t.agent.statusLoading}…</p>
294
297
  ) : showConnect ? (
@@ -355,8 +358,8 @@ export function AgentPanel({
355
358
  );
356
359
  }
357
360
 
358
- function modelLabel(model: AgentModelOption, t: ReturnType<typeof useLocale>): string {
359
- return model.id ? model.label : t.agent.modelDefault;
361
+ function modelLabel(model: AgentModelOption): string {
362
+ return model.label;
360
363
  }
361
364
 
362
365
  function ModelMenu({
@@ -377,6 +380,7 @@ function ModelMenu({
377
380
  onManage: () => void;
378
381
  }) {
379
382
  const t = useLocale();
383
+ const lr = useLrText();
380
384
  const [open, setOpen] = useState(false);
381
385
  const providers = status?.enabled ? status.providers : [];
382
386
  const [tab, setTab] = useState<AgentProviderId | null>(providerId);
@@ -403,7 +407,7 @@ function ModelMenu({
403
407
  ) : (
404
408
  <span aria-hidden className="size-1.5 rounded-full bg-muted-foreground/50" />
405
409
  )}
406
- <span className="truncate">{model ? modelLabel(model, t) : t.agent.title}</span>
410
+ <span className="truncate">{model ? modelLabel(model) : t.agent.title}</span>
407
411
  {effort && (
408
412
  <span className="shrink-0 font-normal text-muted-foreground">
409
413
  {t.agent.efforts[effort]}
@@ -463,10 +467,15 @@ function ModelMenu({
463
467
  key={m.id}
464
468
  type="button"
465
469
  aria-pressed={checked}
470
+ title={
471
+ m.id === ''
472
+ ? format(lr.agentModel.followClientHint, { provider: shown.name })
473
+ : undefined
474
+ }
466
475
  onClick={() =>
467
476
  setModelChoice(shown.id, {
468
477
  model: m.id,
469
- effort: modelChoices[shown.id]?.effort ?? null,
478
+ effort: m.id ? (modelChoices[shown.id]?.effort ?? null) : null,
470
479
  })
471
480
  }
472
481
  className={cn(
@@ -474,7 +483,12 @@ function ModelMenu({
474
483
  checked && 'font-medium',
475
484
  )}
476
485
  >
477
- <span className="truncate">{modelLabel(m, t)}</span>
486
+ <span className="truncate">{modelLabel(m)}</span>
487
+ {m.id === '' && (
488
+ <span className="ml-auto shrink-0 text-[11px] font-normal text-muted-foreground">
489
+ {lr.agentModel.followClient}
490
+ </span>
491
+ )}
478
492
  {checked && <Check className="size-3.5 shrink-0" aria-hidden />}
479
493
  </button>
480
494
  );
@@ -13,7 +13,7 @@ import { cn } from '@/lib/utils';
13
13
  import type { AgentProviderId, AgentProviderStatus } from '../../../agent/types';
14
14
  import { ProviderLogo } from './provider-logo';
15
15
 
16
- const CLI_INSTALL: Record<AgentProviderId, string> = {
16
+ const CLI_INSTALL: Partial<Record<AgentProviderId, string>> = {
17
17
  claude: 'npm install -g @anthropic-ai/claude-code',
18
18
  codex: 'npm install -g @openai/codex',
19
19
  };
@@ -1,5 +1,6 @@
1
1
  import type { SVGProps } from 'react';
2
2
  import type { AgentProviderId } from '../../../agent/types';
3
+ import { ExtraProviderLogo } from '../../lemonriver/agent/provider-marks';
3
4
 
4
5
  // Marks from svgl.app (claude-ai-icon, openai).
5
6
  function ClaudeLogo(props: SVGProps<SVGSVGElement>) {
@@ -28,7 +29,15 @@ function OpenAILogo(props: SVGProps<SVGSVGElement>) {
28
29
 
29
30
  export function ProviderLogo({
30
31
  provider,
32
+ className,
31
33
  ...props
32
34
  }: { provider: AgentProviderId } & SVGProps<SVGSVGElement>) {
33
- return provider === 'claude' ? <ClaudeLogo {...props} /> : <OpenAILogo {...props} />;
35
+ if (provider !== 'claude' && provider !== 'codex') {
36
+ return <ExtraProviderLogo provider={provider} className={className} />;
37
+ }
38
+ return provider === 'claude' ? (
39
+ <ClaudeLogo className={className} {...props} />
40
+ ) : (
41
+ <OpenAILogo className={className} {...props} />
42
+ );
34
43
  }
@@ -12,9 +12,16 @@ import { usePrefersReducedMotion } from '../lib/use-prefers-reduced-motion';
12
12
  import { OverviewGrid } from './overview-grid';
13
13
  import { PresentBlackoutOverlay } from './present/blackout-overlay';
14
14
  import { PresentControlBar } from './present/control-bar';
15
+ import {
16
+ afterPaint,
17
+ CURTAIN_FADE_MS,
18
+ PresentCurtain,
19
+ whenFullscreenSettled,
20
+ } from './present/curtain';
15
21
  import { PresentHelpOverlay } from './present/help-overlay';
16
22
  import { PresentJumpInput } from './present/jump-input';
17
23
  import { PresentLaserPointer } from './present/laser-pointer';
24
+ import { PresentLastSlideHint } from './present/last-slide-hint';
18
25
  import { PresentProgressBar } from './present/progress-bar';
19
26
  import { useIdle } from './present/use-idle';
20
27
  import { usePointerNearBottom } from './present/use-pointer-near-bottom';
@@ -48,6 +55,8 @@ type Props = {
48
55
  * without entering fullscreen. Defaults to true for back-compat.
49
56
  */
50
57
  fullscreen?: boolean;
58
+ /** Fade in from black on mount and fade to black before calling `onExit`. */
59
+ curtain?: boolean;
51
60
  };
52
61
 
53
62
  export function Player({
@@ -62,9 +71,13 @@ export function Player({
62
71
  slideId,
63
72
  onSwitchSlide,
64
73
  fullscreen = true,
74
+ curtain = false,
65
75
  }: Props) {
66
76
  const isMobile = useIsMobile();
67
77
  const prefersReducedMotion = usePrefersReducedMotion();
78
+ const fade = curtain && !prefersReducedMotion;
79
+ const [curtainOpaque, setCurtainOpaque] = useState(fade);
80
+ const exitingRef = useRef(false);
68
81
  const rootRef = useRef<HTMLDivElement | null>(null);
69
82
  // Mirrored as state so descendants portaling *into* the player subtree
70
83
  // (tooltips, popovers — the body is outside the fullscreen tree) re-render
@@ -93,6 +106,28 @@ export function Player({
93
106
  const canPrev = index > 0;
94
107
  const canNext = index < pages.length - 1;
95
108
 
109
+ // Stepping past either end nudges the slide like a rubber band so the
110
+ // press visibly registered; past the last slide a hint says how to leave.
111
+ const nudgeRef = useRef<HTMLDivElement | null>(null);
112
+ const [lastSlideHintAt, setLastSlideHintAt] = useState(0);
113
+ const bumpEdge = useCallback(
114
+ (direction: 'start' | 'end') => {
115
+ if (!controls) return;
116
+ if (direction === 'end') setLastSlideHintAt(Date.now());
117
+ if (prefersReducedMotion) return;
118
+ const offset = direction === 'end' ? -14 : 14;
119
+ nudgeRef.current?.animate(
120
+ [
121
+ { transform: 'translateX(0)' },
122
+ { transform: `translateX(${offset}px)`, offset: 0.3 },
123
+ { transform: 'translateX(0)' },
124
+ ],
125
+ { duration: 360, easing: 'cubic-bezier(0.2, 0.8, 0.3, 1)' },
126
+ );
127
+ },
128
+ [controls, prefersReducedMotion],
129
+ );
130
+
96
131
  const stepControllerRef = useRef<StepController | null>(null);
97
132
  const [entryDirection, setEntryDirection] = useState<EntryDirection>('jump');
98
133
  const [stepAggregate, setStepAggregate] = useState<StepAggregate>({
@@ -116,14 +151,34 @@ export function Player({
116
151
  [index, onIndexChange],
117
152
  );
118
153
 
154
+ const exitTimerRef = useRef<number | null>(null);
155
+ useEffect(
156
+ () => () => {
157
+ if (exitTimerRef.current !== null) window.clearTimeout(exitTimerRef.current);
158
+ },
159
+ [],
160
+ );
161
+ const requestExit = useCallback(() => {
162
+ if (!fade) {
163
+ onExit();
164
+ return;
165
+ }
166
+ if (exitingRef.current) return;
167
+ exitingRef.current = true;
168
+ setCurtainOpaque(true);
169
+ exitTimerRef.current = window.setTimeout(onExit, CURTAIN_FADE_MS);
170
+ }, [fade, onExit]);
171
+
119
172
  const goPrev = useCallback(() => {
120
173
  if (stepControllerRef.current?.retreat()) return;
121
174
  if (index > 0) handleIndexChange(index - 1);
122
- }, [index, handleIndexChange]);
175
+ else bumpEdge('start');
176
+ }, [index, handleIndexChange, bumpEdge]);
123
177
  const goNext = useCallback(() => {
124
178
  if (stepControllerRef.current?.advance()) return;
125
179
  if (index < pages.length - 1) handleIndexChange(index + 1);
126
- }, [index, pages.length, handleIndexChange]);
180
+ else bumpEdge('end');
181
+ }, [index, pages.length, handleIndexChange, bumpEdge]);
127
182
 
128
183
  const overlayActive = controls && (overviewOpen || helpOpen);
129
184
  const overlayActiveRef = useRef(overlayActive);
@@ -178,8 +233,8 @@ export function Player({
178
233
  useClickPageNavigation({
179
234
  ref: rootRef,
180
235
  enabled: !overlayActive,
181
- canPrev,
182
- canNext,
236
+ canPrev: canPrev || controls,
237
+ canNext: canNext || controls,
183
238
  onPrev: goPrev,
184
239
  onNext: goNext,
185
240
  onViewportClick: controls && isMobile ? handleMobileViewportClick : undefined,
@@ -216,11 +271,33 @@ export function Player({
216
271
  useEffect(() => {
217
272
  if (!allowExit) return;
218
273
  const onFsChange = () => {
219
- if (!document.fullscreenElement && !windowedRef.current) onExit();
274
+ if (!document.fullscreenElement && !windowedRef.current) requestExit();
220
275
  };
221
276
  document.addEventListener('fullscreenchange', onFsChange);
222
277
  return () => document.removeEventListener('fullscreenchange', onFsChange);
223
- }, [onExit, allowExit]);
278
+ }, [requestExit, allowExit]);
279
+
280
+ // Wait out the browser's own fullscreen animation before revealing the
281
+ // first slide, otherwise the fade plays while the screen is still resizing.
282
+ // biome-ignore lint/correctness/useExhaustiveDependencies: runs once on mount
283
+ useEffect(() => {
284
+ if (!fade) return;
285
+ let cancelPaint = () => {};
286
+ const reveal = () => {
287
+ cancelPaint = afterPaint(() => {
288
+ if (!exitingRef.current) setCurtainOpaque(false);
289
+ });
290
+ };
291
+ if (!fullscreen || document.fullscreenElement) {
292
+ reveal();
293
+ return () => cancelPaint();
294
+ }
295
+ const cancelWait = whenFullscreenSettled(reveal);
296
+ return () => {
297
+ cancelWait();
298
+ cancelPaint();
299
+ };
300
+ }, []);
224
301
 
225
302
  const toggleFullscreen = useCallback(() => {
226
303
  setWindowed((w) => !w);
@@ -296,7 +373,7 @@ export function Player({
296
373
  setBlackout(null);
297
374
  return;
298
375
  }
299
- if (allowExit) onExit();
376
+ if (allowExit) requestExit();
300
377
  return;
301
378
  }
302
379
 
@@ -364,7 +441,7 @@ export function Player({
364
441
  helpOpen,
365
442
  blackout,
366
443
  allowExit,
367
- onExit,
444
+ requestExit,
368
445
  goNext,
369
446
  goPrev,
370
447
  handleIndexChange,
@@ -403,26 +480,29 @@ export function Player({
403
480
  controls && (hideCursor ? 'cursor-none' : 'cursor-default'),
404
481
  )}
405
482
  >
406
- <SlideCanvas flat design={design}>
407
- {/* Keyed per deck so a presenter-driven deck switch cuts instead of
483
+ <div ref={nudgeRef} className="h-full w-full">
484
+ <SlideCanvas flat design={design}>
485
+ {/* Keyed per deck so a presenter-driven deck switch cuts instead of
408
486
  animating a transition between two unrelated decks. */}
409
- <SlideTransitionLayer
410
- key={slideId}
411
- pages={pages}
412
- index={index}
413
- total={pages.length}
414
- moduleTransition={transition}
415
- disabled={prefersReducedMotion}
416
- stepControllerRef={stepControllerRef}
417
- entryDirection={entryDirection}
418
- onStepAggregateChange={handleAggregateChange}
419
- />
420
- </SlideCanvas>
487
+ <SlideTransitionLayer
488
+ key={slideId}
489
+ pages={pages}
490
+ index={index}
491
+ total={pages.length}
492
+ moduleTransition={transition}
493
+ disabled={prefersReducedMotion}
494
+ stepControllerRef={stepControllerRef}
495
+ entryDirection={entryDirection}
496
+ onStepAggregateChange={handleAggregateChange}
497
+ />
498
+ </SlideCanvas>
499
+ </div>
421
500
 
422
501
  {controls && (
423
502
  <div data-osd-chrome style={{ display: 'contents' }}>
424
503
  <PresentProgressBar index={index} total={pages.length} visible={chromeVisible} />
425
504
  <PresentBlackoutOverlay mode={blackout} />
505
+ <PresentLastSlideHint shownAt={lastSlideHintAt} />
426
506
  <PresentJumpInput pageCount={pages.length} onJump={handleIndexChange} />
427
507
  <PresentLaserPointer enabled={laser} />
428
508
  <PresentControlBar
@@ -444,7 +524,7 @@ export function Player({
444
524
  onPresenter={() => slideId && openPresenterWindow(slideId)}
445
525
  onToggleFullscreen={toggleFullscreen}
446
526
  onHelp={() => setHelpOpen(true)}
447
- onExit={onExit}
527
+ onExit={requestExit}
448
528
  />
449
529
  <OverviewGrid
450
530
  pages={pages}
@@ -460,6 +540,8 @@ export function Player({
460
540
  <PresentHelpOverlay open={helpOpen} onOpenChange={setHelpOpen} container={rootEl} />
461
541
  </div>
462
542
  )}
543
+
544
+ {fade && <PresentCurtain opaque={curtainOpaque} className="absolute z-[100]" />}
463
545
  </div>
464
546
  );
465
547
  }
@@ -0,0 +1,52 @@
1
+ import { cn } from '@/lib/utils';
2
+
3
+ export const CURTAIN_FADE_MS = 400;
4
+
5
+ type Props = {
6
+ opaque: boolean;
7
+ className?: string;
8
+ };
9
+
10
+ export function PresentCurtain({ opaque, className }: Props) {
11
+ return (
12
+ <div
13
+ aria-hidden
14
+ className={cn(
15
+ 'pointer-events-none inset-0 bg-black transition-opacity ease-in-out',
16
+ opaque ? 'opacity-100' : 'opacity-0',
17
+ className,
18
+ )}
19
+ style={{ transitionDuration: `${CURTAIN_FADE_MS}ms` }}
20
+ />
21
+ );
22
+ }
23
+
24
+ // Two frames so the opaque state is painted before the fade starts;
25
+ // a single rAF can land in the same style recalc and skip the transition.
26
+ export function afterPaint(cb: () => void): () => void {
27
+ let inner = 0;
28
+ const outer = requestAnimationFrame(() => {
29
+ inner = requestAnimationFrame(cb);
30
+ });
31
+ return () => {
32
+ cancelAnimationFrame(outer);
33
+ cancelAnimationFrame(inner);
34
+ };
35
+ }
36
+
37
+ export function whenFullscreenSettled(cb: () => void, maxWaitMs = 800): () => void {
38
+ let fired = false;
39
+ const timer = window.setTimeout(done, maxWaitMs);
40
+ document.addEventListener('fullscreenchange', done);
41
+ function done() {
42
+ if (fired) return;
43
+ fired = true;
44
+ cleanup();
45
+ cb();
46
+ }
47
+ function cleanup() {
48
+ window.clearTimeout(timer);
49
+ document.removeEventListener('fullscreenchange', done);
50
+ }
51
+ return cleanup;
52
+ }
@@ -0,0 +1,36 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { usePanelMount } from '@/components/panel/panel-shell';
3
+ import { useLocale } from '@/lib/use-locale';
4
+ import { cn } from '@/lib/utils';
5
+
6
+ const VISIBLE_MS = 1800;
7
+
8
+ type Props = {
9
+ shownAt: number;
10
+ };
11
+
12
+ export function PresentLastSlideHint({ shownAt }: Props) {
13
+ const t = useLocale();
14
+ const [open, setOpen] = useState(false);
15
+ useEffect(() => {
16
+ if (!shownAt) return;
17
+ setOpen(true);
18
+ const id = window.setTimeout(() => setOpen(false), VISIBLE_MS);
19
+ return () => window.clearTimeout(id);
20
+ }, [shownAt]);
21
+ const { mounted, animVisible } = usePanelMount(open);
22
+ if (!mounted) return null;
23
+ return (
24
+ <div
25
+ role="status"
26
+ className={cn(
27
+ 'pointer-events-none absolute bottom-10 left-1/2 z-30 -translate-x-1/2 rounded-full bg-black/70 px-3.5 py-1.5 text-[12px] text-white/85 shadow-lg backdrop-blur-md motion-safe:transition-[opacity,translate]',
28
+ animVisible
29
+ ? 'opacity-100 motion-safe:duration-200'
30
+ : 'translate-y-1 opacity-0 motion-safe:duration-200',
31
+ )}
32
+ >
33
+ {t.present.lastSlideHint}
34
+ </div>
35
+ );
36
+ }