Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

feat(ok): add a Slidev plugin for presenting markdown decks (#3220)

serafin-garcia17a45a61adeb
diff --git a/.changeset/slides-presentation-view.md b/.changeset/slides-presentation-view.md
new file mode 100644
index 000000000..c609807f8
--- /dev/null
+++ b/.changeset/slides-presentation-view.md
@@ -0,0 +1,11 @@
+---
+"@inkeep/open-knowledge": minor
+---
+
+A markdown document can now be opened as a slide deck in its own OpenKnowledge window, via a new **Slidev** plugin (beta). Rendering is handled by [Slidev](https://sli.dev/), which OpenKnowledge neither renders itself nor downloads or bundles — so install it first: `npm install -g @slidev/cli @slidev/theme-default` (global), or add those packages to the project (a project-local install takes precedence). Slidev themes ship as separate packages from the CLI, and a deck cannot open without the theme it declares — `@slidev/theme-default` covers decks that use the default theme or declare none.
+
+Then turn on the Slidev plugin in **Settings → Plugins**, add `slides: true` to a document's frontmatter, and an **Open in Slidev** action appears in the editor toolbar; activating it opens the deck in a dedicated window you can present from. Editing the document in OpenKnowledge updates the open deck, because Slidev watches the file OpenKnowledge is already saving to.
+
+The plugin's own settings page reports whether OpenKnowledge found Slidev, and offers the install command to copy or to run in a terminal when it did not. When no `slidev` resolves, the toolbar action is simply absent rather than failing on click. Closing a deck window stops that deck's process, and quitting the app stops all of them. The plugin is off by default, desktop only, and adds nothing to the app bundle for anyone who does not enable it.
+
+Docs: [Plugins → Slidev](https://openknowledge.ai/docs/plugins/slidev).
diff --git a/docs/content/meta.json b/docs/content/meta.json
index cb3716de1..70a70e017 100644
--- a/docs/content/meta.json
+++ b/docs/content/meta.json
@@ -11,6 +11,8 @@
"...integrations",
"---FEATURES---",
"...features",
+ "---PLUGINS---",
+ "...plugins",
"---DEPLOY---",
"...deploy",
"---ADVANCED---",
diff --git a/docs/content/plugins/meta.json b/docs/content/plugins/meta.json
new file mode 100644
index 000000000..4b87a4fef
--- /dev/null
+++ b/docs/content/plugins/meta.json
@@ -0,0 +1,5 @@
+{
+ "title": "Plugins",
+ "icon": "LuBlocks",
+ "pages": ["overview", "slidev"]
+}
diff --git a/docs/content/plugins/overview.mdx b/docs/content/plugins/overview.mdx
new file mode 100644
index 000000000..ad50cbc52
--- /dev/null
+++ b/docs/content/plugins/overview.mdx
@@ -0,0 +1,32 @@
+---
+title: Overview
+icon: LuBookOpen
+description: Optional capabilities that ship with OpenKnowledge but stay off until you turn them on — linters, themes, and the Slidev presentation renderer.
+---
+
+A plugin is an optional capability that ships with OpenKnowledge and stays off until you turn it on. Each one belongs to a scope, and the scope decides who else gets it:
+
+- **Project plugins** are saved to the project's `config.yml`. Commit it and every collaborator gets the same setting.
+- **User plugins** are personal to your device. They live in your user config and are never committed.
+
+Turning one on gives it its own page in the settings sidebar, under **Plugins**.
+
+## Turning a plugin on
+
+Open Settings. There is one manage page per scope:
+
+- **This project ▸ Plugins**
+- **User ▸ Plugins**
+
+Flip the switch. Open editors react live; there is no restart and no Save button.
+
+## What ships today
+
+| Plugin | Scope | What it does |
+| --- | --- | --- |
+| [markdownlint](/docs/advanced/content-rules/markdownlint) | Project | Flags markdown style problems as you write — hard tabs, heading increments, list markers, and the rest of the standard rule set. |
+| [Frontmatter schemas](/docs/advanced/content-rules/frontmatter) | Project | Validates document frontmatter against standard JSON Schema files. Beta. |
+| [Slidev](/docs/plugins/slidev) | User | Presents a document as a slide deck in its own window. Desktop only; needs the Slidev CLI installed separately. Beta. |
+| Themes | User | A personal color-theme picker. See the [configuration reference](/docs/reference/configuration) for the keys it writes. |
+
+markdownlint and Frontmatter schemas are both **content rules**, a shared non-blocking linting layer. What they have in common — where problems appear, the Problems panel, `ok lint`, agent advisories — is on the [content rules overview](/docs/advanced/content-rules/overview).
diff --git a/docs/content/plugins/slidev.mdx b/docs/content/plugins/slidev.mdx
new file mode 100644
index 000000000..690d210fc
--- /dev/null
+++ b/docs/content/plugins/slidev.mdx
@@ -0,0 +1,74 @@
+---
+title: Slidev
+icon: LuPresentation
+description: Present a markdown document as a slide deck in its own window, rendered by the Slidev CLI.
+---
+
+[Slidev](https://sli.dev/) renders a markdown file as a presentation, with slides separated by `---`. Mark a document, click the toolbar action, and the deck opens in its own OpenKnowledge window.
+
+<Callout>
+ **Beta.** Desktop app only. Rendering is Slidev's, so it moves at Slidev's pace.
+</Callout>
+
+OpenKnowledge does not bundle or download Slidev. You install it yourself.
+
+## Install Slidev
+
+Install the CLI **and a theme**. Themes ship as separate packages and a deck cannot open without the one it declares; `@slidev/theme-default` covers decks that declare none.
+
+```bash
+npm install -g @slidev/cli @slidev/theme-default
+```
+
+Or add both packages to the project. A project-local install takes precedence over a global one, which is how you pin a deck to a Slidev version.
+
+Other install routes are in [Slidev's install guide](https://sli.dev/guide/install).
+
+## Turn on the plugin
+
+Open Settings → **User ▸ Plugins** and switch on **Slidev**. It's a user plugin, so the choice stays on your device and is never committed.
+
+The **Slidev** page in the sidebar reports whether OpenKnowledge found Slidev. If it didn't, the page offers the install command to copy and a **Run in terminal** button. Install, click back into OpenKnowledge, and the status updates without a restart.
+
+## Mark a document as a deck
+
+Add `slides: true` to the document's frontmatter:
+
+```md
+---
+title: Product launch
+slides: true
+---
+
+# Product launch
+
+---
+
+## Where we are
+
+- Beta since March
+- 40 teams onboarded
+```
+
+An **Open in Slidev** action appears in the editor toolbar. Activating it starts a Slidev server for that document and opens the deck in its own window.
+
+The action appears only when Slidev resolves. If you expect it and don't see it, check the plugin page.
+
+## Editing while presenting
+
+Edit the document and the open deck updates — Slidev watches the same file OpenKnowledge saves to. Your position in the deck is preserved. Expect a beat between typing and the refresh; OpenKnowledge debounces its writes to disk.
+
+Closing a deck window stops that deck's Slidev process. Quitting OpenKnowledge stops all of them.
+
+## Writing decks
+
+Past the frontmatter flag it's ordinary Slidev:
+
+- [Syntax guide](https://sli.dev/guide/syntax) — separators, per-slide frontmatter, layouts, speaker notes, click animations, code blocks.
+- [Themes gallery](https://sli.dev/resources/theme-gallery) — install a theme's package before a deck declares it.
+- [Built-in components](https://sli.dev/builtin/components) — the Vue components available inside slides.
+
+Two notes for longer decks:
+
+- **Multi-file decks work.** Slidev's `src:` include pulls a slide's content from another file, so a deck can be one entry file plus a folder of slides.
+- **Keep the deck inside the project.** OpenKnowledge only opens documents that resolve inside the open project, including through symlinks.
diff --git a/docs/content/reference/configuration.mdx b/docs/content/reference/configuration.mdx
index 3f2121332..b2cf21953 100644
--- a/docs/content/reference/configuration.mdx
+++ b/docs/content/reference/configuration.mdx
@@ -53,6 +53,7 @@ A key set in a file more specific than its scope (a user-scope key in `.ok/confi
| `editor.previewTabs` | boolean | `true` | user | Reuse one replaceable preview tab for single clicks in the Files tree and Skills sidebar, so browsing does not accumulate tabs. Double-click the tab title, pin it, or choose **Keep open** from its context menu to make it permanent. Set `false` to open every click in its own tab. Rename transitions still reuse the current tab; back/forward navigation focuses the target's existing tab, or opens a permanent one when it is no longer open. A personal preference; toggle it from **Settings → Preferences → Preview tabs**. |
| `appearance.preview.autoOpen` | boolean | `true` | user | Whether the agent should open or refresh the OpenKnowledge preview when it edits a doc through the MCP. Default `true` lets the agent route the preview by host capability: the host's in-app browser (Cursor preview pane, Codex's built-in browser, Claude Code Desktop) when one exists, the system browser otherwise. Set `false` to keep the agent's hands off your preview window. This is useful when you're already viewing the doc in OK Desktop, a browser tab on a second display, a non-default browser, or any flow where your extensions / accessibility tooling only work in your own browser. The agent then surfaces the URL on request but does not navigate. The change takes effect on the next preview-related tool call. Toggle from **Settings → Preferences → "Open preview when agent edits"**. |
| `terminal.enabled` | `boolean \| null` | `null` | project-local | Opt-out for the in-app terminal (a real OS shell at full user privilege). On by default; set `false` to disable it for this project on this machine. |
+| `slides.enabled` | boolean | `false` | user | Whether the [Slidev plugin](/docs/plugins/slidev) appears in **Settings → Plugins**. Off by default. When on, a document whose frontmatter contains `slides: true` gets an **Open in Slidev** action that opens the deck in its own window, rendered by a [Slidev](https://sli.dev/) you install yourself — OpenKnowledge does not download or bundle one. Install it globally (`npm install -g @slidev/cli @slidev/theme-default`) or add those packages to the project (a project-local install takes precedence). Slidev themes ship separately from the CLI and a deck cannot open without the theme it declares. Desktop only; the action stays hidden until a `slidev` binary resolves. |
| `agents.autoApproveOkTools` | boolean | `true` | user | Auto-approve OpenKnowledge's own MCP tools (and the `ok open` command on Claude) for agents launched from the built-in [docked terminal](/docs/features/editor#terminal), so reading and writing the knowledge base runs without a per-call approval prompt. Destructive tools (`delete`, `move`, `share_link`, `install`) still prompt; other shell commands and non-OpenKnowledge file edits are untouched. Per-machine preference; toggle from **Settings → Terminal**. Best-effort per agent — Claude uses an allow/deny list, Codex uses its per-server `approve` mode (and only when its OpenKnowledge entry is already configured). |
| `telemetry.localSink.enabled` | boolean | `true` | project | Write local diagnostic spans + logs under `.ok/local/` for `ok diagnose bundle` to collect. Local-only: nothing leaves the machine until you run `bundle`. Set `false` for sensitive workspaces. |
| `telemetry.localSink.spans.maxBytes` | number | `52428800` (~50 MB) | project | Max size of the local diagnostic spans file before it rotates. |
diff --git a/knip.config.ts b/knip.config.ts
index 13582ee18..13a6b9fb3 100644
--- a/knip.config.ts
+++ b/knip.config.ts
@@ -20,7 +20,7 @@ export default {
'ps', // process listing — diagnose.ts, process-scan.ts
'lsof', // open-file listing — diagnose.ts, process-scan.ts
'pgrep', // process lookup — process-scan.ts
- 'where', // Windows binary lookup — git-preflight.ts
+ 'where', // Windows binary lookup — git-preflight.ts, slides slidev probe
'taskkill', // Windows process-tree termination — acp/launch.ts
'sw_vers', // macOS version query — bug-report.ts
'mkfifo', // named-pipe creation — keepalive-orphan-reaping.test.ts
diff --git a/packages/app/src/components/EditorArea.tsx b/packages/app/src/components/EditorArea.tsx
index 0be5aac1f..fad947262 100644
--- a/packages/app/src/components/EditorArea.tsx
+++ b/packages/app/src/components/EditorArea.tsx
@@ -91,6 +91,7 @@ import {
} from './EditorWorkspace';
import { shouldPaintOverlay } from './editor-area-overlay';
import { computeStickyRepinLayout } from './editor-area-sticky-repin';
+import { isSlidesHost } from './slides-host-gate';
import { TerminalDock } from './TerminalDock';
import { TerminalRevealTab } from './TerminalRevealTab';
@@ -166,6 +167,15 @@ function PaneDocumentToolbar({
return (
<EditorToolbar
activeDocName={docName}
+ // Only threaded where the deck action can actually run. This toolbar is
+ // rendered per visible document from inside the Activity pool, so it is
+ // one of the hottest render paths in the editor; handing it a live
+ // provider on hosts that can never mount the Slidev action changed that
+ // path's behaviour enough to destabilise unrelated editor e2e (lint
+ // decorations and CRDT content assertions), which a three-round CI bisect
+ // pinned to exactly this prop. Web and CLI hosts keep the prop surface
+ // they had before the plugin existed.
+ activeProvider={isSlidesHost() ? provider : null}
isSourceMode={isSourceMode}
sourceDisabled={syncStatus !== 'connected' && syncStatus !== 'synced'}
onModeChange={onModeChange}
diff --git a/packages/app/src/components/EditorPane.tsx b/packages/app/src/components/EditorPane.tsx
index ddb9539a1..b68dceb60 100644
--- a/packages/app/src/components/EditorPane.tsx
+++ b/packages/app/src/components/EditorPane.tsx
@@ -37,6 +37,10 @@ import { EditorArea, type SessionPlacements } from './EditorArea';
import { EditorHeader } from './EditorHeader';
import { composeTerminalSelectionPaste } from './handoff/compose-terminal-selection';
import { requestPreferredSession } from './handoff/preferred-session-events';
+import {
+ subscribeToTerminalCommandRequests,
+ type TerminalCommandId,
+} from './handoff/terminal-command-events';
import { requestActiveTerminalInput } from './handoff/terminal-input-events';
import { subscribeToTerminalLaunchRequests } from './handoff/terminal-launch-events';
import {
@@ -171,6 +175,13 @@ export function EditorPane({ onOpenSearch }: EditorPaneProps = {}) {
// entry point. Null until a UI click; bumping `nonce` makes each click a
// distinct one-shot the session writes exactly once.
const [terminalLaunch, setTerminalLaunch] = useState<TerminalLaunchIntent | null>(null);
+ // "Run this in the terminal" one-shot (Settings → Slides). Nonce-keyed like
+ // `terminalLaunch` so a repeat click opens a fresh tab instead of being
+ // deduped away, and so the dock acts on it exactly once.
+ const [terminalCommand, setTerminalCommand] = useState<{
+ id: TerminalCommandId;
+ nonce: number;
+ } | null>(null);
// "Start an agent" launch intent threaded to the dock's thread host — the ACP
// twin of `terminalLaunch`. Both buses target the one host now.
const [threadLaunch, setThreadLaunch] = useState<ThreadLaunchIntent | null>(null);
@@ -385,6 +396,14 @@ export function EditorPane({ onOpenSearch }: EditorPaneProps = {}) {
// exclusive: `prompt` is baked as a CLI arg and RUNS, `stagePaste` is written
// into the input and waits. A raw selection send must never auto-run, so it
// stages.
+ useEffect(() => {
+ return subscribeToTerminalCommandRequests((id) => {
+ setTerminalVisible(true);
+ launchNonceRef.current += 1;
+ setTerminalCommand({ id, nonce: launchNonceRef.current });
+ });
+ }, []);
+
useEffect(() => {
return subscribeToTerminalLaunchRequests((text, cli, { stage }) => {
setTerminalVisible(true);
@@ -700,6 +719,7 @@ export function EditorPane({ onOpenSearch }: EditorPaneProps = {}) {
visible={terminalVisible}
onVisibleChange={setTerminalVisible}
launch={terminalLaunch}
+ commandLaunch={terminalCommand}
installedClis={installedClis}
container={placements.terminal.container}
isShowing={placements.terminal.isShowing}
diff --git a/packages/app/src/components/EditorToolbar.slides.dom.test.tsx b/packages/app/src/components/EditorToolbar.slides.dom.test.tsx
new file mode 100644
index 000000000..bdeda9d63
--- /dev/null
+++ b/packages/app/src/components/EditorToolbar.slides.dom.test.tsx
@@ -0,0 +1,147 @@
+/**
+ * DOM tests for the Slidev action's cheap gate in the editor toolbar: it mounts
+ * the lazy cluster only when the plugin is enabled AND the host exposes the
+ * slides bridge AND a live provider + doc are present. The two remaining
+ * conditions the cluster itself owns (the `slides: true` frontmatter flag and
+ * the slidev-status probe) are covered in SlidesToolbarControls.dom.test.tsx.
+ */
+
+import type { HocuspocusProvider } from '@hocuspocus/provider';
+import * as actualLinguiMacro from '@lingui/react/macro';
+import { cleanup, render, screen } from '@testing-library/react';
+import type { ReactNode } from 'react';
+import { afterEach, describe, expect, test, vi } from 'vitest';
+import * as Y from 'yjs';
+import { TooltipProvider } from '@/components/ui/tooltip';
+import { renderLinguiTemplate } from '@/test-utils/lingui-mock';
+
+// Mutable so each test flips `slides.enabled`; the mock reads it per render.
+let mockMergedConfig: { slides?: { enabled?: boolean } } | null = null;
+// The toolbar reads config through the OPTIONAL accessor on purpose (it renders
+// in provider-less mount orderings), so the mock has to stand in for that one —
+// mocking the throwing `useConfigContext` here is what previously let a
+// provider-less render regression pass unnoticed.
+let mockConfigAbsent = false;
+vi.doMock('@/lib/config-context', () => ({
+ useConfigContextOptional: () =>
+ mockConfigAbsent ? null : { merged: mockMergedConfig, projectLocalBinding: null },
+}));
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,
+ useLingui: () => ({ t: renderLinguiTemplate }),
+}));
+
+// The breadcrumb + not-in-sidebar chrome read config through their own hooks;
+// stub them to isolate this file on the Slidev action.
+vi.doMock('./EditorBreadcrumb', () => ({ EditorBreadcrumb: () => null }));
+vi.doMock('./NotInSidebarIndicator', () => ({ NotInSidebarIndicator: () => null }));
+
+interface FakeProvider {
+ document: Y.Doc;
+ on(event: 'synced', listener: () => void): void;
+ off(event: 'synced', listener: () => void): void;
+}
+
+function makeDeckProvider(): FakeProvider {
+ const document = new Y.Doc();
+ document.getText('source').insert(0, '---\nslides: true\n---\nbody\n');
+ const handlers = new Set<() => void>();
+ return {
+ document,
+ on(event, listener) {
+ if (event === 'synced') handlers.add(listener);
+ },
+ off(event, listener) {
+ if (event === 'synced') handlers.delete(listener);
+ },
+ };
+}
+
+function installSlidesBridge() {
+ (window as unknown as { okDesktop?: unknown }).okDesktop = {
+ config: { projectPath: '/proj' },
+ platform: 'darwin',
+ slides: {
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ open: () => Promise.resolve({ kind: 'open', ok: true }),
+ },
+ };
+}
+
+async function renderToolbar(provider: FakeProvider | null, docName: string | null = 'talks/Deck') {
+ const { EditorToolbar } = await import('./EditorToolbar');
+ return render(
+ <TooltipProvider>
+ <EditorToolbar
+ activeDocName={docName}
+ activeProvider={provider as unknown as HocuspocusProvider | null}
+ isSourceMode={false}
+ sourceDisabled={false}
+ onModeChange={() => {}}
+ showAddPropertyButton={false}
+ onAddProperty={() => {}}
+ isPanelCollapsed={false}
+ onTogglePanel={() => {}}
+ />
+ </TooltipProvider>,
+ );
+}
+
+afterEach(() => {
+ cleanup();
+ mockMergedConfig = null;
+ (window as unknown as { okDesktop?: unknown }).okDesktop = undefined;
+ vi.restoreAllMocks();
+});
+
+describe('EditorToolbar — Slidev action gate', () => {
+ test('shows the action when the plugin is enabled on a deck with a resolvable slidev', async () => {
+ mockMergedConfig = { slides: { enabled: true } };
+ installSlidesBridge();
+ await renderToolbar(makeDeckProvider());
+ expect(await screen.findByTestId('slides-toolbar-action')).toBeTruthy();
+ });
+
+ test('hides the action when the plugin is disabled', async () => {
+ mockMergedConfig = { slides: { enabled: false } };
+ installSlidesBridge();
+ await renderToolbar(makeDeckProvider());
+ await Promise.resolve();
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+ });
+
+ test('on a web host with no desktop bridge renders no action and logs no error', async () => {
+ const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {});
+ mockMergedConfig = { slides: { enabled: true } };
+ // No okDesktop assigned → plain browser host.
+ await renderToolbar(makeDeckProvider());
+ await Promise.resolve();
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+ expect(consoleError).not.toHaveBeenCalled();
+ });
+});
+
+describe('EditorToolbar — renders without a config provider', () => {
+ // The regression this pins: the slides gate first read config through the
+ // THROWING `useConfigContext`. This toolbar renders for every document, and it
+ // owns the frontmatter-problems badge — so in any mount ordering without a
+ // `<ConfigProvider />` above it, the throw took the whole toolbar subtree down
+ // and an unrelated badge silently resolved to zero elements. An off-by-default
+ // plugin gate must not be able to unmount the toolbar.
+ test('an absent config renders the toolbar and simply withholds the action', async () => {
+ const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {});
+ mockConfigAbsent = true;
+ installSlidesBridge();
+
+ await renderToolbar(makeDeckProvider());
+ await Promise.resolve();
+
+ // The toolbar itself is alive — the mode toggle is unconditional chrome.
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+ expect(document.body.textContent).not.toBe('');
+ expect(consoleError).not.toHaveBeenCalled();
+ mockConfigAbsent = false;
+ });
+});
diff --git a/packages/app/src/components/EditorToolbar.tsx b/packages/app/src/components/EditorToolbar.tsx
index 0ca0a4bae..cf2f27659 100644
--- a/packages/app/src/components/EditorToolbar.tsx
+++ b/packages/app/src/components/EditorToolbar.tsx
@@ -1,5 +1,6 @@
// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit
+import type { HocuspocusProvider } from '@hocuspocus/provider';
import {
isEditableTextDocFile,
type LintDiagnostic,
@@ -15,6 +16,7 @@ import { Button } from '@/components/ui/button.tsx';
import { Kbd } from '@/components/ui/kbd';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import type { EditorModeValue } from '@/editor/use-editor-mode.ts';
+import { useConfigContextOptional } from '@/lib/config-context';
import { formatShortcut, formatShortcutLabel } from '@/lib/keyboard-shortcuts';
import { parseProjectSkillContentDocName } from '@/lib/managed-artifact-doc-name';
import {
@@ -26,6 +28,7 @@ import { cn } from '@/lib/utils';
import { EditorBreadcrumb } from './EditorBreadcrumb';
import { EditorModeToggle } from './EditorModeToggle';
import { NotInSidebarIndicator } from './NotInSidebarIndicator';
+import { isSlidesHost } from './slides-host-gate';
// Lazy-loaded: the skill-specific toolbar cluster (level + install + overflow)
// only mounts when the active doc is a skill, so it stays out of the eager
@@ -40,10 +43,20 @@ const SkillOriginInline = lazy(async () => ({
default: (await import('./SkillOriginInline')).SkillOriginInline,
}));
+// The Slides action mounts only past the cheap host+plugin gate below, so its
+// frontmatter read + slidev-status probe stay out of the eager toolbar bundle
+// that every document loads.
+const SlidesToolbarControls = lazy(async () => ({
+ default: (await import('./SlidesToolbarControls')).SlidesToolbarControls,
+}));
+
const NO_FRONTMATTER_PROBLEMS: readonly LintDiagnostic[] = [];
interface EditorToolbarProps {
activeDocName: string | null;
+ /** The active document's collab provider, used to live-read the `slides: true`
+ * frontmatter flag that gates the Slides action. Null while a doc is loading. */
+ activeProvider?: HocuspocusProvider | null;
isSourceMode: boolean;
sourceDisabled: boolean;
onModeChange: (mode: EditorModeValue) => void;
@@ -66,6 +79,7 @@ interface EditorToolbarProps {
export function EditorToolbar({
activeDocName,
+ activeProvider,
isSourceMode,
sourceDisabled,
onModeChange,
@@ -77,6 +91,18 @@ export function EditorToolbar({
reserveRightGutter = false,
}: EditorToolbarProps) {
const { t } = useLingui();
+ // Cheap synchronous gate for the Slides action: the plugin is enabled (ships
+ // off, so strict `=== true`) and the host exposes the slides bridge. The
+ // frontmatter flag and the slidev-status probe — the costlier, per-deck
+ // conditions — live inside the lazily-loaded cluster.
+ //
+ // The OPTIONAL reader is load-bearing. This toolbar renders for every
+ // document, including in harnesses and mount orderings where no
+ // `<ConfigProvider />` is above it; the throwing `useConfigContext` would take
+ // the whole toolbar subtree down with it, and the toolbar owns the
+ // frontmatter-problems badge — so an off-by-default slides gate would make an
+ // unrelated badge silently vanish. Absent config simply means "not enabled".
+ const slidesPluginEnabled = useConfigContextOptional()?.merged?.slides?.enabled === true;
const panelShortcut = formatShortcut('toggle-document-panel');
const panelShortcutLabel = formatShortcutLabel('toggle-document-panel');
// Skills carry install/uninstall + history chrome in this per-doc toolbar
@@ -211,6 +237,14 @@ export function EditorToolbar({
/>
)
)}
+ {slidesPluginEnabled &&
+ isSlidesHost() &&
+ activeProvider != null &&
+ activeDocName !== null ? (
+ <Suspense fallback={null}>
+ <SlidesToolbarControls provider={activeProvider} docName={activeDocName} />
+ </Suspense>
+ ) : null}
<Tooltip>
<Button
data-doc-panel-toggle=""
diff --git a/packages/app/src/components/SchemaConfigEditor.tsx b/packages/app/src/components/SchemaConfigEditor.tsx
index e33417309..8aca30939 100644
--- a/packages/app/src/components/SchemaConfigEditor.tsx
+++ b/packages/app/src/components/SchemaConfigEditor.tsx
@@ -103,8 +103,11 @@ export function SchemaConfigEditor({ assetPath }: SchemaConfigEditorProps) {
sourceLabel={t`Source`}
wysiwygDisabledReason={t`Field editing is available for schema files mapped in the Frontmatter schemas plugin`}
/>
- {/* Absolute so the mode toggle stays visually centered. */}
- <PluginBetaBadge className="absolute left-3 top-1/2 -translate-y-1/2" />
+ {/* Absolute so the mode toggle stays visually centered. Denser than the
+ Badge default because this one sits in the editor toolbar beside the
+ mode toggle, not in a settings header — the settings surfaces use the
+ default so Beta and Scope badges line up. */}
+ <PluginBetaBadge className="absolute left-3 top-1/2 h-4 -translate-y-1/2 px-1 text-[10px]" />
</div>
{isSourceMode ? (
// Source is a CodeMirror viewer that owns its own scroll — full-bleed,
diff --git a/packages/app/src/components/SessionsHost.tsx b/packages/app/src/components/SessionsHost.tsx
index 6e9222ab0..11a8acbcb 100644
--- a/packages/app/src/components/SessionsHost.tsx
+++ b/packages/app/src/components/SessionsHost.tsx
@@ -74,6 +74,7 @@ const ThreadView = lazy(() =>
);
import { subscribeToPreferredSessionRequests } from './handoff/preferred-session-events';
+import type { TerminalCommandId } from './handoff/terminal-command-events';
import {
type ActiveTerminalInputDetail,
subscribeToActiveTerminalInput,
@@ -103,6 +104,9 @@ interface TerminalSessionDescriptor extends BaseSessionDescriptor {
readonly kind: 'terminal';
/** One-shot launch intent the session writes once it is live; null for a bare tab. */
readonly launch: TerminalLaunchIntent | null;
+ /** One-shot "run this command" id baked into the spawn; null for a bare tab.
+ * Mutually exclusive with `launch` — a tab is opened by one or the other. */
+ readonly commandId: TerminalCommandId | null;
/** Latest OSC 0/2 title the running program set (null → positional default). */
readonly title: string | null;
/** User-set tab name that pins over `title`; null until renamed. */
@@ -258,6 +262,10 @@ interface SessionsHostProps {
readonly onVisibleChange: (visible: boolean) => void;
/** "Open in terminal" launch intent — each new intent opens its own terminal tab. */
readonly launch?: TerminalLaunchIntent | null;
+ /** "Run this command" one-shot — each new nonce opens its own terminal tab with
+ * the command baked into the spawn. Nonce-keyed like `launch`, so a repeat
+ * click of the same button opens a fresh tab rather than being deduped away. */
+ readonly commandLaunch?: { readonly id: TerminalCommandId; readonly nonce: number } | null;
/** "Start an agent" launch intent — each new intent opens its own thread tab (or
* the agent catalog when no concrete agent is resolvable). Agents panel only. */
readonly threadLaunch?: ThreadLaunchIntent | null;
@@ -323,6 +331,7 @@ export function SessionsHost({
visible,
onVisibleChange,
launch = null,
+ commandLaunch = null,
threadLaunch = null,
installedClis,
container,
@@ -402,6 +411,7 @@ export function SessionsHost({
kind: 'terminal',
id: makeSessionId(1),
launch,
+ commandId: null,
title: null,
customLabel: null,
ordinal: 1,
@@ -424,6 +434,7 @@ export function SessionsHost({
coldSeedTerminal && launch ? launch.nonce : null,
);
const lastHandledThreadNonceRef = useRef<number | null>(null);
+ const lastHandledCommandNonceRef = useRef<number | null>(null);
const prevVisibleRef = useRef(isWindow ? false : visible);
const ptyIdBySessionRef = useRef(new Map<string, string>());
const stripLaunchNonceRef = useRef(0);
@@ -500,7 +511,10 @@ export function SessionsHost({
persistDockOrderNow();
}
- function openSession(launchForSession: TerminalLaunchIntent | null) {
+ function openSession(
+ launchForSession: TerminalLaunchIntent | null,
+ commandForSession: TerminalCommandId | null = null,
+ ) {
// Opening a tab is the user taking over the active slot — a lingering reload
// restore must not later yank the active tab back.
pendingActiveKeyRef.current = null;
@@ -512,6 +526,7 @@ export function SessionsHost({
kind: 'terminal',
id,
launch: launchForSession,
+ commandId: commandForSession,
title: null,
customLabel: null,
ordinal: sessionCounterRef.current,
@@ -1134,6 +1149,13 @@ export function SessionsHost({
openSessionRef.current(launch);
return;
}
+ // Same shape as the launch above: a fresh nonce opens its own tab, with the
+ // command baked into that tab's spawn instead of a CLI invocation.
+ if (commandLaunch != null && commandLaunch.nonce !== lastHandledCommandNonceRef.current) {
+ lastHandledCommandNonceRef.current = commandLaunch.nonce;
+ openSessionRef.current(null, commandLaunch.id);
+ return;
+ }
const threadLaunchPending =
hostThreads &&
threadLaunch != null &&
@@ -1141,7 +1163,15 @@ export function SessionsHost({
if (visible && !wasVisible && sessions.length === 0 && !threadLaunchPending) {
seedOnRevealRef.current();
}
- }, [visible, launch, threadLaunch, sessions.length, rehydrationSettled, hostThreads]);
+ }, [
+ visible,
+ launch,
+ commandLaunch,
+ threadLaunch,
+ sessions.length,
+ rehydrationSettled,
+ hostThreads,
+ ]);
// "Start an agent" launch intent (agents panel): resolve the agent (concrete /
// default-registered) and start a thread. Each new nonce opens its own thread
@@ -1205,6 +1235,9 @@ export function SessionsHost({
const recovered: TerminalSessionDescriptor[] = survivors
.map((entry, index) => ({
kind: 'terminal' as const,
+ // A rehydrated tab adopts a live PTY — its command already ran (or
+ // is still running) in that shell, so re-baking it would run twice.
+ commandId: null,
id: makeSessionId(index + 1),
launch: null,
title: null,
@@ -1494,6 +1527,7 @@ export function SessionsHost({
<TerminalGate
bridge={bridge}
launch={session.launch}
+ commandId={session.commandId}
adoptPtyId={session.adoptPtyId}
onPtyId={(ptyId) => setSessionPtyId(session.id, ptyId)}
onTitleChange={(title) => setSessionTitle(session.id, title)}
diff --git a/packages/app/src/components/SlidesToolbarControls.dom.test.tsx b/packages/app/src/components/SlidesToolbarControls.dom.test.tsx
new file mode 100644
index 000000000..4bccd7801
--- /dev/null
+++ b/packages/app/src/components/SlidesToolbarControls.dom.test.tsx
@@ -0,0 +1,364 @@
+/**
+ * DOM tests for the lazy Slides toolbar action. The component is mounted past
+ * its cheap host gate, so these cover the two conditions it owns — the doc
+ * declares `slides: true`, and `slidev` resolved — plus activation and the
+ * failure surface.
+ *
+ * The provider is a fake wrapping a real `Y.Doc` (so the frontmatter flag runs
+ * through the real `bindFrontmatterDoc` parse), and `window.okDesktop.slides` is
+ * a stub — the IPC boundary is the one system boundary these tests fake.
+ */
+
+import type { HocuspocusProvider } from '@hocuspocus/provider';
+import { bindFrontmatterDoc } from '@inkeep/open-knowledge-core';
+import * as actualLinguiMacro from '@lingui/react/macro';
+import { type Tracer, trace } from '@opentelemetry/api';
+import { act, cleanup, render, screen, waitFor } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import type { ReactNode } from 'react';
+import { afterEach, describe, expect, test, vi } from 'vitest';
+import * as Y from 'yjs';
+import { TooltipProvider } from '@/components/ui/tooltip';
+import type { OkSlidesOpenResult, OkSlidesStatusResult } from '@/lib/desktop-bridge-types';
+import { renderLinguiTemplate } from '@/test-utils/lingui-mock';
+
+const { toastErrorSpy } = vi.hoisted(() => ({ toastErrorSpy: vi.fn() }));
+vi.mock('sonner', () => ({
+ toast: { error: toastErrorSpy, success: vi.fn(), info: vi.fn(), warning: vi.fn() },
+}));
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,
+ useLingui: () => ({ t: renderLinguiTemplate }),
+}));
+
+interface FakeProvider {
+ document: Y.Doc;
+ on(event: 'synced', listener: () => void): void;
+ off(event: 'synced', listener: () => void): void;
+}
+
+function makeProvider(initial = ''): FakeProvider {
+ const document = new Y.Doc();
+ if (initial) document.getText('source').insert(0, initial);
+ const handlers = new Set<() => void>();
+ return {
+ document,
+ on(event, listener) {
+ if (event === 'synced') handlers.add(listener);
+ },
+ off(event, listener) {
+ if (event === 'synced') handlers.delete(listener);
+ },
+ };
+}
+
+/** Mutate the shared frontmatter the way a property-panel edit would, so the
+ * hook's own observer fires. */
+function patchSlides(provider: FakeProvider, value: boolean | string | null): void {
+ const writer = bindFrontmatterDoc(provider);
+ writer.patch({ slides: value });
+ writer.dispose();
+}
+
+function installBridge(opts: {
+ status: () => Promise<OkSlidesStatusResult>;
+ open?: (docPath: string) => Promise<OkSlidesOpenResult>;
+ projectPath?: string;
+ platform?: string;
+}) {
+ const statusSpy = vi.fn(opts.status);
+ const openSpy = vi.fn(
+ opts.open ?? (() => Promise.resolve({ kind: 'open', ok: true }) as Promise<OkSlidesOpenResult>),
+ );
+ (window as unknown as { okDesktop?: unknown }).okDesktop = {
+ config: { projectPath: opts.projectPath ?? '/proj' },
+ platform: opts.platform ?? 'darwin',
+ slides: { status: statusSpy, open: openSpy },
+ };
+ return { statusSpy, openSpy };
+}
+
+async function renderControls(provider: FakeProvider, docName = 'talks/Deck') {
+ const { SlidesToolbarControls } = await import('./SlidesToolbarControls');
+ return render(
+ <TooltipProvider>
+ <SlidesToolbarControls
+ provider={provider as unknown as HocuspocusProvider}
+ docName={docName}
+ />
+ </TooltipProvider>,
+ );
+}
+
+afterEach(() => {
+ cleanup();
+ (window as unknown as { okDesktop?: unknown }).okDesktop = undefined;
+ vi.clearAllMocks();
+});
+
+describe('SlidesToolbarControls — visibility', () => {
+ test('a deck whose slidev resolves shows the Slidev action', async () => {
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ expect(await screen.findByTestId('slides-toolbar-action')).toBeTruthy();
+ });
+
+ test('the icon-only action carries an accessible name', async () => {
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ // The control renders an icon with no visible text, so assistive tech has
+ // only the accessible name to go on — query by role+name, not by testid.
+ expect(await screen.findByRole('button', { name: 'Open in Slidev' })).toBeTruthy();
+ });
+
+ test('a deck with no resolvable slidev shows no action', async () => {
+ const { statusSpy } = installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: false }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ await waitFor(() => expect(statusSpy).toHaveBeenCalledTimes(1));
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+ });
+
+ test('a status probe that rejects hides the action and logs the fault', async () => {
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const { statusSpy } = installBridge({
+ status: () => Promise.reject(new Error('bridge broke')),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ await waitFor(() => expect(statusSpy).toHaveBeenCalledTimes(1));
+ // A rejected probe degrades to "unavailable" (action hidden), never a crash.
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+ // …and is logged with the rejection, so a broken bridge is distinguishable
+ // from "not installed" — a content match, not bare existence (which an
+ // ambient warn could satisfy).
+ expect(warnSpy).toHaveBeenCalledWith('[slides] availability probe failed:', expect.any(Error));
+ warnSpy.mockRestore();
+ });
+
+ test('a non-deck document shows no action and never probes slidev', async () => {
+ const { statusSpy } = installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ });
+ await renderControls(makeProvider('---\ntitle: Notes\n---\nbody\n'));
+ await Promise.resolve();
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+ expect(statusSpy).not.toHaveBeenCalled();
+ });
+
+ test('adding slides: true reveals the action without remount', async () => {
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ });
+ const provider = makeProvider('---\ntitle: Notes\n---\nbody\n');
+ await renderControls(provider);
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+
+ act(() => patchSlides(provider, true));
+
+ expect(await screen.findByTestId('slides-toolbar-action')).toBeTruthy();
+ });
+
+ test('a mid-session install reveals the action on window focus, without remount', async () => {
+ // The first-run path: open a deck before slidev is installed (no action),
+ // install it in a terminal, switch back. That switch is the focus event —
+ // the toolbar re-probes and the action appears without reopening the doc.
+ let available = false;
+ const { statusSpy } = installBridge({
+ status: () =>
+ Promise.resolve(
+ available
+ ? ({ kind: 'status', available: true, source: 'global' } as OkSlidesStatusResult)
+ : ({ kind: 'status', available: false } as OkSlidesStatusResult),
+ ),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ await waitFor(() => expect(statusSpy).toHaveBeenCalledTimes(1));
+ expect(screen.queryByTestId('slides-toolbar-action')).toBeNull();
+
+ available = true;
+ // Focus re-probes are throttled so a never-installed slidev cannot spawn a
+ // login shell on every alt-tab. Installing takes far longer than that
+ // window, so advance the clock rather than firing focus instantly — the
+ // real path this covers is minutes long, not milliseconds.
+ const realNow = Date.now();
+ const nowSpy = vi.spyOn(Date, 'now').mockReturnValue(realNow + 60_000);
+ act(() => {
+ window.dispatchEvent(new Event('focus'));
+ });
+
+ expect(await screen.findByTestId('slides-toolbar-action')).toBeTruthy();
+ nowSpy.mockRestore();
+ expect(statusSpy).toHaveBeenCalledTimes(2);
+ });
+
+ test('stops re-probing on focus once slidev has resolved available', async () => {
+ // Each status() runs a login-shell PATH probe for a global install, and a
+ // resolvable slidev rarely disappears mid-session — so once found, further
+ // window-focus events must not spawn another probe.
+ const { statusSpy } = installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ // Awaiting the action guarantees the resolving probe's `.then` ran — which is
+ // where the focus listener unsubscribes.
+ expect(await screen.findByTestId('slides-toolbar-action')).toBeTruthy();
+ await waitFor(() => expect(statusSpy).toHaveBeenCalledTimes(1));
+
+ act(() => {
+ window.dispatchEvent(new Event('focus'));
+ });
+ act(() => {
+ window.dispatchEvent(new Event('focus'));
+ });
+
+ // Still 1: the focus listener was removed once availability resolved.
+ expect(statusSpy).toHaveBeenCalledTimes(1);
+ });
+});
+
+describe('SlidesToolbarControls — activation', () => {
+ test('activating the action opens the deck at its absolute path', async () => {
+ const user = userEvent.setup();
+ const { openSpy } = installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'project-local' }),
+ projectPath: '/proj',
+ platform: 'darwin',
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'), 'talks/Deck');
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() => expect(openSpy).toHaveBeenCalledWith('/proj/talks/Deck.md'));
+ });
+
+ test('activating the action emits the ok.slides.opened marker', async () => {
+ const spanNames: string[] = [];
+ const getTracerSpy = vi.spyOn(trace, 'getTracer').mockImplementation(
+ () =>
+ ({
+ startSpan: (name: string) => {
+ spanNames.push(name);
+ return { end: () => undefined };
+ },
+ }) as unknown as Tracer,
+ );
+ try {
+ const user = userEvent.setup();
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() => expect(spanNames).toContain('ok.slides.opened'));
+ } finally {
+ getTracerSpy.mockRestore();
+ }
+ });
+
+ test('a readiness timeout surfaces its own retry-hinting message', async () => {
+ const user = userEvent.setup();
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ open: () => Promise.resolve({ kind: 'open', ok: false, reason: 'timeout' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() =>
+ expect(toastErrorSpy).toHaveBeenCalledWith('Slidev timed out while starting. Try again.'),
+ );
+ });
+
+ test('a deck that crashes Slidev on boot gets a message distinct from a timeout', async () => {
+ // The discriminated reason drives distinct, actionable copy: a crashed boot
+ // (exited-early) is not the same problem as a hung boot (timeout).
+ const user = userEvent.setup();
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ open: () => Promise.resolve({ kind: 'open', ok: false, reason: 'exited-early' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() =>
+ expect(toastErrorSpy).toHaveBeenCalledWith("Slidev couldn't render this document."),
+ );
+ });
+
+ test('a foreign or too-old server on the port surfaces the unsupported-version message', async () => {
+ const user = userEvent.setup();
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ open: () => Promise.resolve({ kind: 'open', ok: false, reason: 'unsupported-server' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() =>
+ expect(toastErrorSpy).toHaveBeenCalledWith("This isn't a supported version of Slidev."),
+ );
+ });
+
+ test('a spawn failure surfaces a message distinct from a hung or crashed boot', async () => {
+ const user = userEvent.setup();
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ open: () => Promise.resolve({ kind: 'open', ok: false, reason: 'spawn-error' }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() => expect(toastErrorSpy).toHaveBeenCalledWith("Couldn't start Slidev."));
+ });
+
+ test('an open that rejects at the IPC boundary surfaces an error and logs the cause', async () => {
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const user = userEvent.setup();
+ installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: true, source: 'global' }),
+ open: () => Promise.reject(new Error('transport failed')),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+
+ await user.click(await screen.findByTestId('slides-toolbar-action'));
+
+ await waitFor(() => expect(toastErrorSpy).toHaveBeenCalledTimes(1));
+ // …and the rejection is logged, so a broken bridge stays distinguishable in
+ // diagnostics from a returned not-ok result — both surface the same toast.
+ expect(warnSpy).toHaveBeenCalledWith('[slides] open dispatch failed:', expect.any(Error));
+ warnSpy.mockRestore();
+ });
+});
+
+describe('SlidesToolbarControls — focus re-probe is bounded', () => {
+ test('rapid window focus does not re-probe on every event', async () => {
+ // Each status() runs a login-shell PATH probe on the desktop side. A deck
+ // open with slidev absent keeps the focus listener attached, so without a
+ // throttle every alt-tab would spawn a shell, indefinitely.
+ const { statusSpy } = installBridge({
+ status: () => Promise.resolve({ kind: 'status', available: false }),
+ });
+ await renderControls(makeProvider('---\nslides: true\n---\nbody\n'));
+ await waitFor(() => expect(statusSpy).toHaveBeenCalledTimes(1));
+
+ act(() => {
+ for (let i = 0; i < 20; i++) window.dispatchEvent(new Event('focus'));
+ });
+
+ // Still just the mount probe — twenty focus events, no extra shells.
+ expect(statusSpy).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/packages/app/src/components/SlidesToolbarControls.tsx b/packages/app/src/components/SlidesToolbarControls.tsx
new file mode 100644
index 000000000..7ae0e340f
--- /dev/null
+++ b/packages/app/src/components/SlidesToolbarControls.tsx
@@ -0,0 +1,202 @@
+import type { HocuspocusProvider } from '@hocuspocus/provider';
+import { Trans, useLingui } from '@lingui/react/macro';
+import { Presentation } from 'lucide-react';
+import { useEffect, useState } from 'react';
+import { toast } from 'sonner';
+import { Button } from '@/components/ui/button';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
+import { recordSlidesOpened } from '@/lib/slides-telemetry';
+import { useBooleanFrontmatterField } from '@/lib/use-boolean-frontmatter-field';
+import { useWorkspace } from '@/lib/use-workspace';
+import { docNameToRelativePath, joinWorkspacePath } from '@/lib/workspace-paths';
+
+/**
+ * Lazy-loaded Slides action for the editor toolbar. `EditorToolbar` mounts it
+ * only past the cheap synchronous gate (plugin enabled ∧ slides host ∧ a live
+ * provider ∧ an active doc name — the last is what makes `docName` a non-null
+ * `string` here), so this cluster stays out of the eager bundle and this
+ * component only decides the two remaining conditions: the active doc declares
+ * `slides: true`, and a runnable `slidev` resolved for the project. Both false →
+ * renders nothing. Activating it opens the deck in its own window via the
+ * `ok:slides:dispatch` `open` action.
+ */
+
+/**
+ * Availability of a runnable `slidev` for this window's project, resolved once
+ * per deck via the `status` probe. `'pending'` holds the action hidden until the
+ * probe answers, so a deck never flashes an action that turns out not to work.
+ */
+type SlidevAvailability = 'pending' | 'available' | 'unavailable';
+
+function useSlidevAvailability(isDeck: boolean): SlidevAvailability {
+ const [availability, setAvailability] = useState<SlidevAvailability>('pending');
+ useEffect(() => {
+ // Only a deck can show the action, so a non-deck skips the fs-stat +
+ // login-shell probe entirely.
+ if (!isDeck) return;
+ let active = true;
+ // A FOUND slidev unsubscribes the focus listener below, so the steady state
+ // is already free. A MISSING one keeps listening — that is the case this
+ // throttle bounds: with the plugin on, a deck open, and slidev never
+ // installed, every alt-tab would otherwise spawn a login shell, forever.
+ // The interval is far shorter than any real install, so the mid-session
+ // install-then-return path still lands on the first focus after it finishes.
+ const MIN_REPROBE_INTERVAL_MS = 10_000;
+ let lastProbeAt = 0;
+ let resolved = false;
+ const probe = () => {
+ lastProbeAt = Date.now();
+ const slides = window.okDesktop?.slides;
+ if (slides == null) {
+ setAvailability('unavailable');
+ return;
+ }
+ slides
+ .status()
+ .then((result) => {
+ if (!active) return;
+ setAvailability(result.available ? 'available' : 'unavailable');
+ // Stop re-probing once found. A resolvable slidev rarely disappears
+ // mid-session, and each status() runs a login-shell PATH probe for a
+ // global install — so an open deck's steady state must not spawn a
+ // shell on every window focus. A flag rather than an inline
+ // removeEventListener: naming the handler here would be a forward
+ // reference to a function declared below, which the React Compiler
+ // rejects at build time even though tsc and the tests accept it.
+ if (result.available) resolved = true;
+ })
+ // Trust boundary: status is an IPC round-trip to a separate process; a
+ // rejected invoke reads as "no runnable slidev" rather than crashing the
+ // effect. Log it so a broken bridge is distinguishable in diagnostics
+ // from a genuinely-absent slidev — both hide the action, but only one is
+ // a bug.
+ .catch((err: unknown) => {
+ console.warn(
+ '[slides] availability probe failed:',
+ err instanceof Error ? err : String(err),
+ );
+ if (active) setAvailability('unavailable');
+ });
+ };
+ // Focus fires on every window return; the throttle keeps a not-yet-found
+ // slidev from turning that into a shell spawn each time.
+ const probeOnFocus = () => {
+ if (resolved) return;
+ if (Date.now() - lastProbeAt < MIN_REPROBE_INTERVAL_MS) return;
+ probe();
+ };
+ probe();
+ // Re-probe when the user returns to the window until slidev resolves,
+ // mirroring the Settings panel. The mid-session first-run path is: open a
+ // deck, see no action, install slidev in a terminal, switch back — that
+ // switch is the focus event, so the action appears without reopening the
+ // document. Once found, the probe above unsubscribes this listener.
+ window.addEventListener('focus', probeOnFocus);
+ return () => {
+ active = false;
+ window.removeEventListener('focus', probeOnFocus);
+ };
+ }, [isDeck]);
+ return availability;
+}
+
+export function SlidesToolbarControls({
+ provider,
+ docName,
+}: {
+ provider: HocuspocusProvider;
+ docName: string;
+}) {
+ const { t } = useLingui();
+ const isDeck = useBooleanFrontmatterField(provider, 'slides');
+ const availability = useSlidevAvailability(isDeck);
+ const workspace = useWorkspace();
+
+ if (!isDeck || availability !== 'available') return null;
+
+ async function openAsSlides() {
+ const slides = window.okDesktop?.slides;
+ // `slides` is present by the same gate that mounted this control, and
+ // `workspace` resolves synchronously on that desktop host — both are narrowed
+ // here for the absolute-path build and the IPC call.
+ if (slides == null || workspace == null) return;
+ // Activation marker — the user used the Slides action. Emitted before the
+ // dispatch so intent is recorded independently of whether the server starts.
+ recordSlidesOpened();
+ const docPath = joinWorkspacePath(
+ workspace.contentDir,
+ docNameToRelativePath(docName),
+ workspace.pathSeparator,
+ );
+ try {
+ const result = await slides.open(docPath);
+ if (!result.ok) {
+ // Each reachable failure implies a different next step, so distinguish
+ // them: a boot that crashed Slidev (exited-early), a boot that hung
+ // (timeout), and a foreign/too-old server on the port
+ // (unsupported-server) are not the same problem. The generic copy stays
+ // for the rest (and the transport catch below, where the reason is
+ // genuinely unknown).
+ let message: string;
+ switch (result.reason) {
+ case 'timeout':
+ message = t`Slidev timed out while starting. Try again.`;
+ break;
+ case 'exited-early':
+ message = t`Slidev couldn't render this document.`;
+ break;
+ case 'unsupported-server':
+ message = t`This isn't a supported version of Slidev.`;
+ break;
+ case 'spawn-error':
+ message = t`Couldn't start Slidev.`;
+ break;
+ case 'not-available':
+ case 'invalid-path':
+ // Rare races (slidev disappeared, or the deck path stopped
+ // resolving, after the action was shown) with no next step beyond
+ // the generic copy — but enumerated so the anchor below flags a new
+ // reason at compile time rather than letting it fall through silently.
+ message = t`Couldn't open this document in Slidev.`;
+ break;
+ default: {
+ // Exhaustiveness anchor: every SlidevOpenFailureReason is handled
+ // above, so a new variant fails to compile here until it is given
+ // copy, instead of being absorbed into the generic message.
+ const _exhaustive: never = result.reason;
+ message = t`Couldn't open this document in Slidev.`;
+ }
+ }
+ toast.error(message);
+ }
+ } catch (err) {
+ // Trust boundary: the open dispatch crosses into the main process; a
+ // rejected invoke (transport / preload) surfaces the same failure as a
+ // returned not-ok result rather than failing silently. Log the cause so a
+ // broken bridge is distinguishable from a returned not-ok result — the
+ // same way the sibling status probe logs its rejection.
+ console.warn('[slides] open dispatch failed:', err instanceof Error ? err : String(err));
+ toast.error(t`Couldn't open this document in Slidev.`);
+ }
+ }
+
+ return (
+ <Tooltip>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={openAsSlides}
+ aria-label={t`Open in Slidev`}
+ data-testid="slides-toolbar-action"
+ asChild
+ >
+ <TooltipTrigger>
+ <Presentation aria-hidden />
+ </TooltipTrigger>
+ </Button>
+ <TooltipContent side="bottom">
+ <Trans>Open in Slidev</Trans>
+ </TooltipContent>
+ </Tooltip>
+ );
+}
diff --git a/packages/app/src/components/TerminalGate.tsx b/packages/app/src/components/TerminalGate.tsx
index a53c9c3e3..906d52147 100644
--- a/packages/app/src/components/TerminalGate.tsx
+++ b/packages/app/src/components/TerminalGate.tsx
@@ -22,6 +22,7 @@ import { Button } from '@/components/ui/button';
import { useTerminalConsentState, useTerminalEnabledWriter } from '@/hooks/use-terminal-enabled';
import type { OkDesktopBridge } from '@/lib/desktop-bridge-types';
import type { TerminalLaunchIntent } from './EditorPane';
+import type { TerminalCommandId } from './handoff/terminal-command-events';
// xterm + its addons + xterm.css (a heavy, WebGL-bearing payload) import only
// through TerminalPanel, so lazy-loading it keeps them out of the initial
@@ -39,6 +40,8 @@ interface TerminalGateProps {
readonly onTitleChange?: (title: string) => void;
/** "Open in terminal" launch intent, forwarded to the session. */
readonly launch?: TerminalLaunchIntent | null;
+ /** "Run this command" one-shot, forwarded to the session. */
+ readonly commandId?: TerminalCommandId | null;
/** Surviving PTY to adopt after a renderer reload, forwarded to the session;
* `null` for a freshly-opened tab. */
readonly adoptPtyId?: string | null;
@@ -52,6 +55,7 @@ export function TerminalGate({
onClose,
onTitleChange,
launch = null,
+ commandId = null,
adoptPtyId = null,
onPtyId,
}: TerminalGateProps) {
@@ -96,6 +100,7 @@ export function TerminalGate({
onClose={onClose}
onTitleChange={onTitleChange}
launch={launch}
+ commandId={commandId}
adoptPtyId={adoptPtyId}
onPtyId={onPtyId}
/>
diff --git a/packages/app/src/components/TerminalPanel.tsx b/packages/app/src/components/TerminalPanel.tsx
index b90940dcf..e191e830b 100644
--- a/packages/app/src/components/TerminalPanel.tsx
+++ b/packages/app/src/components/TerminalPanel.tsx
@@ -23,6 +23,7 @@ import { filePathToDocName, hashFromDocName, hashFromFolderPath } from '../lib/d
import { ClaudeReadinessBanner } from './ClaudeReadinessBanner';
import type { TerminalLaunchIntent } from './EditorPane';
import { filesFromExternalDrop, isExternalFileDrag } from './file-tree-adapter';
+import { type TerminalCommandId, terminalCommandFor } from './handoff/terminal-command-events';
import { TerminalCliMissingBanner } from './TerminalCliMissingBanner';
import { type TerminalExitInfo, TerminalExitNotice } from './TerminalExitNotice';
import { TerminalRefusalNotice } from './TerminalRefusalNotice';
@@ -85,6 +86,12 @@ interface TerminalPanelProps {
* tab, so the launch fires exactly once per session by construction.
*/
readonly launch?: TerminalLaunchIntent | null;
+ /**
+ * "Run this in the terminal" one-shot (Settings → Slides). Bakes a fixed
+ * command from a closed union into the spawn, with none of the CLI machinery.
+ * See {@link TerminalSessionProps.commandId}.
+ */
+ readonly commandId?: TerminalCommandId | null;
/**
* A PTY that survived a renderer reload in the main process. When set, the
* session adopts it (reconnects the live shell) on its first mount instead of
@@ -110,6 +117,7 @@ export function TerminalPanel({
onExit,
onTitleChange,
launch = null,
+ commandId = null,
adoptPtyId = null,
onPtyId,
}: TerminalPanelProps) {
@@ -146,6 +154,7 @@ export function TerminalPanel({
onTitleChange={onTitleChange}
onRestart={() => setRestartKey((k) => k + 1)}
launch={launch}
+ commandId={commandId}
adoptPtyId={adoptForThisMount}
onPtyId={onPtyId}
/>
@@ -167,6 +176,12 @@ interface TerminalSessionProps {
/** "Open in terminal" launch intent — baked into the PTY spawn when present
* (preflight-gated). See {@link TerminalPanelProps.launch}. */
readonly launch?: TerminalLaunchIntent | null;
+ /** "Run this in the terminal" one-shot from a UI surface (Settings → Slides).
+ * Mutually exclusive with {@link launch}: this bakes a fixed command from the
+ * closed {@link TerminalCommandId} union straight into the spawn, with none
+ * of the CLI machinery — no preflight, no readiness verdict, no missing-CLI
+ * banner, no startup injection — because there is no CLI involved. */
+ readonly commandId?: TerminalCommandId | null;
/** Surviving PTY to adopt on mount instead of spawning a fresh shell; `null`
* spawns fresh (the normal path). */
readonly adoptPtyId?: string | null;
@@ -182,6 +197,7 @@ function TerminalSession({
onTitleChange,
onRestart,
launch = null,
+ commandId = null,
adoptPtyId = null,
onPtyId,
}: TerminalSessionProps) {
@@ -795,6 +811,13 @@ function TerminalSession({
if (launch !== null && adoptPtyId === null) {
launchCommand = await resolveLaunchCommand(launch);
if (cancelled) return;
+ } else if (commandId !== null && adoptPtyId === null) {
+ // A "run this command" tab. No preflight: the command is a constant
+ // from a closed union, not a CLI we have to find on PATH first — and
+ // the login shell the spawn already uses is what makes a global npm
+ // install resolvable from a GUI-launched app. Same adopt guard as
+ // above, so a failed adopt never silently re-runs the command.
+ launchCommand = terminalCommandFor(commandId);
}
let result: Awaited<ReturnType<typeof bridge.terminal.create>>;
@@ -948,7 +971,7 @@ function TerminalSession({
// adoptPtyId is stable for a session instance (a restart remounts via the
// parent key rather than changing it), so listing it never re-runs this
// mount/adopt effect — it only satisfies the exhaustive-deps check.
- }, [bridge, adoptPtyId, launch]);
+ }, [bridge, adoptPtyId, launch, commandId]);
// Re-skin the live terminal when the app theme changes — light/dark AND the
// color-theme layer (useLiveXtermTheme keeps identity stable until colors
diff --git a/packages/app/src/components/handoff/terminal-command-events.test.ts b/packages/app/src/components/handoff/terminal-command-events.test.ts
new file mode 100644
index 000000000..5a1b879b3
--- /dev/null
+++ b/packages/app/src/components/handoff/terminal-command-events.test.ts
@@ -0,0 +1,67 @@
+/**
+ * The command bus carries an id, never shell text. These pin that boundary:
+ * the sibling launch bus documents that it never carries an executable command,
+ * and this channel keeps the same property by mapping a closed union to a
+ * constant at the consumer.
+ */
+
+import { describe, expect, test, vi } from 'vitest';
+import {
+ requestTerminalCommand,
+ subscribeToTerminalCommandRequests,
+ terminalCommandFor,
+} from './terminal-command-events';
+
+describe('terminalCommandFor', () => {
+ test('resolves the install id to a command naming BOTH packages', () => {
+ const cmd = terminalCommandFor('install-slidev');
+ // The theme is a separate package; without it a default-themed deck exits
+ // on boot, so a command with only the CLI is a broken instruction.
+ expect(cmd).toContain('@slidev/cli');
+ expect(cmd).toContain('@slidev/theme-default');
+ });
+
+ test('resolves nothing for an id outside the union', () => {
+ expect(terminalCommandFor('rm -rf /')).toBeUndefined();
+ expect(terminalCommandFor('constructor')).toBeUndefined();
+ expect(terminalCommandFor('__proto__')).toBeUndefined();
+ });
+});
+
+describe('the bus', () => {
+ test('delivers a known id to a subscriber', () => {
+ const target = new EventTarget();
+ const seen = vi.fn();
+ const unsubscribe = subscribeToTerminalCommandRequests(seen, target);
+
+ requestTerminalCommand('install-slidev', target);
+
+ expect(seen).toHaveBeenCalledWith('install-slidev');
+ unsubscribe();
+ });
+
+ test('drops an event whose id is not in the union', () => {
+ // A hand-fired or stale event must never reach the consumer, because the
+ // consumer turns what it receives into shell text.
+ const target = new EventTarget();
+ const seen = vi.fn();
+ const unsubscribe = subscribeToTerminalCommandRequests(seen, target);
+
+ target.dispatchEvent(
+ new CustomEvent('open-knowledge:terminal-command', { detail: 'npm publish' }),
+ );
+
+ expect(seen).not.toHaveBeenCalled();
+ unsubscribe();
+ });
+
+ test('stops delivering after unsubscribe', () => {
+ const target = new EventTarget();
+ const seen = vi.fn();
+ subscribeToTerminalCommandRequests(seen, target)();
+
+ requestTerminalCommand('install-slidev', target);
+
+ expect(seen).not.toHaveBeenCalled();
+ });
+});
diff --git a/packages/app/src/components/handoff/terminal-command-events.ts b/packages/app/src/components/handoff/terminal-command-events.ts
new file mode 100644
index 000000000..f55845042
--- /dev/null
+++ b/packages/app/src/components/handoff/terminal-command-events.ts
@@ -0,0 +1,74 @@
+/**
+ * Window-scoped pub/sub that carries a "run this in the terminal" request from
+ * a settings panel to the docked terminal, whose open-state lives in
+ * EditorPane. Same idiom as `terminal-launch-events`, deliberately kept
+ * separate from it.
+ *
+ * **This channel carries an id, never a command.** Its sibling
+ * `terminal-launch-events` states that it never carries an executable command —
+ * only a prompt the session wraps in a fixed `<bin> '<prompt>'`. That boundary
+ * is worth keeping, so this channel carries a member of a closed union and the
+ * consumer maps it to a constant here. Nothing a caller passes can become
+ * shell text: an id that is not in {@link TERMINAL_COMMANDS} resolves to
+ * nothing and the request is dropped.
+ *
+ * The resolved string is baked into the PTY spawn as
+ * `$SHELL -l -i -c '<cmd>; exec …'` (see TerminalPanel), not typed into a live
+ * shell — so it never reaches the line editor, never lands in shell history,
+ * and runs under a login+interactive shell, which is what makes a global `npm`
+ * install resolve at all from a GUI-launched app.
+ */
+
+/** Commands a UI surface may ask the terminal to run. Closed by design. */
+export type TerminalCommandId = 'install-slidev';
+
+/**
+ * The command each id maps to.
+ *
+ * `@slidev/theme-default` is not optional padding: Slidev themes ship as
+ * separate packages, OpenKnowledge spawns Slidev non-interactively so it cannot
+ * prompt to fetch a missing one, and a deck declaring the default theme exits
+ * on boot without it. Installing only the CLI leaves the user with a Slides
+ * action that opens nothing.
+ */
+const TERMINAL_COMMANDS: Record<TerminalCommandId, string> = {
+ 'install-slidev': 'npm install -g @slidev/cli @slidev/theme-default',
+};
+
+/** The shell text for `id`, or undefined when the id is not in the union (a
+ * stale event from an older renderer, or a hand-fired one). */
+export function terminalCommandFor(id: string): string | undefined {
+ return Object.hasOwn(TERMINAL_COMMANDS, id)
+ ? TERMINAL_COMMANDS[id as TerminalCommandId]
+ : undefined;
+}
+
+const TERMINAL_COMMAND_EVENT = 'open-knowledge:terminal-command';
+
+export function requestTerminalCommand(
+ id: TerminalCommandId,
+ target: Pick<Window, 'dispatchEvent'> | EventTarget = typeof window === 'undefined'
+ ? new EventTarget()
+ : window,
+): void {
+ target.dispatchEvent(new CustomEvent<TerminalCommandId>(TERMINAL_COMMAND_EVENT, { detail: id }));
+}
+
+export function subscribeToTerminalCommandRequests(
+ onRequest: (id: TerminalCommandId) => void,
+ target: Pick<Window, 'addEventListener' | 'removeEventListener'> | EventTarget = typeof window ===
+ 'undefined'
+ ? new EventTarget()
+ : window,
+): () => void {
+ const handler = (event: Event) => {
+ const { detail } = event as CustomEvent<string>;
+ // Drop anything outside the union rather than forwarding it — the consumer
+ // turns this into shell text, so an unknown id must never reach it.
+ if (typeof detail === 'string' && terminalCommandFor(detail) !== undefined) {
+ onRequest(detail as TerminalCommandId);
+ }
+ };
+ target.addEventListener(TERMINAL_COMMAND_EVENT, handler);
+ return () => target.removeEventListener(TERMINAL_COMMAND_EVENT, handler);
+}
diff --git a/packages/app/src/components/settings/LintingSection.dom.test.tsx b/packages/app/src/components/settings/LintingSection.dom.test.tsx
index e1123f5cb..f322418d7 100644
--- a/packages/app/src/components/settings/LintingSection.dom.test.tsx
+++ b/packages/app/src/components/settings/LintingSection.dom.test.tsx
@@ -294,6 +294,39 @@ describe('UserPluginsManageSection', () => {
successToasts[0]?.action?.onClick();
expect(window.location.hash).toBe('#settings/plugin:theme');
});
+
+ test('lists a user-scope Slides toggle beside Themes', () => {
+ render(<UserPluginsManageSection userBinding={null} />);
+ expect(screen.getByTestId('settings-plugin-toggle-slides')).toBeDefined();
+ expect(screen.getByTestId('settings-plugin-toggle-theme')).toBeDefined();
+ });
+
+ test('enabling Slides writes the user-scope enabled patch and offers its panel', async () => {
+ const { binding: userBinding, calls: userCalls } = makeBinding();
+ // Slides ships off, so the default (absent) config reads as off — a click enables it.
+ render(<UserPluginsManageSection userBinding={userBinding} />);
+
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-slides'));
+
+ expect(userCalls).toContainEqual({ slides: { enabled: true } });
+ expect(successToasts).toHaveLength(1);
+ expect(successToasts[0]?.message).toBe('Slidev enabled');
+ successToasts[0]?.action?.onClick();
+ expect(window.location.hash).toBe('#settings/plugin:slides');
+ });
+
+ test('disabling Slides writes enabled:false and does not offer its panel', async () => {
+ const { binding: userBinding, calls: userCalls } = makeBinding();
+ // Read as on so the click turns it off.
+ mockUserConfig = { slides: { enabled: true } } as unknown as Config;
+ render(<UserPluginsManageSection userBinding={userBinding} />);
+
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-slides'));
+
+ expect(userCalls).toContainEqual({ slides: { enabled: false } });
+ // Turning it OFF is not an invitation to go configure it.
+ expect(successToasts).toHaveLength(0);
+ });
});
// Row-level browser behavior (search, filters, toggles, MD043 editor, severity
diff --git a/packages/app/src/components/settings/LintingSection.tsx b/packages/app/src/components/settings/LintingSection.tsx
index f77202c01..a78c67835 100644
--- a/packages/app/src/components/settings/LintingSection.tsx
+++ b/packages/app/src/components/settings/LintingSection.tsx
@@ -22,7 +22,7 @@ import {
} from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
import { ArrowUpRight, Plus, SquarePen, Trash2 } from 'lucide-react';
-import { type ReactNode, useState } from 'react';
+import { useState } from 'react';
import { toast } from 'sonner';
import { DeleteConfirmationDialog } from '@/components/DeleteConfirmationDialog';
import { Button } from '@/components/ui/button';
@@ -47,8 +47,8 @@ import { indexGlobProblemsByFile, parseAppliesToGlobProblem } from './applies-to
import { LINT_PLUGIN_META } from './lint-plugin-meta';
import { MarkdownlintRuleBrowser } from './markdownlint-rule-browser';
import { PluginBetaBadge } from './PluginBetaBadge';
+import { PluginSectionHeader } from './PluginSectionHeader';
import { notifyPluginEnabled } from './plugin-enabled-notice';
-import { ScopeBadge } from './ScopeBadge';
/** Project-scope content-rules config + a `contentRules`-patch writer. Shared by the sections. */
function useLinterConfig() {
@@ -174,6 +174,9 @@ export function UserPluginsManageSection({ userBinding }: { userBinding: ConfigB
const { userConfig } = useConfigContext();
// The theme plugin is user-scope (personal). Default on.
const themeEnabled = userConfig?.appearance?.colorThemeEnabled !== false;
+ // Slidev is user-scope too, but ships OFF — the gate is `=== true`, not
+ // Themes' `!== false`.
+ const slidesEnabled = userConfig?.slides?.enabled === true;
return (
<section
@@ -194,8 +197,8 @@ export function UserPluginsManageSection({ userBinding }: { userBinding: ConfigB
</p>
</div>
- <div className="rounded-md border p-3" data-testid="settings-user-plugins-list">
- <div className="flex items-center justify-between gap-3">
+ <div className="divide-y rounded-md border" data-testid="settings-user-plugins-list">
+ <div className="flex items-center justify-between gap-3 px-3 py-2">
<div className="min-w-0">
<Label htmlFor="settings-plugin-toggle-theme" className="text-sm font-medium">
<Trans>Themes</Trans>
@@ -226,66 +229,45 @@ export function UserPluginsManageSection({ userBinding }: { userBinding: ConfigB
data-testid="settings-plugin-toggle-theme"
/>
</div>
+ <div className="flex items-center justify-between gap-3 px-3 py-2">
+ <div className="min-w-0">
+ <Label
+ htmlFor="settings-plugin-toggle-slides"
+ className="inline-flex items-center gap-1.5 text-sm font-medium"
+ >
+ <Trans>Slidev</Trans>
+ <PluginBetaBadge />
+ </Label>
+ <p className="text-sm text-muted-foreground">
+ <Trans>
+ Present a document as a slide deck in its own window. Works in the OpenKnowledge
+ desktop app only, and needs the Slidev CLI, which you install separately. When on,
+ it appears under Plugins in the sidebar.
+ </Trans>
+ </p>
+ </div>
+ <Switch
+ id="settings-plugin-toggle-slides"
+ checked={slidesEnabled}
+ disabled={userBinding === null}
+ onCheckedChange={(next) => {
+ if (!userBinding) return;
+ const result = userBinding.patch({ slides: { enabled: next } });
+ if (!result.ok) {
+ toast.error(t`Failed to save Slidev setting`);
+ return;
+ }
+ if (next) notifyPluginEnabled({ pluginId: 'slides', label: t`Slidev` });
+ }}
+ aria-label={slidesEnabled ? t`Disable Slidev` : t`Enable Slidev`}
+ data-testid="settings-plugin-toggle-slides"
+ />
+ </div>
</div>
</section>
);
}
-/** Shared header for a per-plugin settings panel. */
-function PluginSectionHeader({
- titleId,
- title,
- scope,
- beta,
- docUrl,
- children,
-}: {
- titleId: string;
- title: string;
- /** When set, renders a User/Project scope badge beside the title. */
- scope?: 'user' | 'project';
- /** When set, renders the feature-maturity Beta tag beside the title. */
- beta?: boolean;
- /**
- * Docs page for the plugin. The standing counterpart to the enable-time
- * toast: whoever lands here later still gets a route to the how-to.
- */
- docUrl?: string;
- children: ReactNode;
-}) {
- const { t } = useLingui();
- return (
- <div className="space-y-1">
- <div className="flex items-center gap-2">
- <h3 id={titleId} className="text-base font-semibold">
- {title}
- </h3>
- {beta ? <PluginBetaBadge /> : null}
- {scope ? <ScopeBadge scope={scope} /> : null}
- </div>
- <p className="text-sm text-muted-foreground">{children}</p>
- {docUrl !== undefined ? (
- <a
- href={docUrl}
- target="_blank"
- rel="noopener noreferrer"
- onClick={(e) => dispatchExternalLinkClick(e, docUrl)}
- onAuxClick={(e) => dispatchExternalLinkClick(e, docUrl)}
- // Names its destination for anyone listing links out of context, where
- // a bare "Learn more" says nothing. Keeps the visible text as a prefix
- // so voice control still activates it by what's on screen.
- aria-label={t`Learn more about ${title}`}
- className="inline-flex items-center gap-0.5 text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
- data-testid={`${titleId}-docs-link`}
- >
- <Trans>Learn more</Trans>
- <ArrowUpRight aria-hidden className="size-3" />
- </a>
- ) : null}
- </div>
- );
-}
-
/** Docs page for one plugin — panel headers link it beside their description. */
function pluginDocUrl(id: LintPluginId): string | undefined {
return LINT_PLUGIN_META.find((plugin) => plugin.id === id)?.docUrl;
diff --git a/packages/app/src/components/settings/PluginBetaBadge.tsx b/packages/app/src/components/settings/PluginBetaBadge.tsx
index ea228256f..28c32f2c2 100644
--- a/packages/app/src/components/settings/PluginBetaBadge.tsx
+++ b/packages/app/src/components/settings/PluginBetaBadge.tsx
@@ -1,17 +1,25 @@
/**
- * Feature-maturity "Beta" tag for the frontmatter schemas plugin — always
- * visible, about the feature, not the build (mirrors the ACP AgentBetaBadge).
- * Rendered on every surface the feature owns: the Plugins manage row, the
- * plugin's settings panel header, and the schema file editor.
+ * Feature-maturity "Beta" tag for a plugin — always visible, about the feature,
+ * not the build (mirrors the ACP AgentBetaBadge). Rendered on every surface the
+ * feature owns: the Plugins manage row, the plugin's settings panel header, and
+ * (for frontmatter schemas) the schema file editor.
+ *
+ * Sizing is the `Badge` default on purpose. This badge used to hard-code a
+ * smaller `h-4 px-1 text-[10px]`, which is invisible while a header carries only
+ * one badge — but a plugin that is BOTH beta and scoped renders this next to
+ * `ScopeBadge`, which uses the default, and the pair came out visibly mismatched.
+ * `Badge` has no size variant, so the smaller values were a one-off override;
+ * the default is the design-system size every other badge in the app uses.
+ * Callers that genuinely need a denser badge pass the sizing through
+ * `className` (tailwind-merge lets it win over the base).
*/
import { Trans } from '@lingui/react/macro';
import { Badge } from '@/components/ui/badge';
-import { cn } from '@/lib/utils';
export function PluginBetaBadge({ className }: { readonly className?: string }) {
return (
- <Badge variant="gray" className={cn('h-4 px-1 text-[10px]', className)}>
+ <Badge variant="gray" className={className}>
<Trans>Beta</Trans>
</Badge>
);
diff --git a/packages/app/src/components/settings/PluginSectionHeader.tsx b/packages/app/src/components/settings/PluginSectionHeader.tsx
new file mode 100644
index 000000000..336127f08
--- /dev/null
+++ b/packages/app/src/components/settings/PluginSectionHeader.tsx
@@ -0,0 +1,69 @@
+/**
+ * Shared header for a per-plugin settings panel — title, the maturity and scope
+ * badges, the description, and the standing docs link.
+ *
+ * Lives outside `LintingSection` because not every plugin is a lint plugin:
+ * Slidev owns no `contentRules` slice, and importing this from the lint module
+ * would pull the whole rule-catalog graph into a panel that has no use for it.
+ */
+
+import { Trans, useLingui } from '@lingui/react/macro';
+import { ArrowUpRight } from 'lucide-react';
+import type { ReactNode } from 'react';
+import { dispatchExternalLinkClick } from '@/lib/external-link';
+import { PluginBetaBadge } from './PluginBetaBadge';
+import { ScopeBadge } from './ScopeBadge';
+
+export function PluginSectionHeader({
+ titleId,
+ title,
+ scope,
+ beta,
+ docUrl,
+ children,
+}: {
+ titleId: string;
+ title: string;
+ /** When set, renders a User/Project scope badge beside the title. */
+ scope?: 'user' | 'project';
+ /** When set, renders the feature-maturity Beta tag beside the title. */
+ beta?: boolean;
+ /**
+ * Docs page for the plugin. The standing counterpart to the enable-time
+ * toast: whoever lands here later still gets a route to the how-to.
+ */
+ docUrl?: string;
+ children: ReactNode;
+}) {
+ const { t } = useLingui();
+ return (
+ <div className="space-y-1">
+ <div className="flex items-center gap-2">
+ <h3 id={titleId} className="text-base font-semibold">
+ {title}
+ </h3>
+ {beta ? <PluginBetaBadge /> : null}
+ {scope ? <ScopeBadge scope={scope} /> : null}
+ </div>
+ <p className="text-sm text-muted-foreground">{children}</p>
+ {docUrl !== undefined ? (
+ <a
+ href={docUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ onClick={(e) => dispatchExternalLinkClick(e, docUrl)}
+ onAuxClick={(e) => dispatchExternalLinkClick(e, docUrl)}
+ // Names its destination for anyone listing links out of context, where
+ // a bare "Learn more" says nothing. Keeps the visible text as a prefix
+ // so voice control still activates it by what's on screen.
+ aria-label={t`Learn more about ${title}`}
+ className="inline-flex items-center gap-0.5 text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
+ data-testid={`${titleId}-docs-link`}
+ >
+ <Trans>Learn more</Trans>
+ <ArrowUpRight aria-hidden className="size-3" />
+ </a>
+ ) : null}
+ </div>
+ );
+}
diff --git a/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx b/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx
index bf039d81b..62c8e6be7 100644
--- a/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx
+++ b/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx
@@ -776,4 +776,15 @@ describe('SettingsDialogBody section runtime dispatch', () => {
expect(screen.getByTestId(`settings-plugin-${plugin.id}`)).toBeTruthy();
}
});
+
+ // Same drift guard, non-lint branch. Slides is a peer of the theme plugin: it
+ // owns no `contentRules` slice, so it is NOT in LINT_PLUGIN_META and the
+ // generic `plugin:` fallthrough (which only knows the lint registry) cannot
+ // dispatch it. This pins the dispatch→panel half of the hand-wired id; the
+ // shell sidebar half is pinned in SettingsDialogShell.dom.test.tsx.
+ test('dispatches plugin:slides to its own panel above the lint-plugin fallthrough', async () => {
+ const { pluginSettingsSectionId } = await import('@/lib/use-settings-route');
+ await renderBody({ activeId: pluginSettingsSectionId('slides') });
+ expect(screen.getByTestId('settings-plugin-slides')).toBeTruthy();
+ });
});
diff --git a/packages/app/src/components/settings/SettingsDialogBody.tsx b/packages/app/src/components/settings/SettingsDialogBody.tsx
index 431f9ebff..650964e3a 100644
--- a/packages/app/src/components/settings/SettingsDialogBody.tsx
+++ b/packages/app/src/components/settings/SettingsDialogBody.tsx
@@ -43,6 +43,7 @@ import { ProjectAiToolsSection } from './ProjectAiToolsSection';
import { ProjectTemplatesSection } from './ProjectTemplatesSection';
import { SearchSection } from './SearchSection';
import { SkillsManagerSection } from './SkillsManagerSection';
+import { SlidesPluginSection } from './SlidesPluginSection';
import { SyncSection } from './SyncSection';
import { BoundSchemaSection } from './schema-section';
import { FIELDS_USER_PREFERENCES } from './settings-fields';
@@ -136,6 +137,12 @@ export function SettingsDialogBody({
// lint plugin (it owns no `contentRules` slice). Its config is user-scope.
return userBinding ? <ThemePluginSection userBinding={userBinding} /> : <SectionSkeleton />;
}
+ if (activeId === 'plugin:slides') {
+ // The Slides "plugin" — a peer of the lint plugins in the Plugins menu, not
+ // a lint plugin (it owns no `contentRules` slice). Dedicated branch above
+ // the generic plugin fallthrough, which only knows the lint-plugin registry.
+ return <SlidesPluginSection />;
+ }
if (activeId === 'plugin:markdownlint') {
// Dedicated branch (above the generic plugin fallthrough) so the settings
// search can seed the panel's own rule search when it navigates to a rule.
diff --git a/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx b/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx
index 57fc447ab..d764ca236 100644
--- a/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx
+++ b/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx
@@ -90,6 +90,10 @@ let mockShowInstallSkill = true;
// markdownlint is opt-in (off by default); the default mock represents a
// project that has enabled it, so the Plugins group lists its panel.
let mockProjectConfig: unknown = { contentRules: { markdownlint: { enabled: true } } };
+// The layered `merged` config drives user-scope plugin visibility (Themes,
+// Slides). Default null → Themes shows (default-on gate) and Slides hides
+// (default-off gate).
+let mockMerged: unknown = null;
vi.doMock('@inkeep/open-knowledge-core', () => ({
get SHOW_INSTALL_SKILL() {
@@ -127,7 +131,7 @@ vi.doMock('@/lib/config-provider', () => ({
projectConfig: mockProjectConfig,
projectLocalConfig: null,
projectLocalSynced: false,
- merged: null,
+ merged: mockMerged,
}),
}));
@@ -167,6 +171,7 @@ describe('SettingsDialogShell userBinding gating (Tier-3 mount)', () => {
mockBodyMode = 'probe';
mockShowInstallSkill = true;
mockProjectConfig = { contentRules: { markdownlint: { enabled: true } } };
+ mockMerged = null;
consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {});
});
@@ -260,6 +265,27 @@ describe('SettingsDialogShell userBinding gating (Tier-3 mount)', () => {
expect(screen.getByText('Themes')).toBeTruthy();
});
+ test('omits the Slides plugin from the sidebar until slides.enabled is true', () => {
+ // Slides ships off. With no `slides.enabled` (default) the item is absent;
+ // the shell sidebar half of the `plugin:slides` drift guard (dispatch half
+ // lives in SettingsDialogBody.sections.dom.test.tsx).
+ render(<SettingsDialogShell open={true} onOpenChange={() => {}} />);
+ expect(screen.queryByTestId('settings-sidebar-item-plugin:slides')).toBeNull();
+
+ cleanup();
+ mockMerged = { slides: { enabled: false } };
+ render(<SettingsDialogShell open={true} onOpenChange={() => {}} />);
+ expect(screen.queryByTestId('settings-sidebar-item-plugin:slides')).toBeNull();
+ });
+
+ test('lists the Slidev plugin in the Plugins group once slides.enabled is true', () => {
+ mockMerged = { slides: { enabled: true } };
+ render(<SettingsDialogShell open={true} onOpenChange={() => {}} />);
+ expect(screen.getByTestId('settings-sidebar-item-plugin:slides')).toBeTruthy();
+ // The nav names the renderer, not the config key it is gated on.
+ expect(screen.getByText('Slidev')).toBeTruthy();
+ });
+
test('has a per-scope Plugins manage item under both User and This project', () => {
// Default mock has a project (mockCollabUrl set) with markdownlint enabled.
render(<SettingsDialogShell open={true} onOpenChange={() => {}} />);
diff --git a/packages/app/src/components/settings/SettingsDialogShell.tsx b/packages/app/src/components/settings/SettingsDialogShell.tsx
index 2979b4c70..eb272d96a 100644
--- a/packages/app/src/components/settings/SettingsDialogShell.tsx
+++ b/packages/app/src/components/settings/SettingsDialogShell.tsx
@@ -195,6 +195,11 @@ export function SettingsDialogShell({
// "User plugins" sidebar group.
const themeEnabled = merged?.appearance?.colorThemeEnabled !== false;
+ // Slides is a user-scope plugin like Themes, but ships OFF (`slides.enabled`
+ // default false) — so the gate is `=== true`, not Themes' `!== false`. Its
+ // panel appears in the Plugins group only once the user opts in.
+ const slidesEnabled = merged?.slides?.enabled === true;
+
// The packaged desktop renderer loads over file:// (desktop main's
// loadFile), so its POST /api/link-preview requests carry Origin: null,
// which the route's anti-proxy gate rejects by design (see
@@ -258,6 +263,7 @@ export function SettingsDialogShell({
items: [
...(hasProject ? enabledPluginItems : []),
...(themeEnabled ? [{ id: 'plugin:theme', label: t`Themes` }] : []),
+ ...(slidesEnabled ? [{ id: 'plugin:slides', label: t`Slidev` }] : []),
],
},
{
diff --git a/packages/app/src/components/settings/SlidesPluginSection.dom.test.tsx b/packages/app/src/components/settings/SlidesPluginSection.dom.test.tsx
new file mode 100644
index 000000000..dbc169634
--- /dev/null
+++ b/packages/app/src/components/settings/SlidesPluginSection.dom.test.tsx
@@ -0,0 +1,237 @@
+/**
+ * DOM tests for the Slides settings panel. This panel is the only surface that
+ * makes an unresolved Slidev visible — everywhere else its absence is silent by
+ * design — so these cover each status it can report plus the re-probe that lets
+ * the panel correct itself after the user installs Slidev in a terminal.
+ */
+
+import * as actualLinguiMacro from '@lingui/react/macro';
+import { act, cleanup, render, screen, waitFor } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import type { ReactNode } from 'react';
+import { afterEach, describe, expect, test, vi } from 'vitest';
+import { terminalCommandFor } from '@/components/handoff/terminal-command-events';
+import { TooltipProvider } from '@/components/ui/tooltip';
+import type { OkSlidesStatusResult } from '@/lib/desktop-bridge-types';
+import { renderLinguiTemplate } from '@/test-utils/lingui-mock';
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,
+ useLingui: () => ({ t: renderLinguiTemplate }),
+}));
+
+function installBridge(
+ status: () => Promise<OkSlidesStatusResult>,
+ opts: { ptyAvailable?: boolean } = {},
+) {
+ const statusSpy = vi.fn(status);
+ const ptyAvailable = opts.ptyAvailable ?? true;
+ (window as unknown as { okDesktop?: unknown }).okDesktop = {
+ config: { projectPath: '/proj', ptyAvailable },
+ platform: 'darwin',
+ // The terminal surface is absent on hosts that cannot spawn a PTY.
+ ...(ptyAvailable ? { terminal: { create: vi.fn() } } : {}),
+ slides: { status: statusSpy, open: vi.fn() },
+ };
+ return statusSpy;
+}
+
+async function renderPanel() {
+ const { SlidesPluginSection } = await import('./SlidesPluginSection');
+ // Production mounts this deep inside main.tsx's app-root TooltipProvider
+ // (which five other settings panels already rely on); supply one here only
+ // because the panel is rendered in isolation.
+ return render(
+ <TooltipProvider>
+ <SlidesPluginSection />
+ </TooltipProvider>,
+ );
+}
+
+afterEach(() => {
+ cleanup();
+ (window as unknown as { okDesktop?: unknown }).okDesktop = undefined;
+ vi.clearAllMocks();
+});
+
+describe('SlidesPluginSection — availability status', () => {
+ test('reports a global install without offering the install command', async () => {
+ installBridge(() => Promise.resolve({ kind: 'status', available: true, source: 'global' }));
+ await renderPanel();
+ expect(await screen.findByTestId('slides-status-available')).toBeTruthy();
+ expect(screen.queryByTestId('slides-status-missing')).toBeNull();
+ });
+
+ test('distinguishes a project-local install, since that is the one that wins', async () => {
+ installBridge(() =>
+ Promise.resolve({ kind: 'status', available: true, source: 'project-local' }),
+ );
+ await renderPanel();
+ const row = await screen.findByTestId('slides-status-available');
+ expect(row.textContent).toContain('this project');
+ });
+
+ test('offers the install command — including the theme — when Slidev is absent', async () => {
+ installBridge(() => Promise.resolve({ kind: 'status', available: false }));
+ await renderPanel();
+ await screen.findByTestId('slides-status-missing');
+ // Read the control the user actually copies from, not the container's text —
+ // the command lives in a readonly input, which contributes no textContent.
+ const command = (await screen.findByTestId('slides-install-command')) as HTMLInputElement;
+ // The theme is a separate package and a deck cannot boot without it, so a
+ // command naming only the CLI would send the user back to a broken deck.
+ expect(command.value).toContain('@slidev/cli');
+ expect(command.value).toContain('@slidev/theme-default');
+ // The "other ways to install" link points at Slidev's own install guide and
+ // names its destination for assistive tech listing links out of context.
+ const docsLink = screen.getByTestId('slides-install-docs-link') as HTMLAnchorElement;
+ expect(docsLink.getAttribute('href')).toBe('https://sli.dev/guide/install');
+ expect(docsLink.getAttribute('aria-label')).toBe('Other ways to install Slidev');
+ });
+
+ test('says the feature is desktop-only rather than "not installed" off desktop', async () => {
+ // No okDesktop bridge at all — the web build. Reporting "not installed"
+ // here would send the user to install something that still would not help.
+ await renderPanel();
+ expect(await screen.findByTestId('slides-status-unsupported')).toBeTruthy();
+ expect(screen.queryByTestId('slides-status-missing')).toBeNull();
+ });
+
+ test('a rejected probe shows a neutral check-failed state, not install guidance', async () => {
+ // A broken bridge is not an absent Slidev — the binary may be present, so
+ // offering the install command would send the user after software they
+ // already have. The fault is reported as check-failed and logged.
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const statusSpy = installBridge(() => Promise.reject(new Error('bridge broke')));
+ await renderPanel();
+ await waitFor(() => expect(statusSpy).toHaveBeenCalled());
+ expect(await screen.findByTestId('slides-status-check-failed')).toBeTruthy();
+ // The amber "not installed" remediation must NOT appear for a transport fault.
+ expect(screen.queryByTestId('slides-status-missing')).toBeNull();
+ expect(screen.queryByTestId('slides-install-command')).toBeNull();
+ expect(warnSpy).toHaveBeenCalledWith(
+ '[slides] settings availability probe failed:',
+ expect.any(Error),
+ );
+ warnSpy.mockRestore();
+ });
+
+ test('sits in the checking state until the probe settles', async () => {
+ // A probe that never resolves — the panel holds "Checking", never flashing a
+ // found / missing verdict it does not have yet.
+ installBridge(() => new Promise<OkSlidesStatusResult>(() => {}));
+ await renderPanel();
+ expect(await screen.findByTestId('slides-status-checking')).toBeTruthy();
+ expect(screen.queryByTestId('slides-status-missing')).toBeNull();
+ expect(screen.queryByTestId('slides-status-available')).toBeNull();
+ });
+});
+
+describe('SlidesPluginSection — re-probe', () => {
+ test('re-checks on window focus, so installing in a terminal updates the panel', async () => {
+ // The whole point of the panel: the user reads "not installed", installs in
+ // a terminal, and switches back. That switch is the focus event.
+ let available = false;
+ const statusSpy = installBridge(() =>
+ Promise.resolve(
+ available
+ ? ({ kind: 'status', available: true, source: 'global' } as OkSlidesStatusResult)
+ : ({ kind: 'status', available: false } as OkSlidesStatusResult),
+ ),
+ );
+ await renderPanel();
+ expect(await screen.findByTestId('slides-status-missing')).toBeTruthy();
+
+ available = true;
+ act(() => {
+ window.dispatchEvent(new Event('focus'));
+ });
+
+ expect(await screen.findByTestId('slides-status-available')).toBeTruthy();
+ expect(statusSpy).toHaveBeenCalledTimes(2);
+ });
+
+ test('stops probing once unmounted', async () => {
+ const statusSpy = installBridge(() =>
+ Promise.resolve({ kind: 'status', available: false } as OkSlidesStatusResult),
+ );
+ const { unmount } = await renderPanel();
+ await waitFor(() => expect(statusSpy).toHaveBeenCalledTimes(1));
+
+ unmount();
+ act(() => {
+ window.dispatchEvent(new Event('focus'));
+ });
+
+ // A leaked focus listener would keep probing (and setState) after unmount.
+ expect(statusSpy).toHaveBeenCalledTimes(1);
+ });
+});
+
+describe('SlidesPluginSection — run in terminal', () => {
+ test('asks the terminal to run the install, and closes Settings first', async () => {
+ const user = userEvent.setup();
+ const requests: string[] = [];
+ const onCommand = (e: Event) => requests.push((e as CustomEvent<string>).detail);
+ window.addEventListener('open-knowledge:terminal-command', onCommand);
+ const backSpy = vi.spyOn(window.history, 'back').mockImplementation(() => {});
+ // The dialog is hash-routed; only an open dialog should be dismissed.
+ window.location.hash = '#settings/plugin:slides';
+
+ installBridge(() => Promise.resolve({ kind: 'status', available: false }));
+ await renderPanel();
+ await user.click(await screen.findByTestId('slides-run-install'));
+
+ expect(requests).toEqual(['install-slidev']);
+ expect(backSpy).toHaveBeenCalledTimes(1);
+
+ window.removeEventListener('open-knowledge:terminal-command', onCommand);
+ backSpy.mockRestore();
+ window.location.hash = '';
+ });
+
+ test('does not offer the run button once Slidev is found', async () => {
+ installBridge(() => Promise.resolve({ kind: 'status', available: true, source: 'global' }));
+ await renderPanel();
+ await screen.findByTestId('slides-status-available');
+ expect(screen.queryByTestId('slides-run-install')).toBeNull();
+ });
+});
+
+describe('SlidesPluginSection — single source for the command', () => {
+ test('shows exactly the command the Run button will execute', async () => {
+ // The panel used to restate the command as its own constant. Displaying one
+ // command while running another is invisible drift: the user copies the
+ // text, runs it, and gets a different result than the button would have.
+ installBridge(() => Promise.resolve({ kind: 'status', available: false }));
+ await renderPanel();
+ const shown = (await screen.findByTestId('slides-install-command')) as HTMLInputElement;
+ expect(shown.value).toBe(terminalCommandFor('install-slidev'));
+ });
+});
+
+describe('SlidesPluginSection — terminal availability', () => {
+ test('hides Run in terminal where no PTY can be spawned (Windows / Linux)', async () => {
+ // node-pty is macOS-only, so the dock is dark off-mac and `ptyAvailable` is
+ // false. Rendering the button there would close Settings, fire the request,
+ // and produce no session — the click would look swallowed.
+ installBridge(() => Promise.resolve({ kind: 'status', available: false }), {
+ ptyAvailable: false,
+ });
+ await renderPanel();
+ await screen.findByTestId('slides-status-missing');
+ expect(screen.queryByTestId('slides-run-install')).toBeNull();
+ // The copy path is platform-independent and must survive.
+ expect(screen.getByTestId('slides-install-command')).toBeTruthy();
+ expect(screen.getByTestId('slides-install-docs-link')).toBeTruthy();
+ });
+
+ test('offers Run in terminal where a PTY can be spawned', async () => {
+ installBridge(() => Promise.resolve({ kind: 'status', available: false }), {
+ ptyAvailable: true,
+ });
+ await renderPanel();
+ expect(await screen.findByTestId('slides-run-install')).toBeTruthy();
+ });
+});
diff --git a/packages/app/src/components/settings/SlidesPluginSection.tsx b/packages/app/src/components/settings/SlidesPluginSection.tsx
new file mode 100644
index 000000000..eb2b40ec8
--- /dev/null
+++ b/packages/app/src/components/settings/SlidesPluginSection.tsx
@@ -0,0 +1,261 @@
+/**
+ * The Slidev "plugin" panel — a peer of the lint plugins in the Plugins menu
+ * (Settings → Plugins → Slidev), not a lint plugin: it owns no `contentRules`
+ * slice and adds nothing to the Problems panel. Its enablement lives in a
+ * user-scope config leaf (`slides.enabled`), the same posture as Themes.
+ *
+ * Beyond explaining the plugin, the panel answers the one question the rest of
+ * the feature cannot: **did OpenKnowledge actually find Slidev?** Everywhere
+ * else, an unresolved Slidev is silent by design — the toolbar action is simply
+ * absent, which is indistinguishable from the plugin being broken. This panel
+ * is the single place that state is visible, so it re-probes on mount and on
+ * window focus: install Slidev in a terminal, click back into OpenKnowledge,
+ * and the status flips without a restart.
+ */
+
+import { Trans, useLingui } from '@lingui/react/macro';
+import { ArrowUpRight, TerminalIcon } from 'lucide-react';
+import { useEffect, useState } from 'react';
+import { CopyButton } from '@/components/CopyButton';
+import {
+ requestTerminalCommand,
+ terminalCommandFor,
+} from '@/components/handoff/terminal-command-events';
+import { Button } from '@/components/ui/button';
+import { InputGroup, InputGroupAddon, InputGroupInput } from '@/components/ui/input-group';
+import { dispatchExternalLinkClick } from '@/lib/external-link';
+import { isSettingsHashOpen } from '@/lib/use-settings-route';
+import { PluginSectionHeader } from './PluginSectionHeader';
+
+/** The command shown, copied, AND run — read from the terminal-command registry
+ * rather than restated here. The panel displaying one command while the button
+ * runs another is the drift this single source exists to prevent, and it would
+ * be invisible until someone copied the text and got a different result. The
+ * registry is also where the "why both packages" rationale lives. */
+const INSTALL_COMMAND = terminalCommandFor('install-slidev') ?? '';
+
+const SLIDEV_INSTALL_DOCS = 'https://sli.dev/guide/install';
+
+/** OpenKnowledge's own page for the plugin — how to enable it, the frontmatter
+ * flag, and what Slidev authoring looks like from here. Distinct from
+ * `SLIDEV_INSTALL_DOCS`, which is upstream Slidev's install matrix. */
+const SLIDEV_DOCS = 'https://openknowledge.ai/docs/plugins/slidev';
+
+type Availability =
+ | { kind: 'checking' }
+ | { kind: 'available'; source: 'global' | 'project-local' }
+ | { kind: 'missing' }
+ /** The probe itself failed — a broken bridge / rejected invoke — as opposed to
+ * a probe that succeeded and found no Slidev (`missing`). Slidev may well be
+ * present, so offering the install command would be the wrong remediation. */
+ | { kind: 'check-failed' }
+ /** Not the desktop app (or no bridge): the feature cannot run here at all, so
+ * "not installed" would be the wrong thing to say. */
+ | { kind: 'unsupported' };
+
+function useSlidevStatus(): Availability {
+ const [availability, setAvailability] = useState<Availability>({ kind: 'checking' });
+
+ // `probe` is defined inside the effect (not the component body) so it shares
+ // the effect's `active` flag and keeps a single stable identity — the same
+ // function reference registers the focus listener below and removes it on
+ // cleanup, which a body-level callback (unmemoizable under the React Compiler)
+ // could not guarantee.
+ useEffect(() => {
+ // Guards a late `status()` resolution from writing state into an unmounted
+ // panel — the round-trip outlives a quick open-and-close of Settings. The
+ // sibling probe in SlidesToolbarControls carries the same flag.
+ let active = true;
+ const probe = () => {
+ const slides = window.okDesktop?.slides;
+ if (slides == null) {
+ setAvailability({ kind: 'unsupported' });
+ return;
+ }
+ slides
+ .status()
+ .then((result) => {
+ if (!active) return;
+ setAvailability(
+ result.available ? { kind: 'available', source: result.source } : { kind: 'missing' },
+ );
+ })
+ // Trust boundary: an IPC round-trip to a separate process. A rejected
+ // invoke means the probe could not run — reported as `check-failed`
+ // (neutral copy), NOT `missing`: telling the user to install Slidev when
+ // the bridge broke would send them after software that may be present.
+ // Logged so a broken bridge stays distinguishable in diagnostics.
+ .catch((err: unknown) => {
+ console.warn('[slides] settings availability probe failed:', err);
+ if (active) setAvailability({ kind: 'check-failed' });
+ });
+ };
+ probe();
+ // Re-probe when the user comes back to the window. The common first-run
+ // path is: see "not installed" → install in a terminal → switch back. That
+ // switch is the focus event, so the panel is correct by the time they look
+ // at it.
+ window.addEventListener('focus', probe);
+ return () => {
+ active = false;
+ window.removeEventListener('focus', probe);
+ };
+ }, []);
+
+ return availability;
+}
+
+/**
+ * Whether this host can actually open a terminal tab and run something in it.
+ *
+ * The terminal dock is dark on Windows and Linux — node-pty ships macOS-only,
+ * so `config.ptyAvailable` is false there. Without this gate, "Run in terminal"
+ * would close Settings, fire the request, and produce no session at all: the
+ * dock never creates a PTY, so the click reads as the app swallowing it. Same
+ * rule EditorPane states for every terminal affordance — a control that cannot
+ * launch must not render. The copy-command path stays on every platform.
+ */
+function canRunInTerminal(): boolean {
+ const bridge = window.okDesktop;
+ return bridge?.terminal != null && bridge.config?.ptyAvailable === true;
+}
+
+function StatusRow({ availability }: { availability: Availability }) {
+ const { t } = useLingui();
+
+ if (availability.kind === 'checking') {
+ return (
+ <p className="text-sm text-muted-foreground" data-testid="slides-status-checking">
+ <Trans>Checking for Slidev</Trans>
+ </p>
+ );
+ }
+
+ if (availability.kind === 'check-failed') {
+ return (
+ <p className="text-sm text-muted-foreground" data-testid="slides-status-check-failed">
+ <Trans>
+ We couldn't check whether Slidev is installed. Return to this window to retry.
+ </Trans>
+ </p>
+ );
+ }
+
+ if (availability.kind === 'unsupported') {
+ return (
+ <p className="text-sm text-muted-foreground" data-testid="slides-status-unsupported">
+ <Trans>Slidev decks open in the OpenKnowledge desktop app only.</Trans>
+ </p>
+ );
+ }
+
+ if (availability.kind === 'available') {
+ return (
+ <p className="text-sm text-muted-foreground" data-testid="slides-status-available">
+ {availability.source === 'project-local' ? (
+ <Trans>Slidev found in this project. Decks will use the project's version.</Trans>
+ ) : (
+ <Trans>Slidev found on your system.</Trans>
+ )}
+ </p>
+ );
+ }
+
+ return (
+ <div className="space-y-3" data-testid="slides-status-missing">
+ {/* Amber + a dark-mode pair, matching the AI-tools rows — the settings
+ panes carry status in the text colour, not in an icon. */}
+ <p className="text-sm text-amber-600 dark:text-amber-400">
+ <Trans>
+ Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this
+ window.
+ </Trans>
+ </p>
+ <InputGroup>
+ <InputGroupInput
+ readOnly
+ value={INSTALL_COMMAND}
+ aria-label={t`Slidev install command`}
+ className="font-mono text-xs"
+ data-testid="slides-install-command"
+ onFocus={(e) => e.currentTarget.select()}
+ />
+ <InputGroupAddon align="inline-end">
+ <CopyButton copyContent={INSTALL_COMMAND} />
+ </InputGroupAddon>
+ </InputGroup>
+ <div className="flex items-center gap-3">
+ {canRunInTerminal() ? (
+ <Button
+ type="button"
+ size="sm"
+ variant="outline"
+ data-testid="slides-run-install"
+ onClick={() => {
+ // Close Settings first: the dialog is hash-routed and its close is a
+ // single `history.back()`, so leaving it open would put the terminal
+ // behind a modal the user then has to dismiss to watch the install.
+ if (typeof window !== 'undefined' && isSettingsHashOpen(window.location.hash)) {
+ window.history.back();
+ }
+ requestTerminalCommand('install-slidev');
+ }}
+ >
+ <TerminalIcon aria-hidden className="size-3.5" />
+ <Trans>Run in terminal</Trans>
+ </Button>
+ ) : null}
+ <a
+ href={SLIDEV_INSTALL_DOCS}
+ target="_blank"
+ rel="noopener noreferrer"
+ onClick={(e) => dispatchExternalLinkClick(e, SLIDEV_INSTALL_DOCS)}
+ onAuxClick={(e) => dispatchExternalLinkClick(e, SLIDEV_INSTALL_DOCS)}
+ // Names its destination for anyone listing links out of context, where
+ // a bare "Other ways to install" says less.
+ aria-label={t`Other ways to install Slidev`}
+ className="inline-flex items-center gap-0.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
+ data-testid="slides-install-docs-link"
+ >
+ <Trans>Other ways to install</Trans>
+ <ArrowUpRight aria-hidden className="size-3" />
+ </a>
+ </div>
+ </div>
+ );
+}
+
+export function SlidesPluginSection() {
+ const availability = useSlidevStatus();
+
+ return (
+ <section
+ aria-labelledby="settings-plugin-slides-title"
+ className="space-y-4"
+ data-testid="settings-plugin-slides"
+ >
+ <PluginSectionHeader
+ titleId="settings-plugin-slides-title"
+ // A product name, not a translatable label — passed raw the way the
+ // markdownlint panel passes its own.
+ title="Slidev"
+ scope="user"
+ beta
+ docUrl={SLIDEV_DOCS}
+ >
+ <Trans>
+ Present a document as a slide deck in its own window. Add{' '}
+ <code className="rounded bg-muted px-1 py-0.5 font-mono text-xs">slides: true</code> to a
+ document's frontmatter, then open it with the Slidev action. Rendering is handled by the
+ Slidev CLI, which OpenKnowledge does not bundle.
+ </Trans>
+ </PluginSectionHeader>
+ {/* The status resolves asynchronously (mount probe + focus re-probe), so a
+ polite live region announces the flip from "Checking" to found /
+ missing / check-failed, matching the sibling settings sections. */}
+ <div aria-live="polite">
+ <StatusRow availability={availability} />
+ </div>
+ </section>
+ );
+}
diff --git a/packages/app/src/components/slides-host-gate.test.ts b/packages/app/src/components/slides-host-gate.test.ts
new file mode 100644
index 000000000..ca5aec1ed
--- /dev/null
+++ b/packages/app/src/components/slides-host-gate.test.ts
@@ -0,0 +1,23 @@
+import { describe, expect, test } from 'vitest';
+import { isSlidesHost } from './slides-host-gate';
+
+describe('isSlidesHost', () => {
+ test('a desktop bridge exposing the slides namespace is a slides host', () => {
+ expect(isSlidesHost({ okDesktop: { slides: {} } })).toBe(true);
+ });
+
+ test('an older desktop build without the slides namespace is not a slides host', () => {
+ // A preload predating the slides handler still has a bridge, but no `slides`;
+ // it must read false so the affordance stays absent rather than surfacing a
+ // button whose IPC call would reject.
+ expect(isSlidesHost({ okDesktop: {} })).toBe(false);
+ });
+
+ test('a web host with no bridge is not a slides host', () => {
+ expect(isSlidesHost({})).toBe(false);
+ });
+
+ test('an absent window (SSR) is not a slides host', () => {
+ expect(isSlidesHost(undefined)).toBe(false);
+ });
+});
diff --git a/packages/app/src/components/slides-host-gate.ts b/packages/app/src/components/slides-host-gate.ts
new file mode 100644
index 000000000..fb88467c2
--- /dev/null
+++ b/packages/app/src/components/slides-host-gate.ts
@@ -0,0 +1,22 @@
+// Side-effect import only — loads the `Window.okDesktop?` global augmentation.
+import '@/lib/desktop-bridge-types';
+
+/**
+ * True only where the desktop bridge exposes the `slides` namespace.
+ *
+ * Gating on the namespace rather than merely `okDesktop != null` matters: an
+ * older desktop build whose preload predates the slides handler still has a
+ * bridge, but no `slides`. Reading such a build as "not a slides host" keeps the
+ * affordance absent instead of surfacing a button whose IPC call would reject.
+ * Web / CLI hosts have no bridge at all and read false the same way.
+ *
+ * `windowLike` is injected so the predicate is unit-testable without a real
+ * `window`; the default resolves the ambient global (undefined on SSR).
+ */
+export function isSlidesHost(
+ windowLike: { okDesktop?: { slides?: unknown } } | undefined = typeof window === 'undefined'
+ ? undefined
+ : window,
+): boolean {
+ return windowLike?.okDesktop?.slides != null;
+}
diff --git a/packages/app/src/lib/slides-telemetry.test.ts b/packages/app/src/lib/slides-telemetry.test.ts
new file mode 100644
index 000000000..1c5943702
--- /dev/null
+++ b/packages/app/src/lib/slides-telemetry.test.ts
@@ -0,0 +1,55 @@
+/**
+ * Renderer slides telemetry — assert the emitter starts a span with the
+ * canonical `ok.slides.opened` name, and that an OTel SDK fault (a `getTracer` /
+ * `startSpan` throw from the third-party boundary) is contained: it must never
+ * escape the user-action handler that calls the emitter and surface as a UI
+ * crash.
+ *
+ * The OTel boundary is faked with `spyOn(trace, 'getTracer')` rather than
+ * `vi.doMock('@opentelemetry/api')`: a module mock persists in the shared
+ * unit-test module registry and would clobber the real provider that
+ * `lib/perf/otel-spans.test.ts` registers. The spy is installed per-test and
+ * restored in `afterEach`, so nothing bleeds into another file's tracer. Mirrors
+ * `lib/terminal-telemetry.test.ts`.
+ */
+
+import { type Tracer, trace } from '@opentelemetry/api';
+import { afterEach, beforeEach, describe, expect, type Mock, test, vi } from 'vitest';
+import { recordSlidesOpened } from './slides-telemetry';
+
+const spanNames: string[] = [];
+let startSpanThrows = false;
+let getTracerSpy: Mock<typeof trace.getTracer>;
+
+beforeEach(() => {
+ spanNames.length = 0;
+ startSpanThrows = false;
+ getTracerSpy = vi.spyOn(trace, 'getTracer').mockImplementation(
+ () =>
+ ({
+ startSpan: (name: string) => {
+ if (startSpanThrows) throw new Error('otel provider fault');
+ spanNames.push(name);
+ return { end: () => undefined };
+ },
+ }) as unknown as Tracer,
+ );
+});
+
+afterEach(() => {
+ getTracerSpy.mockRestore();
+});
+
+describe('renderer slides telemetry — span name', () => {
+ test('recordSlidesOpened starts ok.slides.opened', () => {
+ recordSlidesOpened();
+ expect(spanNames).toEqual(['ok.slides.opened']);
+ });
+});
+
+describe('renderer slides telemetry — SDK fault isolation', () => {
+ test('a startSpan throw does not escape recordSlidesOpened', () => {
+ startSpanThrows = true;
+ expect(() => recordSlidesOpened()).not.toThrow();
+ });
+});
diff --git a/packages/app/src/lib/slides-telemetry.ts b/packages/app/src/lib/slides-telemetry.ts
new file mode 100644
index 000000000..663dd1a4d
--- /dev/null
+++ b/packages/app/src/lib/slides-telemetry.ts
@@ -0,0 +1,36 @@
+/**
+ * Slides (Slidev) adoption telemetry — the renderer-side half.
+ *
+ * Emits one marker span when the user opens a document as slides — the adoption
+ * and retention signal for whether the surface earns its keep. Shares the
+ * `ok.slides.*` namespace with the main-side deck-open lifecycle span
+ * (`packages/desktop/src/main/slides-telemetry.ts`) so both read as one family
+ * across the two tracers.
+ *
+ * `@opentelemetry/api` returns a no-op tracer when no SDK is registered, so this
+ * is zero-cost unless `VITE_OTEL_ENABLED='true'`. The marker carries no
+ * attributes — no document name, no path, no content.
+ */
+import { trace } from '@opentelemetry/api';
+
+const TRACER_NAME = 'open-knowledge-app';
+
+/**
+ * Emit a single zero-duration marker span, containing any opt-in OTel SDK fault
+ * (a `startSpan`/`end` throw from a misconfigured provider or a flush-while-
+ * shutdown race — `@opentelemetry/api` is a third-party boundary that can
+ * genuinely throw) so it can never escape the user-action handler and surface as
+ * a UI crash. Mirrors the fault-isolation wrap in `lib/terminal-telemetry.ts`.
+ */
+function emitMarker(name: string): void {
+ try {
+ trace.getTracer(TRACER_NAME).startSpan(name).end();
+ } catch (err) {
+ console.warn('[slides-telemetry] span emit failed:', err instanceof Error ? err : String(err));
+ }
+}
+
+/** User opened a document as slides — Slides adoption. */
+export function recordSlidesOpened(): void {
+ emitMarker('ok.slides.opened');
+}
diff --git a/packages/app/src/lib/use-boolean-frontmatter-field.dom.test.tsx b/packages/app/src/lib/use-boolean-frontmatter-field.dom.test.tsx
new file mode 100644
index 000000000..41b7b13b6
--- /dev/null
+++ b/packages/app/src/lib/use-boolean-frontmatter-field.dom.test.tsx
@@ -0,0 +1,136 @@
+/**
+ * DOM tests for `useBooleanFrontmatterField` — the boolean sibling of
+ * `useFrontmatterField`. Covers strict-boolean identity, live updates as
+ * frontmatter changes, and binding teardown on unmount.
+ *
+ * The fake provider wraps a real `Y.Doc` so every case runs through the real
+ * `bindFrontmatterDoc` YAML parse: the string "true" and the number 1 are
+ * produced by the real parser, not hand-forced JS values.
+ */
+
+import type { HocuspocusProvider } from '@hocuspocus/provider';
+import { bindFrontmatterDoc } from '@inkeep/open-knowledge-core';
+import { act, cleanup, renderHook } from '@testing-library/react';
+import { afterEach, describe, expect, test } from 'vitest';
+import * as Y from 'yjs';
+import { useBooleanFrontmatterField } from './use-boolean-frontmatter-field';
+
+interface FakeProvider {
+ document: Y.Doc;
+ on(event: 'synced', listener: () => void): void;
+ off(event: 'synced', listener: () => void): void;
+ /** How many 'synced' listeners are currently attached — used to prove the
+ * binding detaches on unmount. */
+ syncedListenerCount(): number;
+}
+
+function makeProvider(initial = ''): FakeProvider {
+ const document = new Y.Doc();
+ if (initial) document.getText('source').insert(0, initial);
+ const handlers = new Set<() => void>();
+ return {
+ document,
+ on(event, listener) {
+ if (event === 'synced') handlers.add(listener);
+ },
+ off(event, listener) {
+ if (event === 'synced') handlers.delete(listener);
+ },
+ syncedListenerCount() {
+ return handlers.size;
+ },
+ };
+}
+
+function renderFlag(provider: FakeProvider, key = 'slides') {
+ return renderHook(() =>
+ useBooleanFrontmatterField(provider as unknown as HocuspocusProvider, key),
+ );
+}
+
+/** Mutate the shared frontmatter region the way a property-panel edit would —
+ * a second binding on the same doc, so the hook's own observer fires. */
+function patchSlides(provider: FakeProvider, value: boolean | string | null): void {
+ const writer = bindFrontmatterDoc(provider);
+ writer.patch({ slides: value });
+ writer.dispose();
+}
+
+afterEach(() => {
+ cleanup();
+});
+
+describe('useBooleanFrontmatterField — strict boolean identity', () => {
+ test('the YAML boolean true reports true', () => {
+ const { result } = renderFlag(makeProvider('---\nslides: true\n---\nbody\n'));
+ expect(result.current).toBe(true);
+ });
+
+ test('the string "true" reports false', () => {
+ const { result } = renderFlag(makeProvider('---\nslides: "true"\n---\nbody\n'));
+ expect(result.current).toBe(false);
+ });
+
+ test('the number 1 reports false', () => {
+ const { result } = renderFlag(makeProvider('---\nslides: 1\n---\nbody\n'));
+ expect(result.current).toBe(false);
+ });
+
+ test('an absent key reports false', () => {
+ const { result } = renderFlag(makeProvider('---\ntitle: Notes\n---\nbody\n'));
+ expect(result.current).toBe(false);
+ });
+
+ test('a document with no frontmatter reports false', () => {
+ const { result } = renderFlag(makeProvider('just body text\n'));
+ expect(result.current).toBe(false);
+ });
+});
+
+describe('useBooleanFrontmatterField — live updates', () => {
+ test('adding slides: true flips the flag without remount', () => {
+ const provider = makeProvider('---\ntitle: Notes\n---\nbody\n');
+ const { result } = renderFlag(provider);
+ expect(result.current).toBe(false);
+
+ act(() => patchSlides(provider, true));
+
+ expect(result.current).toBe(true);
+ });
+
+ test('removing the slides key clears the flag without remount', () => {
+ const provider = makeProvider('---\nslides: true\n---\nbody\n');
+ const { result } = renderFlag(provider);
+ expect(result.current).toBe(true);
+
+ act(() => patchSlides(provider, null));
+
+ expect(result.current).toBe(false);
+ });
+});
+
+describe('useBooleanFrontmatterField — teardown', () => {
+ test('unmount disposes the binding so no observer remains', () => {
+ const provider = makeProvider('---\nslides: true\n---\nbody\n');
+ const { result, unmount } = renderFlag(provider);
+ expect(result.current).toBe(true);
+ // While mounted the binding holds one 'synced' listener on the provider (it
+ // also holds one Y.Text observer; dispose() removes both together, so the
+ // provider count returning to zero proves the whole binding was torn down).
+ expect(provider.syncedListenerCount()).toBe(1);
+
+ unmount();
+
+ expect(provider.syncedListenerCount()).toBe(0);
+ });
+
+ test('a frontmatter edit after unmount does not resurface a stale value', () => {
+ const provider = makeProvider('---\nslides: true\n---\nbody\n');
+ const { result, unmount } = renderFlag(provider);
+ unmount();
+
+ act(() => patchSlides(provider, false));
+
+ expect(result.current).toBe(true);
+ });
+});
diff --git a/packages/app/src/lib/use-boolean-frontmatter-field.ts b/packages/app/src/lib/use-boolean-frontmatter-field.ts
new file mode 100644
index 000000000..696730ce0
--- /dev/null
+++ b/packages/app/src/lib/use-boolean-frontmatter-field.ts
@@ -0,0 +1,47 @@
+/**
+ * Live-read a boolean frontmatter flag off `Y.Text('source')`, re-reading as
+ * the user edits frontmatter. Boolean sibling of `useFrontmatterField`
+ * (string-only — it reads '' for a boolean).
+ *
+ * Strict identity: only the YAML boolean `true` yields `true`. The string
+ * "true" and the number `1` yield `false`, so a coincidentally-truthy value
+ * can't trip a gate this drives.
+ *
+ * The subscription lives in a `useEffect` so React tears it down on unmount and
+ * when an enclosing `<Activity>` flips to hidden — a Y.js observer attached off
+ * the effect lifecycle (a ref, a module singleton) would keep processing remote
+ * updates for every hidden document (precedent #18(c)). The `useState`
+ * initializer's one-shot binding is created, read, and disposed in the same
+ * breath, so it leaves nothing attached.
+ */
+
+import type { HocuspocusProvider } from '@hocuspocus/provider';
+import { bindFrontmatterDoc, type FrontmatterMap } from '@inkeep/open-knowledge-core';
+import { useEffect, useState } from 'react';
+
+function isFlagEnabled(map: FrontmatterMap, key: string): boolean {
+ return map[key] === true;
+}
+
+export function useBooleanFrontmatterField(provider: HocuspocusProvider, key: string): boolean {
+ const [enabled, setEnabled] = useState<boolean>(() => {
+ const binding = bindFrontmatterDoc(provider);
+ const initial = isFlagEnabled(binding.current().map, key);
+ binding.dispose();
+ return initial;
+ });
+
+ useEffect(() => {
+ const binding = bindFrontmatterDoc(provider);
+ setEnabled(isFlagEnabled(binding.current().map, key));
+ const unsub = binding.subscribe((snapshot) => {
+ setEnabled(isFlagEnabled(snapshot.map, key));
+ });
+ return () => {
+ unsub();
+ binding.dispose();
+ };
+ }, [provider, key]);
+
+ return enabled;
+}
diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.json
index 1eaf6f140..7902588d9 100644
--- a/packages/app/src/locales/ar/messages.json
+++ b/packages/app/src/locales/ar/messages.json
@@ -151,6 +151,7 @@
"1J0c0X": ["ما زال الوصول إلى ", ["displayName"], " متعذّرًا. هل تريد محاولة أخيرة؟"],
"1LtA5r": ["يربط المهارة رمزيًا بـ ", ["path"]],
"1MGRQl": ["جلسات الطرفية"],
+ "1NgrlY": ["طرق أخرى للتثبيت"],
"1OKzC_": ["تعذّر إرسال تقريرك. أعد المحاولة أو أرسله بالبريد بدلًا من ذلك."],
"1QfxQT": ["تجاهل"],
"1RluQD": ["إظهار الاستبدال"],
@@ -348,6 +349,7 @@
"45MZFs": ["الأوامر"],
"484LKL": ["إزالة الرابط"],
"494br3": ["مشترك مع كل من في هذا المشروع — مُودَع في config.yml عبر git."],
+ "49Mb7P": ["تعذّر التحقق مما إذا كان Slidev مثبّتًا. عُد إلى هذه النافذة لإعادة المحاولة."],
"4A3Yzu": ["كتلة كود"],
"4BITzH": ["خطأ:"],
"4CfgPM": ["أُنشئ مجلد المشروع، لكن فشل git init. أعد المحاولة."],
@@ -1224,6 +1226,7 @@
],
"GK-IRZ": ["أزرار التراجع معطّلة — جُمعت حالة الجلسة من الذاكرة."],
"GLxIKR": ["كيفية الدفع يدويًا"],
+ "GMaDTM": ["تعذّر حفظ إعداد Slidev"],
"GN6L5F": ["اسم الملف"],
"GNkUvW": ["في الطابور — سيُرسل عند انتهاء هذا التشغيل"],
"GQDSBN": ["خيارات التخطيط"],
@@ -1299,6 +1302,7 @@
"HKH-W-": ["البيانات"],
"HM56Bx": ["يجري الإنشاء..."],
"HPTPGr": ["أنشئ ملف مواصفات جديدًا لقصة المستخدم الخاصة بي"],
+ "HPaAxt": ["Slidev غير مثبّت، لذلك يبقى إجراء Slidev مخفيًا. ثبّته ثم عُد إلى هذه النافذة."],
"HSh8u_": ["المجلدات"],
"HTW0Zw": ["خطوة أخيرة: شغّل <0>claude</0> في هذا المشروع ووافق على OpenKnowledge مرة واحدة."],
"HbcQYf": [
@@ -1502,6 +1506,9 @@
"L1BQTH": [["0"], " غير مثبَّت بعد — يجري فتح صفحة تنزيله."],
"L1ZE3M": ["إحصاءات المستند"],
"L3CEC1": ["هذا العنصر"],
+ "L3w0_C": [
+ "اعرض مستندًا كشرائح تقديمية في نافذة خاصة به. أضف <0>slides: true</0> إلى frontmatter المستند، ثم افتحه عبر إجراء Slidev. يتولّى العرضَ واجهةُ Slidev لسطر الأوامر، وهي غير مضمّنة في OpenKnowledge."
+ ],
"L4Cdd9": ["أو أنشئ ملفًا جديدًا <0/>"],
"L6Hhh6": ["(الجذر)"],
"L6Ud-t": ["تعذّر تحميل التعارضات. أعد التحميل للمحاولة مرة أخرى."],
@@ -1572,6 +1579,7 @@
" في المستودع البعيد. راجع الرسالة أدناه."
],
"Llyqvo": ["يعني هذا عادةً أحد الأمور التالية:"],
+ "Lm3r51": ["تعذّر على Slidev عرض هذا المستند."],
"LnVIW4": ["فشل بدء تسجيل الدخول — أعد المحاولة"],
"LpB85N": ["عادي"],
"LtI9AS": ["المالك"],
@@ -1733,6 +1741,8 @@
"Nay2Yr": ["لا يوجد وكلاء يطابقون بحثك."],
"NcurBF": ["تحريك لأسفل"],
"NeQ_0G": ["اعمل على هذه التعليقات"],
+ "NeY1Np": ["انتهت مهلة بدء تشغيل Slidev. حاول مرة أخرى."],
+ "NfraGd": ["طرق أخرى لتثبيت Slidev"],
"NgZwB0": [["enabledCount"], "/", ["0"], " مفعَّل"],
"NjrIak": ["الملف: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["تحرير ", ["tag"]],
@@ -1816,6 +1826,9 @@
"OxplNM": ["حُدِّث «", ["0"], "»: أُضيف ", ["1"], "، وأُزيل ", ["2"]],
"Oxyd5f": ["اختر اسمًا"],
"OyIC0Q": ["اسم المشروع"],
+ "Ozyht_": [
+ "اعرض مستندًا كشرائح تقديمية في نافذة خاصة به. يعمل في تطبيق OpenKnowledge لسطح المكتب فقط، ويتطلّب واجهة Slidev لسطر الأوامر التي تُثبَّت بشكل منفصل. عند التمكين يظهر ضمن Plugins في الشريط الجانبي."
+ ],
"P-ye9o": ["تعذّر فتح منتقي المجلدات"],
"P0HC30": ["انتقل هذا ", ["targetNoun"], " إلى <0>", ["0"], "</0>. هل تفتحه هناك؟"],
"P3NS4G": ["خطأ في صيغة النمط (السطر ", ["lineNumber"], "): ", ["message"]],
@@ -1824,6 +1837,7 @@
"P47EWZ": ["تعذّر تحديث إعدادات الشريط الجانبي"],
"P6gXB-": ["استبدال ", ["keyName"]],
"P6lAT3": ["الوجهة المجلدية: ", ["linkTitle"], ". انقر لفتح النظرة العامة."],
+ "P8AnMN": ["جارٍ البحث عن Slidev"],
"PB4upl": ["البحث عن التطابق السابق"],
"PBwmDJ": ["يجري البحث حسب المعنى"],
"PBxg_E": ["ليس الآن"],
@@ -2075,6 +2089,7 @@
"T0OVm7": ["الفرع الافتراضي محمي — يتطلب الدفع طلب سحب."],
"T3Mld1": ["نافذة"],
"T3j-7o": ["مثال: تبديل المشاريع أثناء تشغيل مزامنة"],
+ "TBfy1C": ["تعذّر تشغيل Slidev."],
"TDeOpa": ["تراجع عن تعديلاتك أنت أو أعدها، مع إبقاء تعديلات المتعاونين والوكلاء كما هي."],
"TEEPPF": ["سيستبدل مدخل OpenKnowledge الحالي"],
"TJnkyf": ["استجاب ok ui لكن server.lock لا يحمل منفذًا بعد"],
@@ -2097,6 +2112,7 @@
],
"TTDXD8": ["شجرة عمل جديدة…"],
"TUzThQ": ["مشاركة المهارات"],
+ "T_j5G0": ["هذا ليس إصدارًا مدعومًا من Slidev."],
"T_wG4n": ["تعذّر التحقق من اتصالك بـ GitHub."],
"Ta25TG": ["لا يوجد سجل بعد"],
"TbjyhA": ["المستندات"],
@@ -2190,6 +2206,7 @@
"Ugvy4O": ["توسيع كل مجموعات الملفات"],
"UhpfxY": ["تحريك لليسار"],
"UkQGhd": ["إخفاء الاستبدال"],
+ "UlVARL": ["تمكين Slidev"],
"Uobeu9": ["يضيف المهارة إلى ", ["rootRel"], " — يقرأها ", ["0"], " أيضًا"],
"Uoux8m": ["ضمّن هذا التعليق في الإرسال التالي"],
"Up2_7p": ["نسخ المسار الكامل"],
@@ -2358,6 +2375,7 @@
"X0ttSN": ["لا توجد وسوم تطابق «", ["tagListQuery"], "»."],
"X2zUS5": ["حذف هذا التعليق"],
"X3MMeA": ["لا يوجد لأي من هذه المشكلات إصلاح تلقائي."],
+ "X59Fx2": ["تعذّر فتح هذا المستند في Slidev."],
"X7ShnN": ["فتح لوحة الوكلاء"],
"X7u0xR": [["0"], " قالب متاح"],
"X8kjQX": ["أعد المصادقة مع GitHub"],
@@ -2987,6 +3005,7 @@
}
]
],
+ "el2KyL": ["تم العثور على Slidev في هذا المشروع. ستستخدم الشرائح إصدار المشروع."],
"emgiet": ["محتوى مرجعي؛ يُعكس حرفيًا في كل مكان يُشار إليه فيه."],
"enPTnx": ["السطر ", ["displayLine"]],
"eoEUI3": ["تعذّر حل ذلك التعليق."],
@@ -2996,6 +3015,7 @@
"evHlIg": ["لا تدفع المتابعة تغييراتك المحلية ولا تودعها أبدًا. تبقى على هذا الجهاز وحده."],
"evs0iw": ["وسوم تطابق «", ["tagListQuery"], "»"],
"ezUmoU": ["قيم العناصر المسموح بها (فارغ = أي قيمة)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["نقل الكتلة"],
"f3Nvg7": ["لا يستطيع ", ["0"], " متابعة هذه المحادثة — النص محفوظ، لكن جلسة الوكيل انتهت."],
"f65AOQ": ["البدء من"],
@@ -3170,6 +3190,7 @@
"hQjvzi": ["أرشيف بصيغة .zip أو .skill."],
"hSBIG-": ["عنوان، وصف، وسوم — أي شيء يصف هذا المجلد."],
"hSySVc": ["فشل تسليم التثبيت: ", ["msg"]],
+ "hVAkI8": ["تشغيل في الطرفية"],
"hXUWyd": ["القيمة مطلوبة"],
"hXbSxc": ["الأصل: ", ["title"]],
"hY8pka": ["تحديد التكرار التالي"],
@@ -3200,6 +3221,7 @@
"hxnF0I": ["خصائص ", ["0"]],
"hyCxJY": ["افتح شجرة العمل تلك بدلًا من ذلك"],
"hynz2K": ["بدأ التنزيل"],
+ "hz076O": ["أمر تثبيت Slidev"],
"i-ShMB": ["مخطط"],
"i-wHEp": ["يجري تحرير ", ["boldName"], " في مكانه. تُحفظ التغييرات مباشرةً في نسخة محررك."],
"i09An-": ["تمت استعادة نسخة سابقة (", ["0"], ")"],
@@ -3474,6 +3496,7 @@
"مسار داخل المهارة — أي مجلد يصلح (مثل references/notes.md). تُنشأ المجلدات الواردة في المسار نيابةً عنك."
],
"lPzyrU": ["تم حل كل المقاطع"],
+ "lScd1O": ["تُفتح شرائح Slidev في تطبيق OpenKnowledge لسطح المكتب فقط."],
"lUtr1r": ["تم تحديد ", ["0"], " من ", ["1"]],
"lVWEIL": ["تمت فهرسة ", ["embedded"], " من ", ["total"], " صفحة."],
"lWNpNB": ["أضف مؤشرات أو حدد التكرارات المطابقة عبر CodeMirror."],
@@ -4289,6 +4312,7 @@
"w4hMYl": [
"تعذّرت قراءة حالة الفرع لهذا المشروع. أغلق هذا الحوار وافتح رابط المشاركة مرة أخرى."
],
+ "w52SKa": ["فتح في Slidev"],
"w61W3L": ["إزالة ", ["0"]],
"w6sBjd": ["لم تُحمَّل إعدادات الطرفية بعد — أعد المحاولة بعد قليل"],
"w6sT-y": ["تابع تعديلات الوكيل"],
@@ -4310,6 +4334,7 @@
"wJo9oS": ["إغلاق البحث"],
"wQp1V3": ["مرآة لـ <0>", ["src"], "</0>"],
"wQvvZY": ["ملف مهارة جديد"],
+ "wRni1Z": ["تعطيل Slidev"],
"wT4iQr": ["افتح بحث المحرر المرئي مع توسيع عناصر الاستبدال."],
"wTcjov": ["لا مساحة عمل"],
"wU8WyK": ["حقول العنصر"],
@@ -4400,6 +4425,7 @@
"xrVr_k": ["تعذّر إنشاء المهارة: ", ["0"]],
"xsZhu-": ["رقم الصفحة"],
"xtJgSe": ["يحزم هذا المصدر عدة مهارات — اختر ما تريد استيراده."],
+ "xxRpzT": ["تم العثور على Slidev على نظامك."],
"xzAmL_": ["موافق عليه تلقائيًا"],
"xzktOa": ["تحرير رابط الويكي"],
"y1eoq1": ["نسخ الرابط"],
diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.po
index 749077410..323e82e8b 100644
--- a/packages/app/src/locales/ar/messages.po
+++ b/packages/app/src/locales/ar/messages.po
@@ -2066,6 +2066,10 @@ msgstr "يجري التحقق"
msgid "Checking for agents"
msgstr "يجري البحث عن الوكلاء"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "جارٍ البحث عن Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "يجري التحقق من التحديثات"
@@ -3234,6 +3238,10 @@ msgstr "تعذّر فتح الطرفية — لا تزال التعليقات ف
msgid "Couldn't open the worktree. Try again."
msgstr "تعذّر فتح شجرة العمل. أعد المحاولة."
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "تعذّر فتح هذا المستند في Slidev."
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "تعذّر تجهيز هذا المشروع للنشر."
@@ -3412,6 +3420,10 @@ msgstr "تعذّرت مشاركة المهارات: خطأ داخلي. يرجى
msgid "Couldn't start {0}: {1}"
msgstr "تعذّر تشغيل {0}: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "تعذّر تشغيل Slidev."
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "تعذّر بدء سلسلة الوكيل — يرجى المحاولة مرة أخرى."
@@ -3968,6 +3980,10 @@ msgstr "تعطيل معاينات الروابط الخارجية"
msgid "Disable semantic search"
msgstr "تعطيل البحث الدلالي"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "تعطيل Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "تعطيل التدقيق الإملائي"
@@ -4468,6 +4484,10 @@ msgstr "تفعيل الإضافات"
msgid "Enable semantic search"
msgstr "تفعيل البحث الدلالي"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "تمكين Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "تفعيل التدقيق الإملائي"
@@ -4901,6 +4921,10 @@ msgstr "فشلت إعادة الترتيب"
msgid "Failed to save content rules — {0}"
msgstr "فشل حفظ قواعد المحتوى — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "تعذّر حفظ إعداد Slidev"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "فشل حفظ حقل المخطط"
@@ -6292,11 +6316,11 @@ msgstr "التخطيط"
msgid "Layout options"
msgstr "خيارات التخطيط"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "اعرف المزيد"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "اعرف المزيد عن {title}"
@@ -7854,6 +7878,10 @@ msgstr "فتح في التطبيق الافتراضي"
msgid "Open in file manager"
msgstr "فتح في مدير الملفات"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "فتح في Slidev"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "الفتح في شجرة عمل"
@@ -8119,6 +8147,14 @@ msgstr "أخرى"
msgid "Other OK paths are tracked upstream:"
msgstr "تُتتبَّع مسارات OK الأخرى في المستودع البعيد:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "طرق أخرى للتثبيت"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "طرق أخرى لتثبيت Slidev"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "صادر"
@@ -8459,6 +8495,14 @@ msgstr "يجري تحضير رابط المشاركة..."
msgid "Preparing to uninstall OpenKnowledge"
msgstr "يجري التحضير لإلغاء تثبيت OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "اعرض مستندًا كشرائح تقديمية في نافذة خاصة به. أضف <0>slides: true</0> إلى frontmatter المستند، ثم افتحه عبر إجراء Slidev. يتولّى العرضَ واجهةُ Slidev لسطر الأوامر، وهي غير مضمّنة في OpenKnowledge."
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "اعرض مستندًا كشرائح تقديمية في نافذة خاصة به. يعمل في تطبيق OpenKnowledge لسطح المكتب فقط، ويتطلّب واجهة Slidev لسطر الأوامر التي تُثبَّت بشكل منفصل. عند التمكين يظهر ضمن Plugins في الشريط الجانبي."
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "اضغط مفتاح المسافة لالتقاط علامة تبويب. استخدم مفاتيح الأسهم لتحريكها داخل شريط علامات التبويب، ثم اضغط المسافة أو Enter لإفلاتها. اضغط Shift+F10 أو مفتاح القائمة لفتح قائمة سياق علامة التبويب، وفيها إجراءات التقسيم والإغلاق والتثبيت وغيرها."
@@ -9494,6 +9538,10 @@ msgstr "شغّل مراجعة مشروع من لوحة المشكلات."
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "شغّل طرفية حقيقية مرسّاة داخل OpenKnowledge، تبدأ في مجلد هذا المشروع."
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "تشغيل في الطرفية"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "شغّل هذا في طرفيتك"
@@ -10412,6 +10460,39 @@ msgstr "قائمة أوامر الشرطة المائلة"
msgid "Slash commands"
msgstr "أوامر الشرطة المائلة"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "تعذّر على Slidev عرض هذا المستند."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "تُفتح شرائح Slidev في تطبيق OpenKnowledge لسطح المكتب فقط."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "تم العثور على Slidev في هذا المشروع. ستستخدم الشرائح إصدار المشروع."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "تم العثور على Slidev على نظامك."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "أمر تثبيت Slidev"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev غير مثبّت، لذلك يبقى إجراء Slidev مخفيًا. ثبّته ثم عُد إلى هذه النافذة."
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "انتهت مهلة بدء تشغيل Slidev. حاول مرة أخرى."
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "عنوان قسم صغير."
@@ -11516,6 +11597,10 @@ msgstr "هذه معاينة لـ {boldName}، اكتُشفت في {boldHarness}
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "هذه معاينة لـ {boldName}. ثبّتها في وكلائك."
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "هذا ليس إصدارًا مدعومًا من Slidev."
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "هذا العنصر"
@@ -12371,6 +12456,10 @@ msgstr "في انتظار موافقتك"
msgid "Warning"
msgstr "تحذير"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "تعذّر التحقق مما إذا كان Slidev مثبّتًا. عُد إلى هذه النافذة لإعادة المحاولة."
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "تعذّر التحقق من اتصالك بـ GitHub."
diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.json
index 0eae11dfd..3bced155d 100644
--- a/packages/app/src/locales/bn/messages.json
+++ b/packages/app/src/locales/bn/messages.json
@@ -126,6 +126,7 @@
"1J0c0X": [["displayName"], "-এ এখনও পৌঁছানো যায়নি। আর একবার চেষ্টা করবেন?"],
"1LtA5r": ["স্কিলটি ", ["path"], "-এ সিমলিংক করে"],
"1MGRQl": ["টার্মিনাল সেশন"],
+ "1NgrlY": ["ইনস্টল করার অন্যান্য উপায়"],
"1OKzC_": ["আপনার রিপোর্ট পাঠানো যায়নি। আবার চেষ্টা করুন নয়তো বদলে ইমেইল করুন।"],
"1QfxQT": ["সরিয়ে দিন"],
"1RluQD": ["বদলানো দেখান"],
@@ -285,6 +286,7 @@
"45MZFs": ["কমান্ড"],
"484LKL": ["লিংক সরান"],
"494br3": ["এই প্রকল্পের সবার সঙ্গে ভাগ করা — git-এর মাধ্যমে config.yml-এ কমিট করা।"],
+ "49Mb7P": ["Slidev ইনস্টল আছে কিনা তা যাচাই করা যায়নি। আবার চেষ্টা করতে এই উইন্ডোতে ফিরে আসুন।"],
"4A3Yzu": ["কোড ব্লক"],
"4BITzH": ["ত্রুটি:"],
"4CfgPM": ["প্রকল্পের ফোল্ডার তৈরি হয়েছে, কিন্তু git init ব্যর্থ হয়েছে। আবার চেষ্টা করুন।"],
@@ -1040,6 +1042,7 @@
"GJH-AT": [["docName"], " ", ["0"], "। OpenKnowledge এখন ", ["1"], " পর্যন্ত ফাইল খোলে।"],
"GK-IRZ": ["পূর্বাবস্থার বোতাম নিষ্ক্রিয় — প্রতি-সেশন অবস্থা পরিষ্কার করে ফেলা হয়েছে।"],
"GLxIKR": ["হাতে কীভাবে পাঠাবেন"],
+ "GMaDTM": ["Slidev সেটিং সংরক্ষণ করা যায়নি"],
"GN6L5F": ["ফাইলের নাম"],
"GNkUvW": ["সারিতে — এই কাজ শেষ হলে পাঠানো হবে"],
"GQDSBN": ["বিন্যাসের বিকল্প"],
@@ -1104,6 +1107,7 @@
"HKH-W-": ["তথ্য"],
"HM56Bx": ["তৈরি করা হচ্ছে…"],
"HPTPGr": ["আমার ব্যবহারকারী গল্পের জন্য একটি নতুন স্পেক ফাইল তৈরি করুন"],
+ "HPaAxt": ["Slidev ইনস্টল করা নেই, তাই Slidev অ্যাকশন লুকানো থাকে। ইনস্টল করে এই উইন্ডোতে ফিরে আসুন।"],
"HSh8u_": ["ফোল্ডার"],
"HTW0Zw": ["আরও একটি ধাপ: এই প্রকল্পে <0>claude</0> চালান এবং OpenKnowledge-কে একবার অনুমোদন দিন।"],
"HbcQYf": [["display"], "-এ থাকা সিমলিংকটি স্কিলের একটি স্বতন্ত্র অনুলিপি দিয়ে বদলাবেন? আর কিছু সরে না।"],
@@ -1279,6 +1283,9 @@
"L1BQTH": [["0"], " এখনও ইনস্টল করা নেই — এর ডাউনলোড পাতা খোলা হচ্ছে।"],
"L1ZE3M": ["নথির পরিসংখ্যান"],
"L3CEC1": ["এই আইটেমটি"],
+ "L3w0_C": [
+ "একটি নথিকে আলাদা উইন্ডোতে স্লাইড ডেক হিসেবে উপস্থাপন করুন। নথির frontmatter-এ <0>slides: true</0> যোগ করুন, তারপর Slidev অ্যাকশন দিয়ে খুলুন। রেন্ডারিং করে Slidev CLI, যা OpenKnowledge সরবরাহ করে না।"
+ ],
"L4Cdd9": ["নয়তো একটি নতুন ফাইল তৈরি করুন <0/>"],
"L6Hhh6": ["(রুট)"],
"L6Ud-t": ["দ্বন্দ্বগুলো লোড করা যায়নি। আবার চেষ্টা করতে রিলোড করুন।"],
@@ -1334,6 +1341,7 @@
" ট্র্যাক করা হচ্ছে। নিচের বার্তাটি দেখুন।"
],
"Llyqvo": ["এর সাধারণত অর্থ এগুলোর একটি:"],
+ "Lm3r51": ["Slidev এই নথিটি রেন্ডার করতে পারেনি।"],
"LnVIW4": ["সাইন-ইন শুরু করতে ব্যর্থ — আবার চেষ্টা করুন"],
"LpB85N": ["সাদামাটা"],
"LtI9AS": ["মালিক"],
@@ -1470,6 +1478,8 @@
"Nay2Yr": ["আপনার অনুসন্ধানের সঙ্গে কোনো এজেন্ট মেলে না।"],
"NcurBF": ["নিচে সরান"],
"NeQ_0G": ["এই মন্তব্যগুলো নিয়ে কাজ করুন"],
+ "NeY1Np": ["Slidev চালু হতে সময় শেষ হয়ে গেছে। আবার চেষ্টা করুন।"],
+ "NfraGd": ["Slidev ইনস্টল করার অন্যান্য উপায়"],
"NgZwB0": [["0"], "টির মধ্যে ", ["enabledCount"], "টি চালু"],
"NjrIak": ["ফাইল: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": [["tag"], " সম্পাদনা করুন"],
@@ -1555,6 +1565,9 @@
"OxplNM": ["\"", ["0"], "\" হালনাগাদ হয়েছে: ", ["1"], " যোগ হয়েছে, ", ["2"], " সরানো হয়েছে"],
"Oxyd5f": ["একটি নাম বাছুন"],
"OyIC0Q": ["প্রকল্পের নাম"],
+ "Ozyht_": [
+ "একটি নথিকে আলাদা উইন্ডোতে স্লাইড ডেক হিসেবে উপস্থাপন করুন। শুধু OpenKnowledge ডেস্কটপ অ্যাপে কাজ করে এবং Slidev CLI প্রয়োজন, যা আলাদাভাবে ইনস্টল করতে হয়। চালু থাকলে সাইডবারে Plugins-এর নিচে দেখা যায়।"
+ ],
"P-ye9o": ["ফোল্ডার নির্বাচক খোলা যায়নি"],
"P0HC30": ["এই ", ["targetNoun"], " <0>", ["0"], "</0>-এ সরে গেছে। সেখানে খুলবেন?"],
"P3NS4G": ["প্যাটার্নের বাক্যরীতি ত্রুটি (লাইন ", ["lineNumber"], "): ", ["message"]],
@@ -1563,6 +1576,7 @@
"P47EWZ": ["সাইডবারের সেটিং হালনাগাদ করা যায়নি"],
"P6gXB-": [["keyName"], " বদলান"],
"P6lAT3": ["ফোল্ডার লক্ষ্য: ", ["linkTitle"], "। সংক্ষিপ্তসার খুলতে ক্লিক করুন।"],
+ "P8AnMN": ["Slidev খোঁজা হচ্ছে"],
"PB4upl": ["আগের মিল খুঁজুন"],
"PBwmDJ": ["অর্থের ভিত্তিতে খোঁজা হচ্ছে"],
"PBxg_E": ["এখন নয়"],
@@ -1796,6 +1810,7 @@
"T0OVm7": ["ডিফল্ট ব্রাঞ্চটি সুরক্ষিত — পাঠাতে একটি পুল রিকোয়েস্ট লাগে।"],
"T3Mld1": ["জানালা"],
"T3j-7o": ["যেমন সিঙ্ক চলার সময় প্রকল্প বদলানো"],
+ "TBfy1C": ["Slidev চালু করা যায়নি।"],
"TDeOpa": [
"আপনার নিজের সম্পাদনা পূর্বাবস্থায় ফেরান বা পুনরায় করুন, সহযোগী ও এজেন্টদের সম্পাদনা যেমন আছে তেমন রেখে।"
],
@@ -1807,6 +1822,7 @@
"TQJCR6": [["0", "plural", { "one": ["#", " ফলাফল"], "other": ["#", " ফলাফল"] }]],
"TTDXD8": ["নতুন ওয়ার্কট্রি…"],
"TUzThQ": ["স্কিল ভাগ করুন"],
+ "T_j5G0": ["এটি Slidev-এর সমর্থিত সংস্করণ নয়।"],
"T_wG4n": ["আমরা আপনার GitHub সংযোগ পরীক্ষা করতে পারিনি।"],
"Ta25TG": ["এখনও কোনো ইতিহাস নেই"],
"TbjyhA": ["নথি"],
@@ -1898,6 +1914,7 @@
"Ugvy4O": ["সব ফাইল গোষ্ঠী মেলে ধরুন"],
"UhpfxY": ["বাঁয়ে সরান"],
"UkQGhd": ["বদলানো লুকান"],
+ "UlVARL": ["Slidev চালু করুন"],
"Uobeu9": ["স্কিলটি ", ["rootRel"], "-এ যোগ করে — যা ", ["0"], "-ও পড়ে"],
"Uoux8m": ["পরের বার পাঠানোর সময় এই মন্তব্যটি অন্তর্ভুক্ত করুন"],
"Up2_7p": ["পূর্ণ পথ কপি করুন"],
@@ -2029,6 +2046,7 @@
"X0ttSN": ["\"", ["tagListQuery"], "\"-এর সঙ্গে কোনো ট্যাগ মেলে না।"],
"X2zUS5": ["এই মন্তব্যটি মুছুন"],
"X3MMeA": ["এই সমস্যাগুলোর কোনোটিরই স্বয়ংক্রিয় সমাধান নেই।"],
+ "X59Fx2": ["এই নথিটি Slidev-এ খোলা যায়নি।"],
"X7ShnN": ["এজেন্ট প্যানেল খুলুন"],
"X7u0xR": [["0"], "টি টেমপ্লেট আছে"],
"X8kjQX": ["GitHub-এর সঙ্গে আবার প্রমাণীকরণ করুন"],
@@ -2553,6 +2571,7 @@
"Git এই ফোল্ডারের হিসাব রাখতে পারে না — এটি খালি বা এতে কেবল উপেক্ষিত ফাইল আছে। আপনি একটি হিসাবভুক্ত নথি যোগ না করা পর্যন্ত লিংকটি কাজ করবে না।"
],
"eiUA4k": [["count", "plural", { "one": ["#", " মন্তব্য"], "other": ["#", " মন্তব্য"] }]],
+ "el2KyL": ["এই প্রকল্পে Slidev পাওয়া গেছে। ডেকগুলি প্রকল্পের সংস্করণ ব্যবহার করবে।"],
"emgiet": ["প্রামাণিক বিষয়বস্তু; যেখানেই উল্লেখ করা হোক হুবহু প্রতিফলিত।"],
"enPTnx": ["লাইন ", ["displayLine"]],
"eoEUI3": ["ওই মন্তব্যটি মীমাংসা করা যায়নি।"],
@@ -2564,6 +2583,7 @@
"evHlIg": ["Follow কখনও আপনার স্থানীয় পরিবর্তন পাঠায় না বা কমিট করে না। সেগুলো কেবল এই মেশিনেই থাকে।"],
"evs0iw": ["\"", ["tagListQuery"], "\"-এর সঙ্গে মিলে যাওয়া ট্যাগ"],
"ezUmoU": ["অনুমোদিত উপাদান মান (খালি = যেকোনো)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["ব্লক সরান"],
"f3Nvg7": [["0"], " এই কথোপকথন চালিয়ে যেতে পারছে না — প্রতিলিপি রাখা আছে, তবে এজেন্ট সেশন আর নেই।"],
"f65AOQ": ["এখান থেকে শুরু"],
@@ -2711,6 +2731,7 @@
"hQjvzi": ["একটি .zip বা .skill আর্কাইভ।"],
"hSBIG-": ["একটি শিরোনাম, বিবরণ, ট্যাগ — এই ফোল্ডারকে বর্ণনা করে এমন যা কিছু।"],
"hSySVc": ["ইনস্টল হস্তান্তর ব্যর্থ: ", ["msg"]],
+ "hVAkI8": ["টার্মিনালে চালান"],
"hXUWyd": ["মান আবশ্যক"],
"hXbSxc": ["সম্পদ: ", ["title"]],
"hY8pka": ["পরবর্তী উপস্থিতি নির্বাচন করুন"],
@@ -2741,6 +2762,7 @@
"hxnF0I": [["0"], " প্রপার্টি"],
"hyCxJY": ["বদলে ওই ওয়ার্কট্রিটি খুলুন"],
"hynz2K": ["ডাউনলোড শুরু হয়েছে"],
+ "hz076O": ["Slidev ইনস্টল কমান্ড"],
"i-ShMB": ["চিত্র"],
"i-wHEp": [
["boldName"],
@@ -3009,6 +3031,7 @@
"স্কিলের ভেতরের একটি পথ — যেকোনো ফোল্ডার চলে (যেমন references/notes.md)। পথের ফোল্ডারগুলো আপনার জন্য তৈরি করে দেওয়া হয়।"
],
"lPzyrU": ["সব হাংক মীমাংসিত"],
+ "lScd1O": ["Slidev ডেক শুধু OpenKnowledge ডেস্কটপ অ্যাপে খোলে।"],
"lUtr1r": [["1"], "টির মধ্যে ", ["0"], "টি নির্বাচিত"],
"lVWEIL": [["total"], "টির মধ্যে ", ["embedded"], "টি পাতা সূচিভুক্ত।"],
"lWNpNB": ["CodeMirror-এর মাধ্যমে কার্সর যোগ করুন বা মিলে যাওয়া উপস্থিতিগুলো নির্বাচন করুন।"],
@@ -3666,6 +3689,7 @@
"w3vFfL": ["Files লুকান"],
"w4ZzmQ": ["এমবেডিং সরবরাহকারীর নাগাল পাওয়া যায়নি — আবার চেষ্টা করুন"],
"w4hMYl": ["এই প্রকল্পের ব্রাঞ্চের অবস্থা পড়া যায়নি। এই সংলাপ বন্ধ করে শেয়ার লিংকটি আবার খুলুন।"],
+ "w52SKa": ["Slidev-এ খুলুন"],
"w61W3L": [["0"], " সরান"],
"w6sBjd": ["টার্মিনালের সেটিং এখনও লোড হয়নি — একটু পরে আবার চেষ্টা করুন"],
"w6sT-y": ["এজেন্টের সম্পাদনা অনুসরণ করুন"],
@@ -3687,6 +3711,7 @@
"wJo9oS": ["খোঁজা বন্ধ করুন"],
"wQp1V3": ["<0>", ["src"], "</0>-এর মিরর"],
"wQvvZY": ["নতুন স্কিল ফাইল"],
+ "wRni1Z": ["Slidev বন্ধ করুন"],
"wT4iQr": ["দৃশ্য-সম্পাদকের খোঁজা বদলানোর নিয়ন্ত্রণ মেলে ধরা অবস্থায় খুলুন।"],
"wTcjov": ["কোনো ওয়ার্কস্পেস নেই"],
"wU8WyK": ["উপাদান ফিল্ড"],
@@ -3767,6 +3792,7 @@
"xrVr_k": ["স্কিল তৈরি করা যায়নি: ", ["0"]],
"xsZhu-": ["পাতার সংখ্যা"],
"xtJgSe": ["এই উৎসে কয়েকটি স্কিল আছে — আমদানি করার জন্য একটি বাছুন।"],
+ "xxRpzT": ["আপনার সিস্টেমে Slidev পাওয়া গেছে।"],
"xzAmL_": ["স্বয়ংক্রিয়ভাবে অনুমোদিত"],
"xzktOa": ["উইকি লিংক সম্পাদনা করুন"],
"y1eoq1": ["লিংক কপি করুন"],
diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.po
index 56cd92b19..1edf2374a 100644
--- a/packages/app/src/locales/bn/messages.po
+++ b/packages/app/src/locales/bn/messages.po
@@ -2062,6 +2062,10 @@ msgstr "পরীক্ষা করা হচ্ছে"
msgid "Checking for agents"
msgstr "এজেন্ট খোঁজা হচ্ছে"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Slidev খোঁজা হচ্ছে"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "হালনাগাদ দেখা হচ্ছে"
@@ -3230,6 +3234,10 @@ msgstr "টার্মিনাল খোলা যায়নি — মন
msgid "Couldn't open the worktree. Try again."
msgstr "ওয়ার্কট্রি খোলা যায়নি। আবার চেষ্টা করুন।"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "এই নথিটি Slidev-এ খোলা যায়নি।"
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "এই প্রকল্পটি প্রকাশের জন্য প্রস্তুত করা যায়নি।"
@@ -3408,6 +3416,10 @@ msgstr "স্কিল ভাগ করা যায়নি: অভ্যন
msgid "Couldn't start {0}: {1}"
msgstr "{0} শুরু করা যায়নি: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Slidev চালু করা যায়নি।"
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "এজেন্ট থ্রেড শুরু করা যায়নি — অনুগ্রহ করে আবার চেষ্টা করুন।"
@@ -3964,6 +3976,10 @@ msgstr "বাইরের লিংকের প্রাকদর্শন ন
msgid "Disable semantic search"
msgstr "অর্থভিত্তিক অনুসন্ধান নিষ্ক্রিয় করুন"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Slidev বন্ধ করুন"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "বানান পরীক্ষা বন্ধ করুন"
@@ -4464,6 +4480,10 @@ msgstr "প্লাগইন চালু করুন"
msgid "Enable semantic search"
msgstr "অর্থভিত্তিক অনুসন্ধান চালু করুন"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Slidev চালু করুন"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "বানান পরীক্ষা চালু করুন"
@@ -4897,6 +4917,10 @@ msgstr "ক্রম বদলাতে ব্যর্থ"
msgid "Failed to save content rules — {0}"
msgstr "বিষয়বস্তুর নিয়ম সংরক্ষণ করতে ব্যর্থ — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Slidev সেটিং সংরক্ষণ করা যায়নি"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "স্কিমা ফিল্ড সংরক্ষণ করতে ব্যর্থ"
@@ -6288,11 +6312,11 @@ msgstr "বিন্যাস"
msgid "Layout options"
msgstr "বিন্যাসের বিকল্প"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "আরও জানুন"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "{title} সম্পর্কে আরও জানুন"
@@ -7850,6 +7874,10 @@ msgstr "ডিফল্ট অ্যাপে খুলুন"
msgid "Open in file manager"
msgstr "ফাইল ম্যানেজারে খুলুন"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Slidev-এ খুলুন"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "ওয়ার্কট্রিতে খুলুন"
@@ -8115,6 +8143,14 @@ msgstr "অন্যান্য"
msgid "Other OK paths are tracked upstream:"
msgstr "অন্য OK পথগুলো আপস্ট্রিমে হিসাবভুক্ত:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "ইনস্টল করার অন্যান্য উপায়"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Slidev ইনস্টল করার অন্যান্য উপায়"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "বহির্গামী"
@@ -8455,6 +8491,14 @@ msgstr "শেয়ার URL প্রস্তুত করা হচ্ছ
msgid "Preparing to uninstall OpenKnowledge"
msgstr "OpenKnowledge সরানোর প্রস্তুতি নেওয়া হচ্ছে"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "একটি নথিকে আলাদা উইন্ডোতে স্লাইড ডেক হিসেবে উপস্থাপন করুন। নথির frontmatter-এ <0>slides: true</0> যোগ করুন, তারপর Slidev অ্যাকশন দিয়ে খুলুন। রেন্ডারিং করে Slidev CLI, যা OpenKnowledge সরবরাহ করে না।"
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "একটি নথিকে আলাদা উইন্ডোতে স্লাইড ডেক হিসেবে উপস্থাপন করুন। শুধু OpenKnowledge ডেস্কটপ অ্যাপে কাজ করে এবং Slidev CLI প্রয়োজন, যা আলাদাভাবে ইনস্টল করতে হয়। চালু থাকলে সাইডবারে Plugins-এর নিচে দেখা যায়।"
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "একটি ট্যাব তুলতে Space চাপুন। ট্যাব স্ট্রিপের মধ্যে সরাতে তির চিহ্নের কী ব্যবহার করুন, তারপর নামাতে Space বা Enter চাপুন। বিভাজন, বন্ধ, পিন এবং অন্যান্য ট্যাব ক্রিয়া সহ কনটেক্সট মেনু খুলতে Shift+F10 বা Menu কী চাপুন।"
@@ -9490,6 +9534,10 @@ msgstr "Problems প্যানেল থেকে একটি প্রকল
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "OpenKnowledge-এর ভেতরে জোড়া একটি সত্যিকারের টার্মিনাল চালান, যা এই প্রকল্পের ফোল্ডার থেকে শুরু হয়।"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "টার্মিনালে চালান"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "এটি আপনার টার্মিনালে চালান"
@@ -10408,6 +10456,39 @@ msgstr "স্ল্যাশ কমান্ড মেনু"
msgid "Slash commands"
msgstr "স্ল্যাশ কমান্ড"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev এই নথিটি রেন্ডার করতে পারেনি।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Slidev ডেক শুধু OpenKnowledge ডেস্কটপ অ্যাপে খোলে।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "এই প্রকল্পে Slidev পাওয়া গেছে। ডেকগুলি প্রকল্পের সংস্করণ ব্যবহার করবে।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "আপনার সিস্টেমে Slidev পাওয়া গেছে।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Slidev ইনস্টল কমান্ড"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev ইনস্টল করা নেই, তাই Slidev অ্যাকশন লুকানো থাকে। ইনস্টল করে এই উইন্ডোতে ফিরে আসুন।"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev চালু হতে সময় শেষ হয়ে গেছে। আবার চেষ্টা করুন।"
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "ছোট বিভাগ শিরোনাম।"
@@ -11512,6 +11593,10 @@ msgstr "এটি {boldName}-এর একটি প্রাকদর্শন,
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "এটি {boldName}-এর একটি প্রাকদর্শন। এটি আপনার এজেন্টগুলোতে ইনস্টল করুন।"
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "এটি Slidev-এর সমর্থিত সংস্করণ নয়।"
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "এই আইটেমটি"
@@ -12367,6 +12452,10 @@ msgstr "আপনার অনুমোদনের অপেক্ষা"
msgid "Warning"
msgstr "সতর্কতা"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "Slidev ইনস্টল আছে কিনা তা যাচাই করা যায়নি। আবার চেষ্টা করতে এই উইন্ডোতে ফিরে আসুন।"
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "আমরা আপনার GitHub সংযোগ পরীক্ষা করতে পারিনি।"
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index 2ab598570..15ec56124 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -130,6 +130,7 @@
"1J0c0X": ["Still couldn't reach ", ["displayName"], " — try one more time?"],
"1LtA5r": ["Symlinks the skill to ", ["path"]],
"1MGRQl": ["Terminal sessions"],
+ "1NgrlY": ["Other ways to install"],
"1OKzC_": ["Your report couldn't be sent. Try again or email it instead."],
"1QfxQT": ["Dismiss"],
"1RluQD": ["Show replace"],
@@ -294,6 +295,7 @@
"45MZFs": ["Commands"],
"484LKL": ["Remove link"],
"494br3": ["Shared with everyone on this project — committed to config.yml via git."],
+ "49Mb7P": ["We couldn't check whether Slidev is installed. Return to this window to retry."],
"4A3Yzu": ["Code block"],
"4BITzH": ["Error:"],
"4CfgPM": ["Project folder created, but git init failed. Try again."],
@@ -1085,6 +1087,7 @@
],
"GK-IRZ": ["Undo buttons are disabled — per-session state has been garbage-collected."],
"GLxIKR": ["How to push manually"],
+ "GMaDTM": ["Failed to save Slidev setting"],
"GN6L5F": ["Filename"],
"GNkUvW": ["Queued — sends when this run finishes"],
"GQDSBN": ["Layout options"],
@@ -1149,6 +1152,9 @@
"HKH-W-": ["Data"],
"HM56Bx": ["Creating..."],
"HPTPGr": ["Create a new spec file for my user story"],
+ "HPaAxt": [
+ "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+ ],
"HSh8u_": ["Folders"],
"HTW0Zw": ["One more step: run <0>claude</0> in this project and approve OpenKnowledge once."],
"HbcQYf": [
@@ -1330,6 +1336,9 @@
"L1BQTH": [["0"], " isn't installed yet — opening its download page."],
"L1ZE3M": ["Document statistics"],
"L3CEC1": ["this item"],
+ "L3w0_C": [
+ "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+ ],
"L4Cdd9": ["or create a new file <0/>"],
"L6Hhh6": ["(root)"],
"L6Ud-t": ["Couldn't load conflicts — reload to retry."],
@@ -1385,6 +1394,7 @@
" tracked upstream — see message below."
],
"Llyqvo": ["This usually means one of:"],
+ "Lm3r51": ["Slidev couldn't render this document."],
"LnVIW4": ["Failed to start sign-in — try again"],
"LpB85N": ["Plain"],
"LtI9AS": ["Owner"],
@@ -1530,6 +1540,8 @@
"Nay2Yr": ["No agents match your search."],
"NcurBF": ["Pan down"],
"NeQ_0G": ["Work through these comments"],
+ "NeY1Np": ["Slidev timed out while starting. Try again."],
+ "NfraGd": ["Other ways to install Slidev"],
"NgZwB0": [["enabledCount"], "/", ["0"], " on"],
"NjrIak": ["File: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["Edit ", ["tag"]],
@@ -1617,6 +1629,9 @@
"OxplNM": ["Updated \"", ["0"], "\": added ", ["1"], ", removed ", ["2"]],
"Oxyd5f": ["Pick a name"],
"OyIC0Q": ["Project name"],
+ "Ozyht_": [
+ "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+ ],
"P-ye9o": ["Could not open folder picker"],
"P0HC30": ["This ", ["targetNoun"], " moved to <0>", ["0"], "</0>. Open it there?"],
"P3NS4G": ["Pattern syntax error (line ", ["lineNumber"], "): ", ["message"]],
@@ -1625,6 +1640,7 @@
"P47EWZ": ["Could not update sidebar settings"],
"P6gXB-": ["Replace ", ["keyName"]],
"P6lAT3": ["Folder target: ", ["linkTitle"], ". Click to open the overview."],
+ "P8AnMN": ["Checking for Slidev"],
"PB4upl": ["Find previous match"],
"PBwmDJ": ["Searching by meaning"],
"PBxg_E": ["Not now"],
@@ -1853,6 +1869,7 @@
"T0OVm7": ["The default branch is protected — pushes need a pull request."],
"T3Mld1": ["Window"],
"T3j-7o": ["e.g. Switching projects while a sync was running"],
+ "TBfy1C": ["Couldn't start Slidev."],
"TDeOpa": [
"Undo or redo your own edits, leaving edits from collaborators and agents in place."
],
@@ -1864,6 +1881,7 @@
"TQJCR6": [["0", "plural", { "one": ["#", " result"], "other": ["#", " results"] }]],
"TTDXD8": ["New worktree…"],
"TUzThQ": ["Share skills"],
+ "T_j5G0": ["This isn't a supported version of Slidev."],
"T_wG4n": ["We couldn't check your GitHub connection."],
"Ta25TG": ["No history yet"],
"TbjyhA": ["Docs"],
@@ -1965,6 +1983,7 @@
"Ugvy4O": ["Expand all file groups"],
"UhpfxY": ["Pan left"],
"UkQGhd": ["Hide replace"],
+ "UlVARL": ["Enable Slidev"],
"Uobeu9": ["Adds the skill to ", ["rootRel"], " — also read by ", ["0"]],
"Uoux8m": ["Include this comment in the next send"],
"Up2_7p": ["Copy full path"],
@@ -2092,6 +2111,7 @@
"X0ttSN": ["No tags match \"", ["tagListQuery"], "\"."],
"X2zUS5": ["Delete this comment"],
"X3MMeA": ["None of these problems have an automatic fix."],
+ "X59Fx2": ["Couldn't open this document in Slidev."],
"X7ShnN": ["Open agents panel"],
"X7u0xR": [["0"], " templates available"],
"X8kjQX": ["Re-authenticate with GitHub"],
@@ -2637,6 +2657,7 @@
"Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
],
"eiUA4k": [["count", "plural", { "one": ["#", " comment"], "other": ["#", " comments"] }]],
+ "el2KyL": ["Slidev found in this project. Decks will use the project's version."],
"emgiet": ["Authoritative content; mirrored verbatim everywhere it's referenced."],
"enPTnx": ["line ", ["displayLine"]],
"eoEUI3": ["Couldn't resolve that comment."],
@@ -2650,6 +2671,7 @@
],
"evs0iw": ["Tags matching \"", ["tagListQuery"], "\""],
"ezUmoU": ["Allowed element values (empty = any)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["Move block"],
"f3Nvg7": [
["0"],
@@ -2811,6 +2833,7 @@
"hQjvzi": ["A .zip or .skill archive."],
"hSBIG-": ["A title, description, tags — anything that describes this folder."],
"hSySVc": ["Install handoff failed: ", ["msg"]],
+ "hVAkI8": ["Run in terminal"],
"hXUWyd": ["Value is required"],
"hXbSxc": ["Asset: ", ["title"]],
"hY8pka": ["Select next occurrence"],
@@ -2841,6 +2864,7 @@
"hxnF0I": [["0"], " Properties"],
"hyCxJY": ["Open that worktree instead"],
"hynz2K": ["Download started"],
+ "hz076O": ["Slidev install command"],
"i-ShMB": ["Diagram"],
"i-wHEp": ["Editing ", ["boldName"], " in place. Changes save straight to your editor's copy."],
"i09An-": ["Restored an earlier version (", ["0"], ")"],
@@ -3112,6 +3136,7 @@
"A path inside the skill — any folder works (e.g. references/notes.md). Folders in the path are created for you."
],
"lPzyrU": ["All hunks resolved"],
+ "lScd1O": ["Slidev decks open in the OpenKnowledge desktop app only."],
"lUtr1r": [["0"], " of ", ["1"], " selected"],
"lVWEIL": ["Indexed ", ["embedded"], " of ", ["total"], " pages."],
"lWNpNB": ["Add cursors or select matching occurrences through CodeMirror."],
@@ -3804,6 +3829,7 @@
"w4hMYl": [
"Could not read branch state for this project. Close this dialog and open the share link again."
],
+ "w52SKa": ["Open in Slidev"],
"w61W3L": ["Remove ", ["0"]],
"w6sBjd": ["Terminal settings not yet loaded — try again in a moment"],
"w6sT-y": ["Follow the agent's edits"],
@@ -3825,6 +3851,7 @@
"wJo9oS": ["Close find"],
"wQp1V3": ["Mirror of <0>", ["src"], "</0>"],
"wQvvZY": ["New skill file"],
+ "wRni1Z": ["Disable Slidev"],
"wT4iQr": ["Open visual-editor find with replace controls expanded."],
"wTcjov": ["No workspace"],
"wU8WyK": ["Element fields"],
@@ -3911,6 +3938,7 @@
"xrVr_k": ["Couldn't create skill: ", ["0"]],
"xsZhu-": ["Page number"],
"xtJgSe": ["This source bundles several skills — choose the one to import."],
+ "xxRpzT": ["Slidev found on your system."],
"xzAmL_": ["Auto-approved"],
"xzktOa": ["Edit wiki link"],
"y1eoq1": ["Copy link"],
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 1393e809c..ec1204d58 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -2066,6 +2066,10 @@ msgstr "Checking"
msgid "Checking for agents"
msgstr "Checking for agents"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Checking for Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "Checking for updates"
@@ -3234,6 +3238,10 @@ msgstr "Couldn't open the terminal — the comments are still waiting to send."
msgid "Couldn't open the worktree. Try again."
msgstr "Couldn't open the worktree. Try again."
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "Couldn't open this document in Slidev."
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "Couldn't prepare this project for publish."
@@ -3412,6 +3420,10 @@ msgstr "Couldn't share skills: internal error. Please restart the app."
msgid "Couldn't start {0}: {1}"
msgstr "Couldn't start {0}: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Couldn't start Slidev."
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "Couldn't start the agent thread — please try again."
@@ -3968,6 +3980,10 @@ msgstr "Disable external link previews"
msgid "Disable semantic search"
msgstr "Disable semantic search"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Disable Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "Disable Spell Check"
@@ -4468,6 +4484,10 @@ msgstr "Enable plugins"
msgid "Enable semantic search"
msgstr "Enable semantic search"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Enable Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "Enable Spell Check"
@@ -4901,6 +4921,10 @@ msgstr "Failed to reorder"
msgid "Failed to save content rules — {0}"
msgstr "Failed to save content rules — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Failed to save Slidev setting"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "Failed to save the schema field"
@@ -6292,11 +6316,11 @@ msgstr "Layout"
msgid "Layout options"
msgstr "Layout options"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "Learn more"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "Learn more about {title}"
@@ -7854,6 +7878,10 @@ msgstr "Open in default app"
msgid "Open in file manager"
msgstr "Open in file manager"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Open in Slidev"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "Open in worktree"
@@ -8119,6 +8147,14 @@ msgstr "Other"
msgid "Other OK paths are tracked upstream:"
msgstr "Other OK paths are tracked upstream:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "Other ways to install"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Other ways to install Slidev"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "Outgoing"
@@ -8459,6 +8495,14 @@ msgstr "Preparing share URL..."
msgid "Preparing to uninstall OpenKnowledge"
msgstr "Preparing to uninstall OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
@@ -9494,6 +9538,10 @@ msgstr "Run a project audit from the Problems panel."
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "Run in terminal"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "Run this in your terminal"
@@ -10412,6 +10460,39 @@ msgstr "Slash command menu"
msgid "Slash commands"
msgstr "Slash commands"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev couldn't render this document."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Slidev decks open in the OpenKnowledge desktop app only."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "Slidev found in this project. Decks will use the project's version."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "Slidev found on your system."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Slidev install command"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev timed out while starting. Try again."
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "Small section heading."
@@ -11516,6 +11597,10 @@ msgstr "This is a preview of {boldName}, detected in {boldHarness} at the {boldL
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "This is a preview of {boldName}. Install it into your agents."
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "This isn't a supported version of Slidev."
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "this item"
@@ -12371,6 +12456,10 @@ msgstr "Waiting for your approval"
msgid "Warning"
msgstr "Warning"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "We couldn't check whether Slidev is installed. Return to this window to retry."
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "We couldn't check your GitHub connection."
diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.json
index 901afc54a..3081f8aed 100644
--- a/packages/app/src/locales/es/messages.json
+++ b/packages/app/src/locales/es/messages.json
@@ -150,6 +150,7 @@
"1J0c0X": ["Sigue sin poder conectarse con ", ["displayName"], ". ¿Intentarlo una vez más?"],
"1LtA5r": ["Enlaza simbólicamente la habilidad a ", ["path"]],
"1MGRQl": ["Sesiones de terminal"],
+ "1NgrlY": ["Otras formas de instalarlo"],
"1OKzC_": ["No se pudo enviar tu informe. Inténtalo de nuevo o mándalo por correo."],
"1QfxQT": ["Descartar"],
"1RluQD": ["Mostrar reemplazar"],
@@ -345,6 +346,9 @@
"45MZFs": ["Comandos"],
"484LKL": ["Quitar el enlace"],
"494br3": ["Compartido con todos los de este proyecto: se guarda en config.yml mediante git."],
+ "49Mb7P": [
+ "No pudimos comprobar si Slidev está instalado. Vuelve a esta ventana para reintentarlo."
+ ],
"4A3Yzu": ["Bloque de código"],
"4BITzH": ["Error:"],
"4CfgPM": ["Se creó la carpeta del proyecto, pero falló git init. Inténtalo de nuevo."],
@@ -1250,6 +1254,7 @@
],
"GK-IRZ": ["Los botones de deshacer están desactivados: el estado por sesión se ha liberado."],
"GLxIKR": ["Cómo hacer push manualmente"],
+ "GMaDTM": ["No se pudo guardar la configuración de Slidev"],
"GN6L5F": ["Nombre del archivo"],
"GNkUvW": ["En cola: se enviará cuando termine esta ejecución"],
"GQDSBN": ["Opciones de diseño"],
@@ -1334,6 +1339,9 @@
"HKH-W-": ["Datos"],
"HM56Bx": ["Creando..."],
"HPTPGr": ["Crea un archivo de especificación nuevo para mi historia de usuario"],
+ "HPaAxt": [
+ "Slidev no está instalado, así que la acción de Slidev permanece oculta. Instálalo y vuelve a esta ventana."
+ ],
"HSh8u_": ["Carpetas"],
"HTW0Zw": [
"Falta un paso: ejecuta <0>claude</0> en este proyecto y aprueba OpenKnowledge una vez."
@@ -1547,6 +1555,9 @@
"L1BQTH": [["0"], " todavía no está instalado: abriendo su página de descarga."],
"L1ZE3M": ["Estadísticas del documento"],
"L3CEC1": ["este elemento"],
+ "L3w0_C": [
+ "Presenta un documento como una presentación de diapositivas en su propia ventana. Añade <0>slides: true</0> al frontmatter de un documento y ábrelo con la acción de Slidev. El renderizado lo gestiona la CLI de Slidev, que OpenKnowledge no incluye."
+ ],
"L4Cdd9": ["o crea un archivo nuevo <0/>"],
"L6Hhh6": ["(raíz)"],
"L6Ud-t": ["No se pudieron cargar los conflictos. Vuelve a cargar para reintentar."],
@@ -1615,6 +1626,7 @@
" con seguimiento en remoto. Consulta el mensaje de abajo."
],
"Llyqvo": ["Esto suele significar una de estas cosas:"],
+ "Lm3r51": ["Slidev no pudo renderizar este documento."],
"LnVIW4": ["No se pudo iniciar la sesión: inténtalo de nuevo"],
"LpB85N": ["Sencillo"],
"LtI9AS": ["Propietario"],
@@ -1772,6 +1784,8 @@
"Nay2Yr": ["Ningún agente coincide con tu búsqueda."],
"NcurBF": ["Desplazar hacia abajo"],
"NeQ_0G": ["Trabaja sobre estos comentarios"],
+ "NeY1Np": ["Slidev tardó demasiado en iniciarse. Inténtalo de nuevo."],
+ "NfraGd": ["Otras formas de instalar Slidev"],
"NgZwB0": [["enabledCount"], "/", ["0"], " activos"],
"NjrIak": ["Archivo: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["Editar ", ["tag"]],
@@ -1863,6 +1877,9 @@
"OxplNM": ["Se actualizó \"", ["0"], "\": ", ["1"], " añadidos, ", ["2"], " eliminados"],
"Oxyd5f": ["Elige un nombre"],
"OyIC0Q": ["Nombre del proyecto"],
+ "Ozyht_": [
+ "Presenta un documento como una presentación de diapositivas en su propia ventana. Solo funciona en la aplicación de escritorio de OpenKnowledge y necesita la CLI de Slidev, que se instala por separado. Cuando está activado, aparece en Plugins en la barra lateral."
+ ],
"P-ye9o": ["No se pudo abrir el selector de carpetas"],
"P0HC30": ["Este ", ["targetNoun"], " se movió a <0>", ["0"], "</0>. ¿Abrirlo ahí?"],
"P3NS4G": ["Error de sintaxis en el patrón (línea ", ["lineNumber"], "): ", ["message"]],
@@ -1871,6 +1888,7 @@
"P47EWZ": ["No se pudieron actualizar los ajustes de la barra lateral"],
"P6gXB-": ["Reemplazar ", ["keyName"]],
"P6lAT3": ["Carpeta de destino: ", ["linkTitle"], ". Haz clic para abrir la vista general."],
+ "P8AnMN": ["Buscando Slidev"],
"PB4upl": ["Buscar la coincidencia anterior"],
"PBwmDJ": ["Buscando por significado"],
"PBxg_E": ["Ahora no"],
@@ -2121,6 +2139,7 @@
"T0OVm7": ["La rama por defecto está protegida: los push requieren una pull request."],
"T3Mld1": ["Ventana"],
"T3j-7o": ["p. ej. Cambiar de proyecto mientras se sincronizaba"],
+ "TBfy1C": ["No se pudo iniciar Slidev."],
"TDeOpa": [
"Deshaz o rehaz tus propias ediciones, dejando intactas las de colaboradores y agentes."
],
@@ -2138,6 +2157,7 @@
],
"TTDXD8": ["Worktree nuevo…"],
"TUzThQ": ["Compartir habilidades"],
+ "T_j5G0": ["Esta no es una versión compatible de Slidev."],
"T_wG4n": ["No pudimos comprobar tu conexión con GitHub."],
"Ta25TG": ["Todavía no hay historial"],
"TbjyhA": ["Documentos"],
@@ -2245,6 +2265,7 @@
"Ugvy4O": ["Expandir todos los grupos de archivos"],
"UhpfxY": ["Desplazar a la izquierda"],
"UkQGhd": ["Ocultar reemplazar"],
+ "UlVARL": ["Activar Slidev"],
"Uobeu9": ["Añade la habilidad a ", ["rootRel"], ", que también lee ", ["0"]],
"Uoux8m": ["Incluir este comentario en el próximo envío"],
"Up2_7p": ["Copiar ruta completa"],
@@ -2404,6 +2425,7 @@
"X0ttSN": ["Ninguna etiqueta coincide con \"", ["tagListQuery"], "\"."],
"X2zUS5": ["Eliminar este comentario"],
"X3MMeA": ["Ninguno de estos problemas tiene arreglo automático."],
+ "X59Fx2": ["No se pudo abrir este documento en Slidev."],
"X7ShnN": ["Abrir el panel de agentes"],
"X7u0xR": [["0"], " plantillas disponibles"],
"X8kjQX": ["Volver a autenticarse con GitHub"],
@@ -3062,6 +3084,9 @@
}
]
],
+ "el2KyL": [
+ "Slidev encontrado en este proyecto. Las presentaciones usarán la versión del proyecto."
+ ],
"emgiet": ["Contenido autoritativo; se replica literalmente allí donde se referencia."],
"enPTnx": ["línea ", ["displayLine"]],
"eoEUI3": ["No se pudo resolver ese comentario."],
@@ -3075,6 +3100,7 @@
],
"evs0iw": ["Etiquetas que coinciden con \"", ["tagListQuery"], "\""],
"ezUmoU": ["Valores de elemento permitidos (vacío = cualquiera)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["Mover el bloque"],
"f3Nvg7": [
["0"],
@@ -3258,6 +3284,7 @@
"hQjvzi": ["Un archivo .zip o .skill."],
"hSBIG-": ["Un título, una descripción, etiquetas: cualquier cosa que describa esta carpeta."],
"hSySVc": ["Falló el traspaso de la instalación: ", ["msg"]],
+ "hVAkI8": ["Ejecutar en la terminal"],
"hXUWyd": ["El valor es obligatorio"],
"hXbSxc": ["Recurso: ", ["title"]],
"hY8pka": ["Seleccionar la aparición siguiente"],
@@ -3292,6 +3319,7 @@
"hxnF0I": ["Propiedades de ", ["0"]],
"hyCxJY": ["Abrir ese worktree en su lugar"],
"hynz2K": ["Descarga iniciada"],
+ "hz076O": ["Comando de instalación de Slidev"],
"i-ShMB": ["Diagrama"],
"i-wHEp": [
"Editando ",
@@ -3588,6 +3616,9 @@
"Una ruta dentro de la habilidad; cualquier carpeta sirve (p. ej. references/notes.md). Las carpetas de la ruta se crean automáticamente."
],
"lPzyrU": ["Todos los fragmentos resueltos"],
+ "lScd1O": [
+ "Las presentaciones de Slidev solo se abren en la aplicación de escritorio de OpenKnowledge."
+ ],
"lUtr1r": [["0"], " de ", ["1"], " seleccionados"],
"lVWEIL": ["Se indexaron ", ["embedded"], " de ", ["total"], " páginas."],
"lWNpNB": ["Añade cursores o selecciona coincidencias con CodeMirror."],
@@ -4377,6 +4408,7 @@
"w4hMYl": [
"No se pudo leer el estado de las ramas de este proyecto. Cierra este diálogo y vuelve a abrir el enlace compartido."
],
+ "w52SKa": ["Abrir en Slidev"],
"w61W3L": ["Quitar ", ["0"]],
"w6sBjd": [
"Los ajustes de la terminal aún no se han cargado; inténtalo de nuevo en un momento"
@@ -4400,6 +4432,7 @@
"wJo9oS": ["Cerrar búsqueda"],
"wQp1V3": ["Espejo de <0>", ["src"], "</0>"],
"wQvvZY": ["Archivo de habilidad nuevo"],
+ "wRni1Z": ["Desactivar Slidev"],
"wT4iQr": ["Abre la búsqueda del editor visual con los controles de reemplazo desplegados."],
"wTcjov": ["Sin espacio de trabajo"],
"wU8WyK": ["Campos del elemento"],
@@ -4495,6 +4528,7 @@
"xrVr_k": ["No se pudo crear la habilidad: ", ["0"]],
"xsZhu-": ["Número de página"],
"xtJgSe": ["Este origen incluye varias habilidades: elige cuál importar."],
+ "xxRpzT": ["Slidev encontrado en tu sistema."],
"xzAmL_": ["Aprobado automáticamente"],
"xzktOa": ["Editar el enlace wiki"],
"y1eoq1": ["Copiar enlace"],
diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.po
index 7b9185313..0ed0e2049 100644
--- a/packages/app/src/locales/es/messages.po
+++ b/packages/app/src/locales/es/messages.po
@@ -2066,6 +2066,10 @@ msgstr "Comprobando"
msgid "Checking for agents"
msgstr "Buscando agentes"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Buscando Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "Buscando actualizaciones"
@@ -3234,6 +3238,10 @@ msgstr "No se pudo abrir la terminal; los comentarios siguen pendientes de enví
msgid "Couldn't open the worktree. Try again."
msgstr "No se pudo abrir el worktree. Inténtalo de nuevo."
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "No se pudo abrir este documento en Slidev."
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "No se pudo preparar este proyecto para publicarlo."
@@ -3412,6 +3420,10 @@ msgstr "No se pudieron compartir las habilidades: error interno. Reinicia la apl
msgid "Couldn't start {0}: {1}"
msgstr "No se pudo iniciar {0}: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "No se pudo iniciar Slidev."
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "No se pudo iniciar el hilo del agente; inténtalo de nuevo."
@@ -3968,6 +3980,10 @@ msgstr "Desactivar la vista previa de enlaces externos"
msgid "Disable semantic search"
msgstr "Desactivar la búsqueda semántica"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Desactivar Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "Desactivar la corrección ortográfica"
@@ -4468,6 +4484,10 @@ msgstr "Activar los complementos"
msgid "Enable semantic search"
msgstr "Activar la búsqueda semántica"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Activar Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "Activar la corrección ortográfica"
@@ -4901,6 +4921,10 @@ msgstr "No se pudo reordenar"
msgid "Failed to save content rules — {0}"
msgstr "No se pudieron guardar las reglas de contenido — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "No se pudo guardar la configuración de Slidev"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "No se pudo guardar el campo del esquema"
@@ -6292,11 +6316,11 @@ msgstr "Diseño"
msgid "Layout options"
msgstr "Opciones de diseño"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "Más información"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "Más información sobre {title}"
@@ -7854,6 +7878,10 @@ msgstr "Abrir en la aplicación predeterminada"
msgid "Open in file manager"
msgstr "Abrir en el gestor de archivos"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Abrir en Slidev"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "Abrir en un worktree"
@@ -8119,6 +8147,14 @@ msgstr "Otro"
msgid "Other OK paths are tracked upstream:"
msgstr "Hay otras rutas OK seguidas en el remoto:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "Otras formas de instalarlo"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Otras formas de instalar Slidev"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "Salientes"
@@ -8459,6 +8495,14 @@ msgstr "Preparando la URL para compartir..."
msgid "Preparing to uninstall OpenKnowledge"
msgstr "Preparando la desinstalación de OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "Presenta un documento como una presentación de diapositivas en su propia ventana. Añade <0>slides: true</0> al frontmatter de un documento y ábrelo con la acción de Slidev. El renderizado lo gestiona la CLI de Slidev, que OpenKnowledge no incluye."
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "Presenta un documento como una presentación de diapositivas en su propia ventana. Solo funciona en la aplicación de escritorio de OpenKnowledge y necesita la CLI de Slidev, que se instala por separado. Cuando está activado, aparece en Plugins en la barra lateral."
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "Pulsa Espacio para tomar una pestaña. Usa las teclas de flecha para moverla dentro de la tira de pestañas y luego pulsa Espacio o Intro para soltarla. Pulsa Mayús+F10 o la tecla Menú para abrir el menú contextual de la pestaña, con las acciones de dividir, cerrar, fijar y otras."
@@ -9494,6 +9538,10 @@ msgstr "Ejecuta una auditoría del proyecto desde el panel Problemas."
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "Ejecuta una terminal real acoplada dentro de OpenKnowledge, que arranca en la carpeta de este proyecto."
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "Ejecutar en la terminal"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "Ejecuta esto en tu terminal"
@@ -10412,6 +10460,39 @@ msgstr "Menú de comandos de barra"
msgid "Slash commands"
msgstr "Comandos de barra"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev no pudo renderizar este documento."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Las presentaciones de Slidev solo se abren en la aplicación de escritorio de OpenKnowledge."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "Slidev encontrado en este proyecto. Las presentaciones usarán la versión del proyecto."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "Slidev encontrado en tu sistema."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Comando de instalación de Slidev"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev no está instalado, así que la acción de Slidev permanece oculta. Instálalo y vuelve a esta ventana."
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev tardó demasiado en iniciarse. Inténtalo de nuevo."
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "Encabezado de sección pequeño."
@@ -11516,6 +11597,10 @@ msgstr "Esto es una vista previa de {boldName}, detectada en {boldHarness} en el
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "Esto es una vista previa de {boldName}. Instálala en tus agentes."
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "Esta no es una versión compatible de Slidev."
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "este elemento"
@@ -12371,6 +12456,10 @@ msgstr "Esperando tu aprobación"
msgid "Warning"
msgstr "Advertencia"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "No pudimos comprobar si Slidev está instalado. Vuelve a esta ventana para reintentarlo."
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "No pudimos comprobar tu conexión con GitHub."
diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.json
index 8b05230b1..3477e59cb 100644
--- a/packages/app/src/locales/fr/messages.json
+++ b/packages/app/src/locales/fr/messages.json
@@ -156,6 +156,7 @@
],
"1LtA5r": ["Crée un lien symbolique de la compétence vers ", ["path"]],
"1MGRQl": ["Sessions de terminal"],
+ "1NgrlY": ["Autres méthodes d'installation"],
"1OKzC_": ["Votre rapport n'a pas pu être envoyé. Réessayez ou envoyez-le par e-mail."],
"1QfxQT": ["Ignorer"],
"1RluQD": ["Afficher le remplacement"],
@@ -359,6 +360,9 @@
"45MZFs": ["Commandes"],
"484LKL": ["Retirer le lien"],
"494br3": ["Partagé avec toutes les personnes de ce projet — validé dans config.yml via git."],
+ "49Mb7P": [
+ "Nous n'avons pas pu vérifier si Slidev est installé. Revenez à cette fenêtre pour réessayer."
+ ],
"4A3Yzu": ["Bloc de code"],
"4BITzH": ["Erreur :"],
"4CfgPM": ["Dossier de projet créé, mais git init a échoué. Réessayez."],
@@ -1282,6 +1286,7 @@
"Les boutons d'annulation sont désactivés — l'état par session a été récupéré par le ramasse-miettes."
],
"GLxIKR": ["Comment pousser manuellement"],
+ "GMaDTM": ["Échec de l'enregistrement du paramètre Slidev"],
"GN6L5F": ["Nom de fichier"],
"GNkUvW": ["En file d’attente : envoi à la fin de cette exécution"],
"GQDSBN": ["Options de mise en page"],
@@ -1362,6 +1367,9 @@
"HKH-W-": ["Données"],
"HM56Bx": ["Création…"],
"HPTPGr": ["Crée un nouveau fichier de spécification pour ma user story"],
+ "HPaAxt": [
+ "Slidev n'est pas installé, l'action Slidev reste donc masquée. Installez-le, puis revenez à cette fenêtre."
+ ],
"HSh8u_": ["Dossiers"],
"HTW0Zw": [
"Encore une étape : exécutez <0>claude</0> dans ce projet et approuvez OpenKnowledge une fois."
@@ -1575,6 +1583,9 @@
"L1BQTH": [["0"], " n'est pas encore installé — ouverture de sa page de téléchargement."],
"L1ZE3M": ["Statistiques du document"],
"L3CEC1": ["cet élément"],
+ "L3w0_C": [
+ "Présentez un document sous forme de diaporama dans sa propre fenêtre. Ajoutez <0>slides: true</0> au frontmatter d'un document, puis ouvrez-le avec l'action Slidev. Le rendu est assuré par la CLI Slidev, qu'OpenKnowledge ne fournit pas."
+ ],
"L4Cdd9": ["ou créez un nouveau fichier <0/>"],
"L6Hhh6": ["(racine)"],
"L6Ud-t": ["Impossible de charger les conflits. Rechargez pour réessayer."],
@@ -1643,6 +1654,7 @@
" en amont. Voir le message ci-dessous."
],
"Llyqvo": ["Cela signifie généralement l'une de ces choses :"],
+ "Lm3r51": ["Slidev n'a pas pu afficher ce document."],
"LnVIW4": ["Échec du démarrage de la connexion — réessayez"],
"LpB85N": ["Simple"],
"LtI9AS": ["Propriétaire"],
@@ -1798,6 +1810,8 @@
"Nay2Yr": ["Aucun agent ne correspond à votre recherche."],
"NcurBF": ["Faire défiler vers le bas"],
"NeQ_0G": ["Traiter ces commentaires"],
+ "NeY1Np": ["Slidev a mis trop de temps à démarrer. Réessayez."],
+ "NfraGd": ["Autres méthodes d'installation de Slidev"],
"NgZwB0": [["enabledCount"], "/", ["0"], " activés"],
"NjrIak": ["Fichier : <0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["Modifier ", ["tag"]],
@@ -1889,6 +1903,9 @@
"OxplNM": ["« ", ["0"], " » mis à jour : ", ["1"], " ajouté(s), ", ["2"], " retiré(s)"],
"Oxyd5f": ["Choisissez un nom"],
"OyIC0Q": ["Nom du projet"],
+ "Ozyht_": [
+ "Présentez un document sous forme de diaporama dans sa propre fenêtre. Fonctionne uniquement dans l'application de bureau OpenKnowledge et nécessite la CLI Slidev, à installer séparément. Une fois activé, il apparaît sous Plugins dans la barre latérale."
+ ],
"P-ye9o": ["Impossible d'ouvrir le sélecteur de dossier"],
"P0HC30": ["Ce ", ["targetNoun"], " a été déplacé vers <0>", ["0"], "</0>. L'ouvrir là-bas ?"],
"P3NS4G": ["Erreur de syntaxe du motif (ligne ", ["lineNumber"], ") : ", ["message"]],
@@ -1897,6 +1914,7 @@
"P47EWZ": ["Impossible de mettre à jour les paramètres de la barre latérale"],
"P6gXB-": ["Remplacer ", ["keyName"]],
"P6lAT3": ["Dossier cible : ", ["linkTitle"], ". Cliquez pour ouvrir la synthèse."],
+ "P8AnMN": ["Recherche de Slidev"],
"PB4upl": ["Occurrence précédente"],
"PBwmDJ": ["Recherche par le sens"],
"PBxg_E": ["Pas maintenant"],
@@ -2153,6 +2171,7 @@
"T0OVm7": ["La branche par défaut est protégée — les push nécessitent une pull request."],
"T3Mld1": ["Fenêtre"],
"T3j-7o": ["par ex. Changement de projet pendant une synchronisation"],
+ "TBfy1C": ["Impossible de démarrer Slidev."],
"TDeOpa": [
"Annule ou rétablit vos propres modifications, en laissant en place celles des collaborateurs et des agents."
],
@@ -2170,6 +2189,7 @@
],
"TTDXD8": ["Nouveau worktree…"],
"TUzThQ": ["Partager les compétences"],
+ "T_j5G0": ["Cette version de Slidev n'est pas prise en charge."],
"T_wG4n": ["Nous n'avons pas pu vérifier votre connexion GitHub."],
"Ta25TG": ["Pas encore d'historique"],
"TbjyhA": ["Documents"],
@@ -2279,6 +2299,7 @@
"Ugvy4O": ["Développer tous les groupes de fichiers"],
"UhpfxY": ["Faire défiler vers la gauche"],
"UkQGhd": ["Masquer le remplacement"],
+ "UlVARL": ["Activer Slidev"],
"Uobeu9": ["Ajoute la compétence à ", ["rootRel"], " — également lu par ", ["0"]],
"Uoux8m": ["Inclure ce commentaire dans le prochain envoi"],
"Up2_7p": ["Copier le chemin complet"],
@@ -2444,6 +2465,7 @@
"X0ttSN": ["Aucune étiquette ne correspond à « ", ["tagListQuery"], " »."],
"X2zUS5": ["Supprimer ce commentaire"],
"X3MMeA": ["Aucun de ces problèmes n'a de correction automatique."],
+ "X59Fx2": ["Impossible d'ouvrir ce document dans Slidev."],
"X7ShnN": ["Ouvrir le panneau des agents"],
"X7u0xR": [["0"], " modèles disponibles"],
"X8kjQX": ["Se réauthentifier auprès de GitHub"],
@@ -3101,6 +3123,7 @@
}
]
],
+ "el2KyL": ["Slidev trouvé dans ce projet. Les diaporamas utiliseront la version du projet."],
"emgiet": ["Contenu faisant autorité ; reproduit tel quel partout où il est référencé."],
"enPTnx": ["ligne ", ["displayLine"]],
"eoEUI3": ["Impossible de résoudre ce commentaire."],
@@ -3114,6 +3137,7 @@
],
"evs0iw": ["Étiquettes correspondant à « ", ["tagListQuery"], " »"],
"ezUmoU": ["Valeurs d'élément autorisées (vide = toutes)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["Déplacer le bloc"],
"f3Nvg7": [
["0"],
@@ -3299,6 +3323,7 @@
"hQjvzi": ["Une archive .zip ou .skill."],
"hSBIG-": ["Un titre, une description, des étiquettes — tout ce qui décrit ce dossier."],
"hSySVc": ["Échec du transfert d'installation : ", ["msg"]],
+ "hVAkI8": ["Exécuter dans le terminal"],
"hXUWyd": ["Une valeur est obligatoire"],
"hXbSxc": ["Ressource : ", ["title"]],
"hY8pka": ["Sélectionner l'occurrence suivante"],
@@ -3333,6 +3358,7 @@
"hxnF0I": ["Propriétés de ", ["0"]],
"hyCxJY": ["Ouvrir plutôt ce worktree"],
"hynz2K": ["Téléchargement démarré"],
+ "hz076O": ["Commande d'installation de Slidev"],
"i-ShMB": ["Diagramme"],
"i-wHEp": [
"Modification de ",
@@ -3633,6 +3659,9 @@
"Un chemin à l'intérieur de la compétence — n'importe quel dossier convient (par ex. references/notes.md). Les dossiers du chemin sont créés pour vous."
],
"lPzyrU": ["Tous les blocs sont résolus"],
+ "lScd1O": [
+ "Les diaporamas Slidev s'ouvrent uniquement dans l'application de bureau OpenKnowledge."
+ ],
"lUtr1r": [["0"], " sélectionné(s) sur ", ["1"]],
"lVWEIL": [["embedded"], " pages indexées sur ", ["total"], "."],
"lWNpNB": [
@@ -4443,6 +4472,7 @@
"w4hMYl": [
"Impossible de lire l'état des branches de ce projet. Fermez cette boîte de dialogue et rouvrez le lien de partage."
],
+ "w52SKa": ["Ouvrir dans Slidev"],
"w61W3L": ["Retirer ", ["0"]],
"w6sBjd": ["Les paramètres du terminal ne sont pas encore chargés — réessayez dans un instant"],
"w6sT-y": ["Suivre les modifications de l'agent"],
@@ -4464,6 +4494,7 @@
"wJo9oS": ["Fermer la recherche"],
"wQp1V3": ["Miroir de <0>", ["src"], "</0>"],
"wQvvZY": ["Nouveau fichier de compétence"],
+ "wRni1Z": ["Désactiver Slidev"],
"wT4iQr": [
"Ouvre la recherche de l'éditeur visuel avec les contrôles de remplacement dépliés."
],
@@ -4557,6 +4588,7 @@
"xrVr_k": ["Impossible de créer la compétence : ", ["0"]],
"xsZhu-": ["Numéro de page"],
"xtJgSe": ["Cette source regroupe plusieurs compétences — choisissez celle à importer."],
+ "xxRpzT": ["Slidev trouvé sur votre système."],
"xzAmL_": ["Approuvé automatiquement"],
"xzktOa": ["Modifier le lien wiki"],
"y1eoq1": ["Copier le lien"],
diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.po
index beb81f328..063da2ce4 100644
--- a/packages/app/src/locales/fr/messages.po
+++ b/packages/app/src/locales/fr/messages.po
@@ -2066,6 +2066,10 @@ msgstr "Vérification"
msgid "Checking for agents"
msgstr "Recherche d'agents"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Recherche de Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "Recherche de mises à jour"
@@ -3234,6 +3238,10 @@ msgstr "Impossible d'ouvrir le terminal — les commentaires attendent toujours
msgid "Couldn't open the worktree. Try again."
msgstr "Impossible d'ouvrir le worktree. Réessayez."
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "Impossible d'ouvrir ce document dans Slidev."
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "Impossible de préparer ce projet pour la publication."
@@ -3412,6 +3420,10 @@ msgstr "Impossible de partager les compétences : erreur interne. Veuillez redé
msgid "Couldn't start {0}: {1}"
msgstr "Impossible de démarrer {0} : {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Impossible de démarrer Slidev."
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "Impossible de démarrer le fil de l'agent — veuillez réessayer."
@@ -3968,6 +3980,10 @@ msgstr "Désactiver les aperçus de liens externes"
msgid "Disable semantic search"
msgstr "Désactiver la recherche sémantique"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Désactiver Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "Désactiver le correcteur orthographique"
@@ -4468,6 +4484,10 @@ msgstr "Activer les plugins"
msgid "Enable semantic search"
msgstr "Activer la recherche sémantique"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Activer Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "Activer le correcteur orthographique"
@@ -4901,6 +4921,10 @@ msgstr "Échec de la réorganisation"
msgid "Failed to save content rules — {0}"
msgstr "Échec de l'enregistrement des règles de contenu — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Échec de l'enregistrement du paramètre Slidev"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "Échec de l'enregistrement du champ de schéma"
@@ -6292,11 +6316,11 @@ msgstr "Mise en page"
msgid "Layout options"
msgstr "Options de mise en page"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "En savoir plus"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "En savoir plus sur {title}"
@@ -7854,6 +7878,10 @@ msgstr "Ouvrir dans l'application par défaut"
msgid "Open in file manager"
msgstr "Ouvrir dans le gestionnaire de fichiers"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Ouvrir dans Slidev"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "Ouvrir dans un worktree"
@@ -8119,6 +8147,14 @@ msgstr "Autre"
msgid "Other OK paths are tracked upstream:"
msgstr "D'autres chemins OK sont suivis en amont :"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "Autres méthodes d'installation"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Autres méthodes d'installation de Slidev"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "Sortants"
@@ -8459,6 +8495,14 @@ msgstr "Préparation de l'URL de partage…"
msgid "Preparing to uninstall OpenKnowledge"
msgstr "Préparation de la désinstallation d'OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "Présentez un document sous forme de diaporama dans sa propre fenêtre. Ajoutez <0>slides: true</0> au frontmatter d'un document, puis ouvrez-le avec l'action Slidev. Le rendu est assuré par la CLI Slidev, qu'OpenKnowledge ne fournit pas."
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "Présentez un document sous forme de diaporama dans sa propre fenêtre. Fonctionne uniquement dans l'application de bureau OpenKnowledge et nécessite la CLI Slidev, à installer séparément. Une fois activé, il apparaît sous Plugins dans la barre latérale."
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "Appuyez sur Espace pour saisir un onglet. Utilisez les touches fléchées pour le déplacer dans la barre d’onglets, puis appuyez sur Espace ou Entrée pour le déposer. Appuyez sur Maj+F10 ou sur la touche Menu pour ouvrir le menu contextuel de l’onglet (fractionner, fermer, épingler et autres actions)."
@@ -9494,6 +9538,10 @@ msgstr "Lancez un audit du projet depuis le panneau Problèmes."
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "Exécutez un vrai terminal ancré dans OpenKnowledge, démarrant dans le dossier de ce projet."
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "Exécuter dans le terminal"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "Exécutez ceci dans votre terminal"
@@ -10412,6 +10460,39 @@ msgstr "Menu des commandes slash"
msgid "Slash commands"
msgstr "Commandes slash"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev n'a pas pu afficher ce document."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Les diaporamas Slidev s'ouvrent uniquement dans l'application de bureau OpenKnowledge."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "Slidev trouvé dans ce projet. Les diaporamas utiliseront la version du projet."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "Slidev trouvé sur votre système."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Commande d'installation de Slidev"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev n'est pas installé, l'action Slidev reste donc masquée. Installez-le, puis revenez à cette fenêtre."
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev a mis trop de temps à démarrer. Réessayez."
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "Petit titre de section."
@@ -11516,6 +11597,10 @@ msgstr "Ceci est un aperçu de {boldName}, détectée dans {boldHarness} au nive
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "Ceci est un aperçu de {boldName}. Installez-la dans vos agents."
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "Cette version de Slidev n'est pas prise en charge."
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "cet élément"
@@ -12371,6 +12456,10 @@ msgstr "En attente de votre approbation"
msgid "Warning"
msgstr "Avertissement"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "Nous n'avons pas pu vérifier si Slidev est installé. Revenez à cette fenêtre pour réessayer."
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "Nous n'avons pas pu vérifier votre connexion GitHub."
diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.json
index 72569b0a4..1b8e479d5 100644
--- a/packages/app/src/locales/hi/messages.json
+++ b/packages/app/src/locales/hi/messages.json
@@ -128,6 +128,7 @@
"1J0c0X": [["displayName"], " तक अब भी नहीं पहुँचा जा सका। एक बार और कोशिश करें?"],
"1LtA5r": ["स्किल को ", ["path"], " पर सिमलिंक करता है"],
"1MGRQl": ["टर्मिनल सत्र"],
+ "1NgrlY": ["इंस्टॉल करने के अन्य तरीके"],
"1OKzC_": ["आपकी रिपोर्ट नहीं भेजी जा सकी। फिर कोशिश करें या इसके बजाय इसे ईमेल करें।"],
"1QfxQT": ["ख़ारिज करें"],
"1RluQD": ["बदलें दिखाएँ"],
@@ -281,6 +282,7 @@
"45MZFs": ["कमांड"],
"484LKL": ["लिंक हटाएँ"],
"494br3": ["इस प्रोजेक्ट के हर व्यक्ति के साथ साझा — git के ज़रिए config.yml में कमिट किया गया।"],
+ "49Mb7P": ["हम जाँच नहीं सके कि Slidev इंस्टॉल है या नहीं। पुनः प्रयास के लिए इस विंडो पर लौटें।"],
"4A3Yzu": ["कोड ब्लॉक"],
"4BITzH": ["त्रुटि:"],
"4CfgPM": ["प्रोजेक्ट फ़ोल्डर बन गया, पर git init विफल रहा। फिर कोशिश करें।"],
@@ -1031,6 +1033,7 @@
"GJH-AT": [["docName"], " ", ["0"], " है। OpenKnowledge फ़िलहाल ", ["1"], " तक की फ़ाइलें खोलता है।"],
"GK-IRZ": ["पूर्ववत बटन अक्षम हैं — प्रति-सत्र स्थिति साफ़ की जा चुकी है।"],
"GLxIKR": ["हाथ से कैसे भेजें"],
+ "GMaDTM": ["Slidev सेटिंग सहेजी नहीं जा सकी"],
"GN6L5F": ["फ़ाइल का नाम"],
"GNkUvW": ["क़तार में — यह प्रक्रिया समाप्त होने पर भेजा जाएगा"],
"GQDSBN": ["लेआउट विकल्प"],
@@ -1095,6 +1098,9 @@
"HKH-W-": ["डेटा"],
"HM56Bx": ["बनाया जा रहा है…"],
"HPTPGr": ["मेरी उपयोगकर्ता कहानी के लिए एक नई स्पेक फ़ाइल बनाएँ"],
+ "HPaAxt": [
+ "Slidev इंस्टॉल नहीं है, इसलिए Slidev क्रिया छिपी रहती है। इसे इंस्टॉल करें, फिर इस विंडो पर लौटें।"
+ ],
"HSh8u_": ["फ़ोल्डर"],
"HTW0Zw": ["एक और क़दम: इस प्रोजेक्ट में <0>claude</0> चलाएँ और OpenKnowledge को एक बार स्वीकृत करें।"],
"HbcQYf": [["display"], " पर मौजूद सिमलिंक को स्किल की एक स्वतंत्र प्रति से बदलें? और कुछ नहीं हिलता।"],
@@ -1274,6 +1280,9 @@
"L1BQTH": [["0"], " अभी इंस्टॉल नहीं है — इसका डाउनलोड पेज खोला जा रहा है।"],
"L1ZE3M": ["दस्तावेज़ आँकड़े"],
"L3CEC1": ["यह आइटम"],
+ "L3w0_C": [
+ "किसी दस्तावेज़ को अलग विंडो में स्लाइड डेक के रूप में प्रस्तुत करें। दस्तावेज़ के frontmatter में <0>slides: true</0> जोड़ें, फिर उसे Slidev क्रिया से खोलें। रेंडरिंग Slidev CLI करता है, जिसे OpenKnowledge शामिल नहीं करता।"
+ ],
"L4Cdd9": ["या एक नई फ़ाइल बनाएँ <0/>"],
"L6Hhh6": ["(रूट)"],
"L6Ud-t": ["विरोध लोड नहीं हो सके। दोबारा कोशिश करने के लिए फिर से लोड करें।"],
@@ -1329,6 +1338,7 @@
" ट्रैक की जा रही हैं। नीचे दिया संदेश देखें।"
],
"Llyqvo": ["इसका आमतौर पर मतलब इनमें से एक होता है:"],
+ "Lm3r51": ["Slidev इस दस्तावेज़ को रेंडर नहीं कर सका।"],
"LnVIW4": ["साइन-इन शुरू करने में विफल — फिर कोशिश करें"],
"LpB85N": ["सादा"],
"LtI9AS": ["स्वामी"],
@@ -1466,6 +1476,8 @@
"Nay2Yr": ["आपकी खोज से कोई एजेंट मेल नहीं खाता।"],
"NcurBF": ["नीचे खिसकाएँ"],
"NeQ_0G": ["इन टिप्पणियों पर काम करें"],
+ "NeY1Np": ["Slidev शुरू होने में बहुत समय लगा। फिर से कोशिश करें।"],
+ "NfraGd": ["Slidev इंस्टॉल करने के अन्य तरीके"],
"NgZwB0": [["0"], " में से ", ["enabledCount"], " चालू"],
"NjrIak": ["फ़ाइल: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": [["tag"], " संपादित करें"],
@@ -1549,6 +1561,9 @@
"OxplNM": ["\"", ["0"], "\" अपडेट किया गया: ", ["1"], " जोड़े गए, ", ["2"], " हटाए गए"],
"Oxyd5f": ["कोई नाम चुनें"],
"OyIC0Q": ["प्रोजेक्ट का नाम"],
+ "Ozyht_": [
+ "किसी दस्तावेज़ को अलग विंडो में स्लाइड डेक के रूप में प्रस्तुत करें। यह केवल OpenKnowledge डेस्कटॉप ऐप में काम करता है और इसके लिए Slidev CLI चाहिए, जिसे आप अलग से इंस्टॉल करते हैं। चालू होने पर यह साइडबार में Plugins के अंतर्गत दिखता है।"
+ ],
"P-ye9o": ["फ़ोल्डर चयनकर्ता नहीं खोला जा सका"],
"P0HC30": ["यह ", ["targetNoun"], " <0>", ["0"], "</0> पर चला गया। इसे वहाँ खोलें?"],
"P3NS4G": ["पैटर्न वाक्यविन्यास त्रुटि (पंक्ति ", ["lineNumber"], "): ", ["message"]],
@@ -1557,6 +1572,7 @@
"P47EWZ": ["साइडबार सेटिंग अपडेट नहीं की जा सकीं"],
"P6gXB-": [["keyName"], " बदलें"],
"P6lAT3": ["फ़ोल्डर लक्ष्य: ", ["linkTitle"], ". सिंहावलोकन खोलने के लिए क्लिक करें।"],
+ "P8AnMN": ["Slidev खोजा जा रहा है"],
"PB4upl": ["पिछला मेल खोजें"],
"PBwmDJ": ["अर्थ के आधार पर खोजा जा रहा है"],
"PBxg_E": ["अभी नहीं"],
@@ -1782,6 +1798,7 @@
"T0OVm7": ["डिफ़ॉल्ट ब्रांच सुरक्षित है — भेजने के लिए एक पुल रिक्वेस्ट चाहिए।"],
"T3Mld1": ["विंडो"],
"T3j-7o": ["जैसे सिंक चलते समय प्रोजेक्ट बदलना"],
+ "TBfy1C": ["Slidev शुरू नहीं किया जा सका।"],
"TDeOpa": ["अपने ही संपादन पूर्ववत या फिर से करें, सहयोगियों और एजेंट के संपादन अपनी जगह छोड़ते हुए।"],
"TEEPPF": ["मौजूदा OpenKnowledge प्रविष्टि की जगह ले लेगा"],
"TJnkyf": ["ok ui ने उत्तर दिया पर server.lock में अभी कोई पोर्ट नहीं है"],
@@ -1791,6 +1808,7 @@
"TQJCR6": [["0", "plural", { "one": ["#", " परिणाम"], "other": ["#", " परिणाम"] }]],
"TTDXD8": ["नया वर्कट्री…"],
"TUzThQ": ["स्किल साझा करें"],
+ "T_j5G0": ["यह Slidev का समर्थित संस्करण नहीं है।"],
"T_wG4n": ["हम आपका GitHub कनेक्शन नहीं जाँच सके।"],
"Ta25TG": ["अभी कोई इतिहास नहीं"],
"TbjyhA": ["दस्तावेज़"],
@@ -1884,6 +1902,7 @@
"Ugvy4O": ["सभी फ़ाइल समूह फैलाएँ"],
"UhpfxY": ["बाएँ खिसकाएँ"],
"UkQGhd": ["बदलें छिपाएँ"],
+ "UlVARL": ["Slidev चालू करें"],
"Uobeu9": ["स्किल को ", ["rootRel"], " में जोड़ता है — जिसे ", ["0"], " भी पढ़ता है"],
"Uoux8m": ["अगली बार भेजते समय इस टिप्पणी को शामिल करें"],
"Up2_7p": ["पूरा पथ कॉपी करें"],
@@ -2011,6 +2030,7 @@
"X0ttSN": ["\"", ["tagListQuery"], "\" से कोई टैग मेल नहीं खाता।"],
"X2zUS5": ["यह टिप्पणी हटाएँ"],
"X3MMeA": ["इनमें से किसी भी समस्या का कोई स्वचालित समाधान नहीं है।"],
+ "X59Fx2": ["इस दस्तावेज़ को Slidev में नहीं खोला जा सका।"],
"X7ShnN": ["एजेंट पैनल खोलें"],
"X7u0xR": [["0"], " टेम्पलेट उपलब्ध"],
"X8kjQX": ["GitHub के साथ फिर से प्रमाणित करें"],
@@ -2538,6 +2558,7 @@
"Git इस फ़ोल्डर पर नज़र नहीं रख सकता — यह खाली है या इसमें केवल अनदेखी की गई फ़ाइलें हैं। जब तक आप कोई ट्रैक की गई दस्तावेज़ नहीं जोड़ते तब तक लिंक काम नहीं करेगा।"
],
"eiUA4k": [["count", "plural", { "one": ["#", " टिप्पणी"], "other": ["#", " टिप्पणियाँ"] }]],
+ "el2KyL": ["इस प्रोजेक्ट में Slidev मिला। डेक प्रोजेक्ट के संस्करण का उपयोग करेंगे।"],
"emgiet": ["आधिकारिक सामग्री; जहाँ भी संदर्भित हो वहाँ हूबहू प्रतिबिंबित।"],
"enPTnx": ["पंक्ति ", ["displayLine"]],
"eoEUI3": ["उस टिप्पणी को सुलझाया नहीं जा सका।"],
@@ -2549,6 +2570,7 @@
"evHlIg": ["Follow आपके स्थानीय बदलाव कभी नहीं भेजता या कमिट करता। वे केवल इसी मशीन पर रहते हैं।"],
"evs0iw": ["\"", ["tagListQuery"], "\" से मेल खाते टैग"],
"ezUmoU": ["अनुमत तत्व मान (खाली = कोई भी)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["ब्लॉक हिलाएँ"],
"f3Nvg7": [
["0"],
@@ -2700,6 +2722,7 @@
"hQjvzi": ["एक .zip या .skill संग्रह।"],
"hSBIG-": ["एक शीर्षक, विवरण, टैग — कुछ भी जो इस फ़ोल्डर का वर्णन करता हो।"],
"hSySVc": ["इंस्टॉल हैंडऑफ़ विफल: ", ["msg"]],
+ "hVAkI8": ["टर्मिनल में चलाएँ"],
"hXUWyd": ["मान आवश्यक है"],
"hXbSxc": ["एसेट: ", ["title"]],
"hY8pka": ["अगली घटना चुनें"],
@@ -2730,6 +2753,7 @@
"hxnF0I": [["0"], " प्रॉपर्टी"],
"hyCxJY": ["इसके बजाय वह वर्कट्री खोलें"],
"hynz2K": ["डाउनलोड शुरू हुआ"],
+ "hz076O": ["Slidev इंस्टॉल कमांड"],
"i-ShMB": ["आरेख"],
"i-wHEp": [
["boldName"],
@@ -3000,6 +3024,7 @@
"स्किल के भीतर का एक पथ — कोई भी फ़ोल्डर चलेगा (जैसे references/notes.md)। पथ के फ़ोल्डर आपके लिए बना दिए जाते हैं।"
],
"lPzyrU": ["सभी हंक सुलझा दिए गए"],
+ "lScd1O": ["Slidev डेक केवल OpenKnowledge डेस्कटॉप ऐप में खुलते हैं।"],
"lUtr1r": [["1"], " में से ", ["0"], " चुने गए"],
"lVWEIL": [["total"], " में से ", ["embedded"], " पेज अनुक्रमित।"],
"lWNpNB": ["CodeMirror के ज़रिए कर्सर जोड़ें या मेल खाती घटनाएँ चुनें।"],
@@ -3659,6 +3684,7 @@
"w3vFfL": ["Files छिपाएँ"],
"w4ZzmQ": ["एम्बेडिंग प्रदाता तक नहीं पहुँचा जा सका — फिर कोशिश करें"],
"w4hMYl": ["इस प्रोजेक्ट की ब्रांच स्थिति नहीं पढ़ी जा सकी। यह संवाद बंद करें और साझा लिंक फिर से खोलें।"],
+ "w52SKa": ["Slidev में खोलें"],
"w61W3L": [["0"], " हटाएँ"],
"w6sBjd": ["टर्मिनल सेटिंग अभी लोड नहीं हुईं — कुछ देर बाद फिर कोशिश करें"],
"w6sT-y": ["एजेंट के संपादन का अनुसरण करें"],
@@ -3680,6 +3706,7 @@
"wJo9oS": ["खोज बंद करें"],
"wQp1V3": ["<0>", ["src"], "</0> का मिरर"],
"wQvvZY": ["नई स्किल फ़ाइल"],
+ "wRni1Z": ["Slidev बंद करें"],
"wT4iQr": ["दृश्य-संपादक की खोज फैले हुए बदलें-नियंत्रणों के साथ खोलें।"],
"wTcjov": ["कोई कार्यक्षेत्र नहीं"],
"wU8WyK": ["तत्व फ़ील्ड"],
@@ -3764,6 +3791,7 @@
"xrVr_k": ["स्किल नहीं बनाई जा सकी: ", ["0"]],
"xsZhu-": ["पेज संख्या"],
"xtJgSe": ["इस स्रोत में कई स्किल हैं — आयात करने के लिए एक चुनें।"],
+ "xxRpzT": ["आपके सिस्टम पर Slidev मिला।"],
"xzAmL_": ["स्वत: स्वीकृत"],
"xzktOa": ["विकी लिंक संपादित करें"],
"y1eoq1": ["लिंक कॉपी करें"],
diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.po
index 3239406d9..5eaac6f36 100644
--- a/packages/app/src/locales/hi/messages.po
+++ b/packages/app/src/locales/hi/messages.po
@@ -2062,6 +2062,10 @@ msgstr "जाँचा जा रहा है"
msgid "Checking for agents"
msgstr "एजेंट खोजे जा रहे हैं"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Slidev खोजा जा रहा है"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "अपडेट देखे जा रहे हैं"
@@ -3230,6 +3234,10 @@ msgstr "टर्मिनल नहीं खोला जा सका — ट
msgid "Couldn't open the worktree. Try again."
msgstr "वर्कट्री नहीं खोला जा सका। फिर कोशिश करें।"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "इस दस्तावेज़ को Slidev में नहीं खोला जा सका।"
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "इस प्रोजेक्ट को प्रकाशन के लिए तैयार नहीं किया जा सका।"
@@ -3408,6 +3416,10 @@ msgstr "स्किल साझा नहीं की जा सकीं:
msgid "Couldn't start {0}: {1}"
msgstr "{0} शुरू नहीं हो सका: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Slidev शुरू नहीं किया जा सका।"
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "एजेंट थ्रेड शुरू नहीं किया जा सका — कृपया फिर कोशिश करें।"
@@ -3964,6 +3976,10 @@ msgstr "बाहरी लिंक पूर्वावलोकन अक्
msgid "Disable semantic search"
msgstr "अर्थ-आधारित खोज अक्षम करें"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Slidev बंद करें"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "वर्तनी जाँच बंद करें"
@@ -4464,6 +4480,10 @@ msgstr "प्लगइन सक्षम करें"
msgid "Enable semantic search"
msgstr "अर्थ-आधारित खोज सक्षम करें"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Slidev चालू करें"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "वर्तनी जाँच चालू करें"
@@ -4897,6 +4917,10 @@ msgstr "क्रम बदलने में विफल"
msgid "Failed to save content rules — {0}"
msgstr "सामग्री नियम सहेजने में विफल — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Slidev सेटिंग सहेजी नहीं जा सकी"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "स्कीमा फ़ील्ड सहेजने में विफल"
@@ -6288,11 +6312,11 @@ msgstr "लेआउट"
msgid "Layout options"
msgstr "लेआउट विकल्प"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "और जानें"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "{title} के बारे में और जानें"
@@ -7850,6 +7874,10 @@ msgstr "डिफ़ॉल्ट ऐप में खोलें"
msgid "Open in file manager"
msgstr "फ़ाइल प्रबंधक में खोलें"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Slidev में खोलें"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "वर्कट्री में खोलें"
@@ -8115,6 +8143,14 @@ msgstr "अन्य"
msgid "Other OK paths are tracked upstream:"
msgstr "अन्य OK पथ अपस्ट्रीम ट्रैक किए जाते हैं:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "इंस्टॉल करने के अन्य तरीके"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Slidev इंस्टॉल करने के अन्य तरीके"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "बाहर जाने वाले"
@@ -8455,6 +8491,14 @@ msgstr "साझा URL तैयार किया जा रहा है…
msgid "Preparing to uninstall OpenKnowledge"
msgstr "OpenKnowledge हटाने की तैयारी"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "किसी दस्तावेज़ को अलग विंडो में स्लाइड डेक के रूप में प्रस्तुत करें। दस्तावेज़ के frontmatter में <0>slides: true</0> जोड़ें, फिर उसे Slidev क्रिया से खोलें। रेंडरिंग Slidev CLI करता है, जिसे OpenKnowledge शामिल नहीं करता।"
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "किसी दस्तावेज़ को अलग विंडो में स्लाइड डेक के रूप में प्रस्तुत करें। यह केवल OpenKnowledge डेस्कटॉप ऐप में काम करता है और इसके लिए Slidev CLI चाहिए, जिसे आप अलग से इंस्टॉल करते हैं। चालू होने पर यह साइडबार में Plugins के अंतर्गत दिखता है।"
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "टैब उठाने के लिए Space दबाएँ। इसे टैब पट्टी में ले जाने के लिए तीर कुंजियों का उपयोग करें, फिर छोड़ने के लिए Space या Enter दबाएँ। विभाजित करने, बंद करने, पिन करने और अन्य टैब क्रियाओं वाला संदर्भ मेनू खोलने के लिए Shift+F10 या Menu कुंजी दबाएँ।"
@@ -9490,6 +9534,10 @@ msgstr "Problems पैनल से एक प्रोजेक्ट ऑड
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "OpenKnowledge के भीतर जुड़ा एक असली टर्मिनल चलाएँ, जो इस प्रोजेक्ट के फ़ोल्डर से शुरू होता है।"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "टर्मिनल में चलाएँ"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "इसे अपने टर्मिनल में चलाएँ"
@@ -10408,6 +10456,39 @@ msgstr "स्लैश कमांड मेन्यू"
msgid "Slash commands"
msgstr "स्लैश कमांड"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev इस दस्तावेज़ को रेंडर नहीं कर सका।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Slidev डेक केवल OpenKnowledge डेस्कटॉप ऐप में खुलते हैं।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "इस प्रोजेक्ट में Slidev मिला। डेक प्रोजेक्ट के संस्करण का उपयोग करेंगे।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "आपके सिस्टम पर Slidev मिला।"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Slidev इंस्टॉल कमांड"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev इंस्टॉल नहीं है, इसलिए Slidev क्रिया छिपी रहती है। इसे इंस्टॉल करें, फिर इस विंडो पर लौटें।"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev शुरू होने में बहुत समय लगा। फिर से कोशिश करें।"
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "छोटा अनुभाग शीर्षक।"
@@ -11512,6 +11593,10 @@ msgstr "यह {boldName} का पूर्वावलोकन है, ज
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "यह {boldName} का पूर्वावलोकन है। इसे अपने एजेंट में इंस्टॉल करें।"
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "यह Slidev का समर्थित संस्करण नहीं है।"
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "यह आइटम"
@@ -12367,6 +12452,10 @@ msgstr "आपकी स्वीकृति की प्रतीक्षा
msgid "Warning"
msgstr "चेतावनी"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "हम जाँच नहीं सके कि Slidev इंस्टॉल है या नहीं। पुनः प्रयास के लिए इस विंडो पर लौटें।"
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "हम आपका GitHub कनेक्शन नहीं जाँच सके।"
diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.json
index cb197449b..a6860f7ed 100644
--- a/packages/app/src/locales/id/messages.json
+++ b/packages/app/src/locales/id/messages.json
@@ -128,6 +128,7 @@
"1J0c0X": ["Masih tidak dapat menghubungi ", ["displayName"], ". Coba sekali lagi?"],
"1LtA5r": ["Menautkan keterampilan secara symlink ke ", ["path"]],
"1MGRQl": ["Sesi terminal"],
+ "1NgrlY": ["Cara lain untuk memasang"],
"1OKzC_": ["Laporan Anda tidak bisa dikirim. Coba lagi atau kirim lewat surel saja."],
"1QfxQT": ["Tutup"],
"1RluQD": ["Tampilkan penggantian"],
@@ -285,6 +286,9 @@
"45MZFs": ["Perintah"],
"484LKL": ["Hapus tautan"],
"494br3": ["Dibagikan dengan semua orang di proyek ini — disimpan di config.yml lewat git."],
+ "49Mb7P": [
+ "Kami tidak dapat memeriksa apakah Slidev terpasang. Kembali ke jendela ini untuk mencoba lagi."
+ ],
"4A3Yzu": ["Blok kode"],
"4BITzH": ["Galat:"],
"4CfgPM": ["Folder proyek dibuat, tetapi git init gagal. Coba lagi."],
@@ -1069,6 +1073,7 @@
],
"GK-IRZ": ["Tombol pembatalan dinonaktifkan — keadaan per sesi sudah dibersihkan dari memori."],
"GLxIKR": ["Cara push manual"],
+ "GMaDTM": ["Gagal menyimpan pengaturan Slidev"],
"GN6L5F": ["Nama berkas"],
"GNkUvW": ["Dalam antrean — dikirim saat proses ini selesai"],
"GQDSBN": ["Opsi tata letak"],
@@ -1137,6 +1142,9 @@
"HKH-W-": ["Data"],
"HM56Bx": ["Membuat..."],
"HPTPGr": ["Buat berkas spesifikasi baru untuk cerita pengguna saya"],
+ "HPaAxt": [
+ "Slidev belum terpasang, jadi aksi Slidev tetap tersembunyi. Pasang, lalu kembali ke jendela ini."
+ ],
"HSh8u_": ["Folder"],
"HTW0Zw": [
"Satu langkah lagi: jalankan <0>claude</0> di proyek ini dan setujui OpenKnowledge sekali."
@@ -1331,6 +1339,9 @@
"L1BQTH": [["0"], " belum terpasang — membuka halaman unduhannya."],
"L1ZE3M": ["Statistik dokumen"],
"L3CEC1": ["item ini"],
+ "L3w0_C": [
+ "Tampilkan dokumen sebagai dek slide di jendela tersendiri. Tambahkan <0>slides: true</0> ke frontmatter dokumen, lalu buka dengan aksi Slidev. Perenderan ditangani oleh CLI Slidev, yang tidak disertakan OpenKnowledge."
+ ],
"L4Cdd9": ["atau buat berkas baru <0/>"],
"L6Hhh6": ["(akar)"],
"L6Ud-t": ["Tidak dapat memuat konflik. Muat ulang untuk mencoba lagi."],
@@ -1387,6 +1398,7 @@
" dilacak di upstream. Lihat pesan di bawah."
],
"Llyqvo": ["Biasanya ini berarti salah satu dari:"],
+ "Lm3r51": ["Slidev tidak dapat merender dokumen ini."],
"LnVIW4": ["Gagal memulai proses masuk — coba lagi"],
"LpB85N": ["Polos"],
"LtI9AS": ["Pemilik"],
@@ -1524,6 +1536,8 @@
"Nay2Yr": ["Tidak ada agen yang cocok dengan pencarian Anda."],
"NcurBF": ["Geser ke bawah"],
"NeQ_0G": ["Kerjakan komentar-komentar ini"],
+ "NeY1Np": ["Slidev terlalu lama saat memulai. Coba lagi."],
+ "NfraGd": ["Cara lain untuk memasang Slidev"],
"NgZwB0": [["enabledCount"], "/", ["0"], " aktif"],
"NjrIak": ["Berkas: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["Sunting ", ["tag"]],
@@ -1613,6 +1627,9 @@
"OxplNM": ["\"", ["0"], "\" diperbarui: ", ["1"], " ditambahkan, ", ["2"], " dihapus"],
"Oxyd5f": ["Pilih sebuah nama"],
"OyIC0Q": ["Nama proyek"],
+ "Ozyht_": [
+ "Tampilkan dokumen sebagai dek slide di jendela tersendiri. Hanya berfungsi di aplikasi desktop OpenKnowledge dan memerlukan CLI Slidev yang dipasang terpisah. Saat aktif, muncul di Plugins pada bilah sisi."
+ ],
"P-ye9o": ["Pemilih folder tidak dapat dibuka"],
"P0HC30": [["targetNoun"], " ini pindah ke <0>", ["0"], "</0>. Buka di sana?"],
"P3NS4G": ["Galat sintaks pola (baris ", ["lineNumber"], "): ", ["message"]],
@@ -1621,6 +1638,7 @@
"P47EWZ": ["Pengaturan bilah sisi tidak dapat diperbarui"],
"P6gXB-": ["Ganti ", ["keyName"]],
"P6lAT3": ["Folder tujuan: ", ["linkTitle"], ". Klik untuk membuka ikhtisarnya."],
+ "P8AnMN": ["Mencari Slidev"],
"PB4upl": ["Cari kecocokan sebelumnya"],
"PBwmDJ": ["Mencari berdasarkan makna"],
"PBxg_E": ["Nanti saja"],
@@ -1843,6 +1861,7 @@
"T0OVm7": ["Cabang bawaannya terlindungi — push memerlukan pull request."],
"T3Mld1": ["Jendela"],
"T3j-7o": ["mis. Berpindah proyek saat sinkronisasi sedang berjalan"],
+ "TBfy1C": ["Tidak dapat menjalankan Slidev."],
"TDeOpa": [
"Membatalkan atau mengulangi suntingan Anda sendiri, tanpa mengusik suntingan kolaborator dan agen."
],
@@ -1854,6 +1873,7 @@
"TQJCR6": [["0", "plural", { "other": ["#", " hasil"] }]],
"TTDXD8": ["Worktree baru…"],
"TUzThQ": ["Bagikan keterampilan"],
+ "T_j5G0": ["Ini bukan versi Slidev yang didukung."],
"T_wG4n": ["Kami tidak bisa memeriksa koneksi GitHub Anda."],
"Ta25TG": ["Belum ada riwayat"],
"TbjyhA": ["Dokumen"],
@@ -1954,6 +1974,7 @@
"Ugvy4O": ["Bentangkan semua grup berkas"],
"UhpfxY": ["Geser ke kiri"],
"UkQGhd": ["Sembunyikan penggantian"],
+ "UlVARL": ["Aktifkan Slidev"],
"Uobeu9": ["Menambahkan keterampilan ke ", ["rootRel"], " — juga dibaca oleh ", ["0"]],
"Uoux8m": ["Sertakan komentar ini pada pengiriman berikutnya"],
"Up2_7p": ["Salin jalur lengkap"],
@@ -2094,6 +2115,7 @@
"X0ttSN": ["Tidak ada tag yang cocok dengan \"", ["tagListQuery"], "\"."],
"X2zUS5": ["Hapus komentar ini"],
"X3MMeA": ["Tidak satu pun masalah ini punya perbaikan otomatis."],
+ "X59Fx2": ["Tidak dapat membuka dokumen ini di Slidev."],
"X7ShnN": ["Buka panel agen"],
"X7u0xR": [["0"], " templat tersedia"],
"X8kjQX": ["Autentikasi ulang dengan GitHub"],
@@ -2652,6 +2674,7 @@
"Git tidak bisa melacak folder ini — folder ini kosong atau hanya berisi berkas yang diabaikan. Tautannya tidak akan berfungsi sampai Anda menambahkan dokumen yang dilacak."
],
"eiUA4k": [["count", "plural", { "other": ["#", " komentar"] }]],
+ "el2KyL": ["Slidev ditemukan di proyek ini. Dek akan memakai versi proyek."],
"emgiet": ["Konten otoritatif; dicerminkan apa adanya di mana pun ia dirujuk."],
"enPTnx": ["baris ", ["displayLine"]],
"eoEUI3": ["Komentar itu tidak bisa diselesaikan."],
@@ -2665,6 +2688,7 @@
],
"evs0iw": ["Tag yang cocok dengan \"", ["tagListQuery"], "\""],
"ezUmoU": ["Nilai elemen yang diizinkan (kosong = apa saja)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["Pindahkan blok"],
"f3Nvg7": [
["0"],
@@ -2834,6 +2858,7 @@
"hQjvzi": ["Arsip .zip atau .skill."],
"hSBIG-": ["Judul, deskripsi, tag — apa saja yang menggambarkan folder ini."],
"hSySVc": ["Serah terima pemasangan gagal: ", ["msg"]],
+ "hVAkI8": ["Jalankan di terminal"],
"hXUWyd": ["Nilai wajib diisi"],
"hXbSxc": ["Aset: ", ["title"]],
"hY8pka": ["Pilih kemunculan berikutnya"],
@@ -2868,6 +2893,7 @@
"hxnF0I": ["Properti ", ["0"]],
"hyCxJY": ["Buka worktree itu saja"],
"hynz2K": ["Unduhan dimulai"],
+ "hz076O": ["Perintah pemasangan Slidev"],
"i-ShMB": ["Diagram"],
"i-wHEp": [
"Menyunting ",
@@ -3150,6 +3176,7 @@
"Sebuah jalur di dalam keterampilan — folder apa pun bisa (mis. references/notes.md). Folder pada jalur itu dibuatkan untuk Anda."
],
"lPzyrU": ["Semua bagian sudah diselesaikan"],
+ "lScd1O": ["Dek Slidev hanya terbuka di aplikasi desktop OpenKnowledge."],
"lUtr1r": [["0"], " dari ", ["1"], " dipilih"],
"lVWEIL": [["embedded"], " dari ", ["total"], " halaman terindeks."],
"lWNpNB": ["Menambahkan kursor atau memilih kemunculan yang cocok lewat CodeMirror."],
@@ -3843,6 +3870,7 @@
"w4hMYl": [
"Keadaan cabang untuk proyek ini tidak dapat dibaca. Tutup dialog ini dan buka lagi tautan berbaginya."
],
+ "w52SKa": ["Buka di Slidev"],
"w61W3L": ["Hapus ", ["0"]],
"w6sBjd": ["Pengaturan terminal belum dimuat — coba lagi sebentar"],
"w6sT-y": ["Ikuti suntingan agen"],
@@ -3864,6 +3892,7 @@
"wJo9oS": ["Tutup pencarian"],
"wQp1V3": ["Cermin dari <0>", ["src"], "</0>"],
"wQvvZY": ["Berkas keterampilan baru"],
+ "wRni1Z": ["Nonaktifkan Slidev"],
"wT4iQr": ["Membuka pencarian penyunting visual dengan kendali penggantian terbentang."],
"wTcjov": ["Tanpa ruang kerja"],
"wU8WyK": ["Bidang elemen"],
@@ -3949,6 +3978,7 @@
"xrVr_k": ["Keterampilan tidak bisa dibuat: ", ["0"]],
"xsZhu-": ["Nomor halaman"],
"xtJgSe": ["Sumber ini memuat beberapa keterampilan — pilih yang akan diimpor."],
+ "xxRpzT": ["Slidev ditemukan di sistem Anda."],
"xzAmL_": ["Disetujui otomatis"],
"xzktOa": ["Sunting tautan wiki"],
"y1eoq1": ["Salin tautan"],
diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.po
index 48112acdd..fbc599f37 100644
--- a/packages/app/src/locales/id/messages.po
+++ b/packages/app/src/locales/id/messages.po
@@ -2062,6 +2062,10 @@ msgstr "Memeriksa"
msgid "Checking for agents"
msgstr "Mencari agen"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Mencari Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "Memeriksa pembaruan"
@@ -3230,6 +3234,10 @@ msgstr "Terminal tidak bisa dibuka — komentarnya masih menunggu dikirim."
msgid "Couldn't open the worktree. Try again."
msgstr "Worktree-nya tidak bisa dibuka. Coba lagi."
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "Tidak dapat membuka dokumen ini di Slidev."
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "Tidak dapat menyiapkan proyek ini untuk diterbitkan."
@@ -3408,6 +3416,10 @@ msgstr "Keterampilan tidak bisa dibagikan: galat internal. Silakan mulai ulang a
msgid "Couldn't start {0}: {1}"
msgstr "Tidak dapat menjalankan {0}: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Tidak dapat menjalankan Slidev."
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "Utas agen tidak bisa dimulai — silakan coba lagi."
@@ -3964,6 +3976,10 @@ msgstr "Nonaktifkan pratinjau tautan eksternal"
msgid "Disable semantic search"
msgstr "Nonaktifkan pencarian semantik"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Nonaktifkan Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "Nonaktifkan pemeriksa ejaan"
@@ -4464,6 +4480,10 @@ msgstr "Aktifkan plugin"
msgid "Enable semantic search"
msgstr "Aktifkan pencarian semantik"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Aktifkan Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "Aktifkan pemeriksa ejaan"
@@ -4897,6 +4917,10 @@ msgstr "Gagal menata ulang"
msgid "Failed to save content rules — {0}"
msgstr "Gagal menyimpan aturan konten — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Gagal menyimpan pengaturan Slidev"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "Gagal menyimpan bidang skema"
@@ -6288,11 +6312,11 @@ msgstr "Tata letak"
msgid "Layout options"
msgstr "Opsi tata letak"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "Pelajari lebih lanjut"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "Pelajari lebih lanjut tentang {title}"
@@ -7850,6 +7874,10 @@ msgstr "Buka di aplikasi bawaan"
msgid "Open in file manager"
msgstr "Buka di pengelola berkas"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Buka di Slidev"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "Buka di worktree"
@@ -8115,6 +8143,14 @@ msgstr "Lainnya"
msgid "Other OK paths are tracked upstream:"
msgstr "Ada jalur OK lain yang dilacak di remote:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "Cara lain untuk memasang"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Cara lain untuk memasang Slidev"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "Keluar"
@@ -8455,6 +8491,14 @@ msgstr "Menyiapkan URL berbagi..."
msgid "Preparing to uninstall OpenKnowledge"
msgstr "Bersiap mencopot OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "Tampilkan dokumen sebagai dek slide di jendela tersendiri. Tambahkan <0>slides: true</0> ke frontmatter dokumen, lalu buka dengan aksi Slidev. Perenderan ditangani oleh CLI Slidev, yang tidak disertakan OpenKnowledge."
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "Tampilkan dokumen sebagai dek slide di jendela tersendiri. Hanya berfungsi di aplikasi desktop OpenKnowledge dan memerlukan CLI Slidev yang dipasang terpisah. Saat aktif, muncul di Plugins pada bilah sisi."
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "Tekan Spasi untuk mengambil tab. Gunakan tombol panah untuk memindahkannya di dalam bilah tab, lalu tekan Spasi atau Enter untuk melepaskannya. Tekan Shift+F10 atau tombol Menu untuk membuka menu konteks tab, yang berisi tindakan pisah, tutup, sematkan, dan lainnya."
@@ -9490,6 +9534,10 @@ msgstr "Jalankan audit proyek dari panel Masalah."
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "Jalankan terminal sungguhan yang tertambat di dalam OpenKnowledge, dimulai di folder proyek ini."
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "Jalankan di terminal"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "Jalankan ini di terminal Anda"
@@ -10408,6 +10456,39 @@ msgstr "Menu perintah garis miring"
msgid "Slash commands"
msgstr "Perintah garis miring"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev tidak dapat merender dokumen ini."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Dek Slidev hanya terbuka di aplikasi desktop OpenKnowledge."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "Slidev ditemukan di proyek ini. Dek akan memakai versi proyek."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "Slidev ditemukan di sistem Anda."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Perintah pemasangan Slidev"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev belum terpasang, jadi aksi Slidev tetap tersembunyi. Pasang, lalu kembali ke jendela ini."
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev terlalu lama saat memulai. Coba lagi."
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "Judul bagian kecil."
@@ -11512,6 +11593,10 @@ msgstr "Ini pratinjau {boldName}, terdeteksi di {boldHarness} pada tingkat {bold
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "Ini pratinjau {boldName}. Pasang ke agen Anda."
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "Ini bukan versi Slidev yang didukung."
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "item ini"
@@ -12367,6 +12452,10 @@ msgstr "Menunggu persetujuan Anda"
msgid "Warning"
msgstr "Peringatan"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "Kami tidak dapat memeriksa apakah Slidev terpasang. Kembali ke jendela ini untuk mencoba lagi."
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "Kami tidak bisa memeriksa koneksi GitHub Anda."
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index 018853d25..e517c324c 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -130,6 +130,7 @@
"1J0c0X": ["Śţĩĺĺ ćōũĺďń'ţ ŕēàćĥ ", ["displayName"], " — ţŕŷ ōńē ḿōŕē ţĩḿē?"],
"1LtA5r": ["Śŷḿĺĩńķś ţĥē śķĩĺĺ ţō ", ["path"]],
"1MGRQl": ["Ţēŕḿĩńàĺ śēśśĩōńś"],
+ "1NgrlY": ["Ōţĥēŕ ŵàŷś ţō ĩńśţàĺĺ"],
"1OKzC_": ["Ŷōũŕ ŕēƥōŕţ ćōũĺďń'ţ ƀē śēńţ. Ţŕŷ àĝàĩń ōŕ ēḿàĩĺ ĩţ ĩńśţēàď."],
"1QfxQT": ["Ďĩśḿĩśś"],
"1RluQD": ["Śĥōŵ ŕēƥĺàćē"],
@@ -294,6 +295,7 @@
"45MZFs": ["Ćōḿḿàńďś"],
"484LKL": ["Ŕēḿōvē ĺĩńķ"],
"494br3": ["Śĥàŕēď ŵĩţĥ ēvēŕŷōńē ōń ţĥĩś ƥŕōĴēćţ — ćōḿḿĩţţēď ţō ćōńƒĩĝ.ŷḿĺ vĩà ĝĩţ."],
+ "49Mb7P": ["Ŵē ćōũĺďń'ţ ćĥēćķ ŵĥēţĥēŕ Śĺĩďēv ĩś ĩńśţàĺĺēď. Ŕēţũŕń ţō ţĥĩś ŵĩńďōŵ ţō ŕēţŕŷ."],
"4A3Yzu": ["Ćōďē ƀĺōćķ"],
"4BITzH": ["Ēŕŕōŕ:"],
"4CfgPM": ["ƤŕōĴēćţ ƒōĺďēŕ ćŕēàţēď, ƀũţ ĝĩţ ĩńĩţ ƒàĩĺēď. Ţŕŷ àĝàĩń."],
@@ -1085,6 +1087,7 @@
],
"GK-IRZ": ["Ũńďō ƀũţţōńś àŕē ďĩśàƀĺēď — ƥēŕ-śēśśĩōń śţàţē ĥàś ƀēēń ĝàŕƀàĝē-ćōĺĺēćţēď."],
"GLxIKR": ["Ĥōŵ ţō ƥũśĥ ḿàńũàĺĺŷ"],
+ "GMaDTM": ["Ƒàĩĺēď ţō śàvē Śĺĩďēv śēţţĩńĝ"],
"GN6L5F": ["Ƒĩĺēńàḿē"],
"GNkUvW": ["Ǫũēũēď — śēńďś ŵĥēń ţĥĩś ŕũń ƒĩńĩśĥēś"],
"GQDSBN": ["Ĺàŷōũţ ōƥţĩōńś"],
@@ -1149,6 +1152,9 @@
"HKH-W-": ["Ďàţà"],
"HM56Bx": ["Ćŕēàţĩńĝ..."],
"HPTPGr": ["Ćŕēàţē à ńēŵ śƥēć ƒĩĺē ƒōŕ ḿŷ ũśēŕ śţōŕŷ"],
+ "HPaAxt": [
+ "Śĺĩďēv ĩśń'ţ ĩńśţàĺĺēď, śō ţĥē Śĺĩďēv àćţĩōń śţàŷś ĥĩďďēń. Ĩńśţàĺĺ ĩţ, ţĥēń ŕēţũŕń ţō ţĥĩś ŵĩńďōŵ."
+ ],
"HSh8u_": ["Ƒōĺďēŕś"],
"HTW0Zw": ["Ōńē ḿōŕē śţēƥ: ŕũń <0>ćĺàũďē</0> ĩń ţĥĩś ƥŕōĴēćţ àńď àƥƥŕōvē ŌƥēńĶńōŵĺēďĝē ōńćē."],
"HbcQYf": [
@@ -1330,6 +1336,9 @@
"L1BQTH": [["0"], " ĩśń'ţ ĩńśţàĺĺēď ŷēţ — ōƥēńĩńĝ ĩţś ďōŵńĺōàď ƥàĝē."],
"L1ZE3M": ["Ďōćũḿēńţ śţàţĩśţĩćś"],
"L3CEC1": ["ţĥĩś ĩţēḿ"],
+ "L3w0_C": [
+ "Ƥŕēśēńţ à ďōćũḿēńţ àś à śĺĩďē ďēćķ ĩń ĩţś ōŵń ŵĩńďōŵ. Àďď <0>śĺĩďēś: ţŕũē</0> ţō à ďōćũḿēńţ'ś ƒŕōńţḿàţţēŕ, ţĥēń ōƥēń ĩţ ŵĩţĥ ţĥē Śĺĩďēv àćţĩōń. Ŕēńďēŕĩńĝ ĩś ĥàńďĺēď ƀŷ ţĥē Śĺĩďēv ĆĹĨ, ŵĥĩćĥ ŌƥēńĶńōŵĺēďĝē ďōēś ńōţ ƀũńďĺē."
+ ],
"L4Cdd9": ["ōŕ ćŕēàţē à ńēŵ ƒĩĺē <0/>"],
"L6Hhh6": ["(ŕōōţ)"],
"L6Ud-t": ["Ćōũĺďń'ţ ĺōàď ćōńƒĺĩćţś — ŕēĺōàď ţō ŕēţŕŷ."],
@@ -1385,6 +1394,7 @@
" ţŕàćķēď ũƥśţŕēàḿ — śēē ḿēśśàĝē ƀēĺōŵ."
],
"Llyqvo": ["Ţĥĩś ũśũàĺĺŷ ḿēàńś ōńē ōƒ:"],
+ "Lm3r51": ["Śĺĩďēv ćōũĺďń'ţ ŕēńďēŕ ţĥĩś ďōćũḿēńţ."],
"LnVIW4": ["Ƒàĩĺēď ţō śţàŕţ śĩĝń-ĩń — ţŕŷ àĝàĩń"],
"LpB85N": ["Ƥĺàĩń"],
"LtI9AS": ["Ōŵńēŕ"],
@@ -1530,6 +1540,8 @@
"Nay2Yr": ["Ńō àĝēńţś ḿàţćĥ ŷōũŕ śēàŕćĥ."],
"NcurBF": ["Ƥàń ďōŵń"],
"NeQ_0G": ["Ŵōŕķ ţĥŕōũĝĥ ţĥēśē ćōḿḿēńţś"],
+ "NeY1Np": ["Śĺĩďēv ţĩḿēď ōũţ ŵĥĩĺē śţàŕţĩńĝ. Ţŕŷ àĝàĩń."],
+ "NfraGd": ["Ōţĥēŕ ŵàŷś ţō ĩńśţàĺĺ Śĺĩďēv"],
"NgZwB0": [["enabledCount"], "/", ["0"], " ōń"],
"NjrIak": ["Ƒĩĺē: <0>", ["fixedName"], ".ḿď</0>"],
"NkNfSr": ["Ēďĩţ ", ["tag"]],
@@ -1617,6 +1629,9 @@
"OxplNM": ["Ũƥďàţēď \"", ["0"], "\": àďďēď ", ["1"], ", ŕēḿōvēď ", ["2"]],
"Oxyd5f": ["Ƥĩćķ à ńàḿē"],
"OyIC0Q": ["ƤŕōĴēćţ ńàḿē"],
+ "Ozyht_": [
+ "Ƥŕēśēńţ à ďōćũḿēńţ àś à śĺĩďē ďēćķ ĩń ĩţś ōŵń ŵĩńďōŵ. Ŵōŕķś ĩń ţĥē ŌƥēńĶńōŵĺēďĝē ďēśķţōƥ àƥƥ ōńĺŷ, àńď ńēēďś ţĥē Śĺĩďēv ĆĹĨ, ŵĥĩćĥ ŷōũ ĩńśţàĺĺ śēƥàŕàţēĺŷ. Ŵĥēń ōń, ĩţ àƥƥēàŕś ũńďēŕ Ƥĺũĝĩńś ĩń ţĥē śĩďēƀàŕ."
+ ],
"P-ye9o": ["Ćōũĺď ńōţ ōƥēń ƒōĺďēŕ ƥĩćķēŕ"],
"P0HC30": ["Ţĥĩś ", ["targetNoun"], " ḿōvēď ţō <0>", ["0"], "</0>. Ōƥēń ĩţ ţĥēŕē?"],
"P3NS4G": ["Ƥàţţēŕń śŷńţàx ēŕŕōŕ (ĺĩńē ", ["lineNumber"], "): ", ["message"]],
@@ -1625,6 +1640,7 @@
"P47EWZ": ["Ćōũĺď ńōţ ũƥďàţē śĩďēƀàŕ śēţţĩńĝś"],
"P6gXB-": ["Ŕēƥĺàćē ", ["keyName"]],
"P6lAT3": ["Ƒōĺďēŕ ţàŕĝēţ: ", ["linkTitle"], ". Ćĺĩćķ ţō ōƥēń ţĥē ōvēŕvĩēŵ."],
+ "P8AnMN": ["Ćĥēćķĩńĝ ƒōŕ Śĺĩďēv"],
"PB4upl": ["Ƒĩńď ƥŕēvĩōũś ḿàţćĥ"],
"PBwmDJ": ["Śēàŕćĥĩńĝ ƀŷ ḿēàńĩńĝ"],
"PBxg_E": ["Ńōţ ńōŵ"],
@@ -1853,6 +1869,7 @@
"T0OVm7": ["Ţĥē ďēƒàũĺţ ƀŕàńćĥ ĩś ƥŕōţēćţēď — ƥũśĥēś ńēēď à ƥũĺĺ ŕēǫũēśţ."],
"T3Mld1": ["Ŵĩńďōŵ"],
"T3j-7o": ["ē.ĝ. Śŵĩţćĥĩńĝ ƥŕōĴēćţś ŵĥĩĺē à śŷńć ŵàś ŕũńńĩńĝ"],
+ "TBfy1C": ["Ćōũĺďń'ţ śţàŕţ Śĺĩďēv."],
"TDeOpa": [
"Ũńďō ōŕ ŕēďō ŷōũŕ ōŵń ēďĩţś, ĺēàvĩńĝ ēďĩţś ƒŕōḿ ćōĺĺàƀōŕàţōŕś àńď àĝēńţś ĩń ƥĺàćē."
],
@@ -1864,6 +1881,7 @@
"TQJCR6": [["0", "plural", { "one": ["#", " ŕēśũĺţ"], "other": ["#", " ŕēśũĺţś"] }]],
"TTDXD8": ["Ńēŵ ŵōŕķţŕēē…"],
"TUzThQ": ["Śĥàŕē śķĩĺĺś"],
+ "T_j5G0": ["Ţĥĩś ĩśń'ţ à śũƥƥōŕţēď vēŕśĩōń ōƒ Śĺĩďēv."],
"T_wG4n": ["Ŵē ćōũĺďń'ţ ćĥēćķ ŷōũŕ ĜĩţĤũƀ ćōńńēćţĩōń."],
"Ta25TG": ["Ńō ĥĩśţōŕŷ ŷēţ"],
"TbjyhA": ["Ďōćś"],
@@ -1965,6 +1983,7 @@
"Ugvy4O": ["Ēxƥàńď àĺĺ ƒĩĺē ĝŕōũƥś"],
"UhpfxY": ["Ƥàń ĺēƒţ"],
"UkQGhd": ["Ĥĩďē ŕēƥĺàćē"],
+ "UlVARL": ["Ēńàƀĺē Śĺĩďēv"],
"Uobeu9": ["Àďďś ţĥē śķĩĺĺ ţō ", ["rootRel"], " — àĺśō ŕēàď ƀŷ ", ["0"]],
"Uoux8m": ["Ĩńćĺũďē ţĥĩś ćōḿḿēńţ ĩń ţĥē ńēxţ śēńď"],
"Up2_7p": ["Ćōƥŷ ƒũĺĺ ƥàţĥ"],
@@ -2092,6 +2111,7 @@
"X0ttSN": ["Ńō ţàĝś ḿàţćĥ \"", ["tagListQuery"], "\"."],
"X2zUS5": ["Ďēĺēţē ţĥĩś ćōḿḿēńţ"],
"X3MMeA": ["Ńōńē ōƒ ţĥēśē ƥŕōƀĺēḿś ĥàvē àń àũţōḿàţĩć ƒĩx."],
+ "X59Fx2": ["Ćōũĺďń'ţ ōƥēń ţĥĩś ďōćũḿēńţ ĩń Śĺĩďēv."],
"X7ShnN": ["Ōƥēń àĝēńţś ƥàńēĺ"],
"X7u0xR": [["0"], " ţēḿƥĺàţēś àvàĩĺàƀĺē"],
"X8kjQX": ["Ŕē-àũţĥēńţĩćàţē ŵĩţĥ ĜĩţĤũƀ"],
@@ -2637,6 +2657,7 @@
"Ĝĩţ ćàń'ţ ţŕàćķ ţĥĩś ƒōĺďēŕ — ĩţ'ś ēḿƥţŷ ōŕ ćōńţàĩńś ōńĺŷ ĩĝńōŕēď ƒĩĺēś. Ţĥē ĺĩńķ ŵōń'ţ ŵōŕķ ũńţĩĺ ŷōũ àďď à ţŕàćķēď ďōćũḿēńţ."
],
"eiUA4k": [["count", "plural", { "one": ["#", " ćōḿḿēńţ"], "other": ["#", " ćōḿḿēńţś"] }]],
+ "el2KyL": ["Śĺĩďēv ƒōũńď ĩń ţĥĩś ƥŕōĴēćţ. Ďēćķś ŵĩĺĺ ũśē ţĥē ƥŕōĴēćţ'ś vēŕśĩōń."],
"emgiet": ["Àũţĥōŕĩţàţĩvē ćōńţēńţ; ḿĩŕŕōŕēď vēŕƀàţĩḿ ēvēŕŷŵĥēŕē ĩţ'ś ŕēƒēŕēńćēď."],
"enPTnx": ["ĺĩńē ", ["displayLine"]],
"eoEUI3": ["Ćōũĺďń'ţ ŕēśōĺvē ţĥàţ ćōḿḿēńţ."],
@@ -2650,6 +2671,7 @@
],
"evs0iw": ["Ţàĝś ḿàţćĥĩńĝ \"", ["tagListQuery"], "\""],
"ezUmoU": ["Àĺĺōŵēď ēĺēḿēńţ vàĺũēś (ēḿƥţŷ = àńŷ)"],
+ "f14doC": ["Śĺĩďēv"],
"f1XQyZ": ["Ḿōvē ƀĺōćķ"],
"f3Nvg7": [
["0"],
@@ -2811,6 +2833,7 @@
"hQjvzi": ["À .źĩƥ ōŕ .śķĩĺĺ àŕćĥĩvē."],
"hSBIG-": ["À ţĩţĺē, ďēśćŕĩƥţĩōń, ţàĝś — àńŷţĥĩńĝ ţĥàţ ďēśćŕĩƀēś ţĥĩś ƒōĺďēŕ."],
"hSySVc": ["Ĩńśţàĺĺ ĥàńďōƒƒ ƒàĩĺēď: ", ["msg"]],
+ "hVAkI8": ["Ŕũń ĩń ţēŕḿĩńàĺ"],
"hXUWyd": ["Vàĺũē ĩś ŕēǫũĩŕēď"],
"hXbSxc": ["Àśśēţ: ", ["title"]],
"hY8pka": ["Śēĺēćţ ńēxţ ōććũŕŕēńćē"],
@@ -2841,6 +2864,7 @@
"hxnF0I": [["0"], " Ƥŕōƥēŕţĩēś"],
"hyCxJY": ["Ōƥēń ţĥàţ ŵōŕķţŕēē ĩńśţēàď"],
"hynz2K": ["Ďōŵńĺōàď śţàŕţēď"],
+ "hz076O": ["Śĺĩďēv ĩńśţàĺĺ ćōḿḿàńď"],
"i-ShMB": ["Ďĩàĝŕàḿ"],
"i-wHEp": ["Ēďĩţĩńĝ ", ["boldName"], " ĩń ƥĺàćē. Ćĥàńĝēś śàvē śţŕàĩĝĥţ ţō ŷōũŕ ēďĩţōŕ'ś ćōƥŷ."],
"i09An-": ["Ŕēśţōŕēď àń ēàŕĺĩēŕ vēŕśĩōń (", ["0"], ")"],
@@ -3112,6 +3136,7 @@
"À ƥàţĥ ĩńśĩďē ţĥē śķĩĺĺ — àńŷ ƒōĺďēŕ ŵōŕķś (ē.ĝ. ŕēƒēŕēńćēś/ńōţēś.ḿď). Ƒōĺďēŕś ĩń ţĥē ƥàţĥ àŕē ćŕēàţēď ƒōŕ ŷōũ."
],
"lPzyrU": ["Àĺĺ ĥũńķś ŕēśōĺvēď"],
+ "lScd1O": ["Śĺĩďēv ďēćķś ōƥēń ĩń ţĥē ŌƥēńĶńōŵĺēďĝē ďēśķţōƥ àƥƥ ōńĺŷ."],
"lUtr1r": [["0"], " ōƒ ", ["1"], " śēĺēćţēď"],
"lVWEIL": ["Ĩńďēxēď ", ["embedded"], " ōƒ ", ["total"], " ƥàĝēś."],
"lWNpNB": ["Àďď ćũŕśōŕś ōŕ śēĺēćţ ḿàţćĥĩńĝ ōććũŕŕēńćēś ţĥŕōũĝĥ ĆōďēḾĩŕŕōŕ."],
@@ -3804,6 +3829,7 @@
"w4hMYl": [
"Ćōũĺď ńōţ ŕēàď ƀŕàńćĥ śţàţē ƒōŕ ţĥĩś ƥŕōĴēćţ. Ćĺōśē ţĥĩś ďĩàĺōĝ àńď ōƥēń ţĥē śĥàŕē ĺĩńķ àĝàĩń."
],
+ "w52SKa": ["Ōƥēń ĩń Śĺĩďēv"],
"w61W3L": ["Ŕēḿōvē ", ["0"]],
"w6sBjd": ["Ţēŕḿĩńàĺ śēţţĩńĝś ńōţ ŷēţ ĺōàďēď — ţŕŷ àĝàĩń ĩń à ḿōḿēńţ"],
"w6sT-y": ["Ƒōĺĺōŵ ţĥē àĝēńţ'ś ēďĩţś"],
@@ -3825,6 +3851,7 @@
"wJo9oS": ["Ćĺōśē ƒĩńď"],
"wQp1V3": ["Ḿĩŕŕōŕ ōƒ <0>", ["src"], "</0>"],
"wQvvZY": ["Ńēŵ śķĩĺĺ ƒĩĺē"],
+ "wRni1Z": ["Ďĩśàƀĺē Śĺĩďēv"],
"wT4iQr": ["Ōƥēń vĩśũàĺ-ēďĩţōŕ ƒĩńď ŵĩţĥ ŕēƥĺàćē ćōńţŕōĺś ēxƥàńďēď."],
"wTcjov": ["Ńō ŵōŕķśƥàćē"],
"wU8WyK": ["Ēĺēḿēńţ ƒĩēĺďś"],
@@ -3911,6 +3938,7 @@
"xrVr_k": ["Ćōũĺďń'ţ ćŕēàţē śķĩĺĺ: ", ["0"]],
"xsZhu-": ["Ƥàĝē ńũḿƀēŕ"],
"xtJgSe": ["Ţĥĩś śōũŕćē ƀũńďĺēś śēvēŕàĺ śķĩĺĺś — ćĥōōśē ţĥē ōńē ţō ĩḿƥōŕţ."],
+ "xxRpzT": ["Śĺĩďēv ƒōũńď ōń ŷōũŕ śŷśţēḿ."],
"xzAmL_": ["Àũţō-àƥƥŕōvēď"],
"xzktOa": ["Ēďĩţ ŵĩķĩ ĺĩńķ"],
"y1eoq1": ["Ćōƥŷ ĺĩńķ"],
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 7e5d2c93f..eca3cc24f 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -2062,6 +2062,10 @@ msgstr ""
msgid "Checking for agents"
msgstr ""
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr ""
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr ""
@@ -3230,6 +3234,10 @@ msgstr ""
msgid "Couldn't open the worktree. Try again."
msgstr ""
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr ""
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr ""
@@ -3408,6 +3416,10 @@ msgstr ""
msgid "Couldn't start {0}: {1}"
msgstr ""
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr ""
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr ""
@@ -3964,6 +3976,10 @@ msgstr ""
msgid "Disable semantic search"
msgstr ""
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr ""
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr ""
@@ -4464,6 +4480,10 @@ msgstr ""
msgid "Enable semantic search"
msgstr ""
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr ""
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr ""
@@ -4897,6 +4917,10 @@ msgstr ""
msgid "Failed to save content rules — {0}"
msgstr ""
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr ""
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr ""
@@ -6288,11 +6312,11 @@ msgstr ""
msgid "Layout options"
msgstr ""
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr ""
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr ""
@@ -7850,6 +7874,10 @@ msgstr ""
msgid "Open in file manager"
msgstr ""
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr ""
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr ""
@@ -8115,6 +8143,14 @@ msgstr ""
msgid "Other OK paths are tracked upstream:"
msgstr ""
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr ""
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr ""
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr ""
@@ -8455,6 +8491,14 @@ msgstr ""
msgid "Preparing to uninstall OpenKnowledge"
msgstr ""
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr ""
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr ""
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr ""
@@ -9490,6 +9534,10 @@ msgstr ""
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr ""
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr ""
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr ""
@@ -10408,6 +10456,39 @@ msgstr ""
msgid "Slash commands"
msgstr ""
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr ""
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr ""
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr ""
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr ""
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr ""
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr ""
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr ""
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr ""
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr ""
@@ -11512,6 +11593,10 @@ msgstr ""
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr ""
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr ""
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr ""
@@ -12367,6 +12452,10 @@ msgstr ""
msgid "Warning"
msgstr ""
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr ""
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr ""
diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.json
index bbceb5613..abf1f114b 100644
--- a/packages/app/src/locales/pt-BR/messages.json
+++ b/packages/app/src/locales/pt-BR/messages.json
@@ -146,6 +146,7 @@
"1J0c0X": ["Ainda não foi possível acessar ", ["displayName"], ". Tentar mais uma vez?"],
"1LtA5r": ["Cria um link simbólico da habilidade para ", ["path"]],
"1MGRQl": ["Sessões de terminal"],
+ "1NgrlY": ["Outras formas de instalar"],
"1OKzC_": ["Não foi possível enviar seu relatório. Tente de novo ou mande por e-mail."],
"1QfxQT": ["Dispensar"],
"1RluQD": ["Mostrar substituir"],
@@ -341,6 +342,9 @@
"45MZFs": ["Comandos"],
"484LKL": ["Remover o link"],
"494br3": ["Compartilhado com todo mundo neste projeto — salvo no config.yml pelo git."],
+ "49Mb7P": [
+ "Não foi possível verificar se o Slidev está instalado. Volte para esta janela para tentar de novo."
+ ],
"4A3Yzu": ["Bloco de código"],
"4BITzH": ["Erro:"],
"4CfgPM": ["A pasta do projeto foi criada, mas o git init falhou. Tente de novo."],
@@ -1242,6 +1246,7 @@
"Os botões de desfazer estão desativados — o estado por sessão foi liberado da memória."
],
"GLxIKR": ["Como enviar manualmente"],
+ "GMaDTM": ["Falha ao salvar a configuração do Slidev"],
"GN6L5F": ["Nome do arquivo"],
"GNkUvW": ["Na fila — será enviado quando esta execução terminar"],
"GQDSBN": ["Opções de layout"],
@@ -1324,6 +1329,9 @@
"HKH-W-": ["Dados"],
"HM56Bx": ["Criando..."],
"HPTPGr": ["Crie um novo arquivo de especificação para minha história de usuário"],
+ "HPaAxt": [
+ "O Slidev não está instalado, então a ação do Slidev fica oculta. Instale-o e volte para esta janela."
+ ],
"HSh8u_": ["Pastas"],
"HTW0Zw": [
"Falta um passo: rode <0>claude</0> neste projeto e aprove o OpenKnowledge uma vez."
@@ -1529,6 +1537,9 @@
"L1BQTH": [["0"], " ainda não está instalado — abrindo sua página de download."],
"L1ZE3M": ["Estatísticas do documento"],
"L3CEC1": ["este item"],
+ "L3w0_C": [
+ "Apresente um documento como slides em uma janela própria. Adicione <0>slides: true</0> ao frontmatter de um documento e abra-o com a ação do Slidev. A renderização é feita pela CLI do Slidev, que o OpenKnowledge não inclui."
+ ],
"L4Cdd9": ["ou crie um novo arquivo <0/>"],
"L6Hhh6": ["(raiz)"],
"L6Ud-t": ["Não foi possível carregar os conflitos. Recarregue para tentar de novo."],
@@ -1593,6 +1604,7 @@
" no upstream. Veja a mensagem abaixo."
],
"Llyqvo": ["Isto costuma significar uma destas coisas:"],
+ "Lm3r51": ["O Slidev não conseguiu renderizar este documento."],
"LnVIW4": ["Falha ao iniciar o login — tente de novo"],
"LpB85N": ["Simples"],
"LtI9AS": ["Dono"],
@@ -1748,6 +1760,8 @@
"Nay2Yr": ["Nenhum agente corresponde à sua busca."],
"NcurBF": ["Deslocar para baixo"],
"NeQ_0G": ["Trabalhe sobre estes comentários"],
+ "NeY1Np": ["O Slidev demorou demais para iniciar. Tente novamente."],
+ "NfraGd": ["Outras formas de instalar o Slidev"],
"NgZwB0": [["enabledCount"], "/", ["0"], " ativos"],
"NjrIak": ["Arquivo: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["Editar ", ["tag"]],
@@ -1839,6 +1853,9 @@
"OxplNM": ["\"", ["0"], "\" atualizado: ", ["1"], " adicionados, ", ["2"], " removidos"],
"Oxyd5f": ["Escolha um nome"],
"OyIC0Q": ["Nome do projeto"],
+ "Ozyht_": [
+ "Apresente um documento como slides em uma janela própria. Funciona apenas no aplicativo de desktop do OpenKnowledge e precisa da CLI do Slidev, instalada separadamente. Quando ativado, aparece em Plugins na barra lateral."
+ ],
"P-ye9o": ["Não foi possível abrir o seletor de pastas"],
"P0HC30": ["Este ", ["targetNoun"], " foi movido para <0>", ["0"], "</0>. Abrir por lá?"],
"P3NS4G": ["Erro de sintaxe no padrão (linha ", ["lineNumber"], "): ", ["message"]],
@@ -1847,6 +1864,7 @@
"P47EWZ": ["Não foi possível atualizar as configurações da barra lateral"],
"P6gXB-": ["Substituir ", ["keyName"]],
"P6lAT3": ["Pasta de destino: ", ["linkTitle"], ". Clique para abrir a visão geral."],
+ "P8AnMN": ["Procurando o Slidev"],
"PB4upl": ["Buscar a ocorrência anterior"],
"PBwmDJ": ["Buscando por significado"],
"PBxg_E": ["Agora não"],
@@ -2095,6 +2113,7 @@
"T0OVm7": ["O ramo padrão é protegido — os envios exigem um pull request."],
"T3Mld1": ["Janela"],
"T3j-7o": ["ex.: Trocar de projeto enquanto uma sincronização rodava"],
+ "TBfy1C": ["Não foi possível iniciar o Slidev."],
"TDeOpa": [
"Desfaz ou refaz suas próprias edições, deixando intactas as de colaboradores e agentes."
],
@@ -2112,6 +2131,7 @@
],
"TTDXD8": ["Novo worktree…"],
"TUzThQ": ["Compartilhar habilidades"],
+ "T_j5G0": ["Esta não é uma versão compatível do Slidev."],
"T_wG4n": ["Não foi possível verificar sua conexão com o GitHub."],
"Ta25TG": ["Ainda não há histórico"],
"TbjyhA": ["Documentos"],
@@ -2217,6 +2237,7 @@
"Ugvy4O": ["Expandir todos os grupos de arquivos"],
"UhpfxY": ["Deslocar para a esquerda"],
"UkQGhd": ["Ocultar substituir"],
+ "UlVARL": ["Ativar Slidev"],
"Uobeu9": ["Adiciona a habilidade a ", ["rootRel"], " — também lida por ", ["0"]],
"Uoux8m": ["Incluir este comentário no próximo envio"],
"Up2_7p": ["Copiar caminho completo"],
@@ -2368,6 +2389,7 @@
"X0ttSN": ["Nenhuma tag corresponde a \"", ["tagListQuery"], "\"."],
"X2zUS5": ["Excluir este comentário"],
"X3MMeA": ["Nenhum destes problemas tem correção automática."],
+ "X59Fx2": ["Não foi possível abrir este documento no Slidev."],
"X7ShnN": ["Abrir o painel de agentes"],
"X7u0xR": [["0"], " modelos disponíveis"],
"X8kjQX": ["Autenticar de novo no GitHub"],
@@ -2990,6 +3012,7 @@
}
]
],
+ "el2KyL": ["Slidev encontrado neste projeto. Os slides usarão a versão do projeto."],
"emgiet": [
"Conteúdo autoritativo; espelhado literalmente em todo lugar onde for referenciado."
],
@@ -3005,6 +3028,7 @@
],
"evs0iw": ["Tags que correspondem a \"", ["tagListQuery"], "\""],
"ezUmoU": ["Valores de elemento permitidos (vazio = qualquer)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["Mover o bloco"],
"f3Nvg7": [
["0"],
@@ -3182,6 +3206,7 @@
"hQjvzi": ["Um arquivo .zip ou .skill."],
"hSBIG-": ["Um título, uma descrição, tags — qualquer coisa que descreva esta pasta."],
"hSySVc": ["Falha na passagem da instalação: ", ["msg"]],
+ "hVAkI8": ["Executar no terminal"],
"hXUWyd": ["O valor é obrigatório"],
"hXbSxc": ["Recurso: ", ["title"]],
"hY8pka": ["Selecionar a próxima ocorrência"],
@@ -3216,6 +3241,7 @@
"hxnF0I": ["Propriedades de ", ["0"]],
"hyCxJY": ["Abrir aquele worktree em vez disso"],
"hynz2K": ["Download iniciado"],
+ "hz076O": ["Comando de instalação do Slidev"],
"i-ShMB": ["Diagrama"],
"i-wHEp": [
"Editando ",
@@ -3512,6 +3538,7 @@
"Um caminho dentro da habilidade — qualquer pasta serve (ex.: references/notes.md). As pastas do caminho são criadas para você."
],
"lPzyrU": ["Todos os trechos resolvidos"],
+ "lScd1O": ["Os slides do Slidev abrem apenas no aplicativo de desktop do OpenKnowledge."],
"lUtr1r": [["0"], " de ", ["1"], " selecionados"],
"lVWEIL": [["embedded"], " de ", ["total"], " páginas indexadas."],
"lWNpNB": ["Adicione cursores ou selecione ocorrências correspondentes pelo CodeMirror."],
@@ -4276,6 +4303,7 @@
"w4hMYl": [
"Não foi possível ler o estado dos ramos deste projeto. Feche este diálogo e abra o link compartilhado de novo."
],
+ "w52SKa": ["Abrir no Slidev"],
"w61W3L": ["Remover ", ["0"]],
"w6sBjd": ["As configurações do terminal ainda não carregaram — tente de novo em instantes"],
"w6sT-y": ["Acompanhar as edições do agente"],
@@ -4297,6 +4325,7 @@
"wJo9oS": ["Fechar busca"],
"wQp1V3": ["Espelho de <0>", ["src"], "</0>"],
"wQvvZY": ["Novo arquivo de habilidade"],
+ "wRni1Z": ["Desativar Slidev"],
"wT4iQr": ["Abre a busca do editor visual com os controles de substituição expandidos."],
"wTcjov": ["Sem espaço de trabalho"],
"wU8WyK": ["Campos do elemento"],
@@ -4385,6 +4414,7 @@
"xrVr_k": ["Não deu para criar a habilidade: ", ["0"]],
"xsZhu-": ["Número da página"],
"xtJgSe": ["Esta fonte traz várias habilidades — escolha qual importar."],
+ "xxRpzT": ["Slidev encontrado no seu sistema."],
"xzAmL_": ["Aprovado automaticamente"],
"xzktOa": ["Editar o link wiki"],
"y1eoq1": ["Copiar link"],
diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.po
index 72684148e..b137ea334 100644
--- a/packages/app/src/locales/pt-BR/messages.po
+++ b/packages/app/src/locales/pt-BR/messages.po
@@ -2062,6 +2062,10 @@ msgstr "Verificando"
msgid "Checking for agents"
msgstr "Procurando agentes"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Procurando o Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "Buscando atualizações"
@@ -3230,6 +3234,10 @@ msgstr "Não deu para abrir o terminal — os comentários continuam aguardando
msgid "Couldn't open the worktree. Try again."
msgstr "Não deu para abrir o worktree. Tente de novo."
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "Não foi possível abrir este documento no Slidev."
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "Não foi possível preparar este projeto para publicação."
@@ -3408,6 +3416,10 @@ msgstr "Não deu para compartilhar as habilidades: erro interno. Reinicie o app.
msgid "Couldn't start {0}: {1}"
msgstr "Não foi possível iniciar {0}: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Não foi possível iniciar o Slidev."
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "Não deu para iniciar a conversa com o agente — tente de novo."
@@ -3964,6 +3976,10 @@ msgstr "Desativar a pré-visualização de links externos"
msgid "Disable semantic search"
msgstr "Desativar a busca semântica"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Desativar Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "Desativar a verificação ortográfica"
@@ -4464,6 +4480,10 @@ msgstr "Ativar os plugins"
msgid "Enable semantic search"
msgstr "Ativar a busca semântica"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Ativar Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "Ativar a verificação ortográfica"
@@ -4897,6 +4917,10 @@ msgstr "Falha ao reordenar"
msgid "Failed to save content rules — {0}"
msgstr "Falha ao salvar as regras de conteúdo — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Falha ao salvar a configuração do Slidev"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "Falha ao salvar o campo do esquema"
@@ -6288,11 +6312,11 @@ msgstr "Layout"
msgid "Layout options"
msgstr "Opções de layout"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "Saiba mais"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "Saiba mais sobre {title}"
@@ -7850,6 +7874,10 @@ msgstr "Abrir no aplicativo padrão"
msgid "Open in file manager"
msgstr "Abrir no gerenciador de arquivos"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Abrir no Slidev"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "Abrir em um worktree"
@@ -8115,6 +8143,14 @@ msgstr "Outro"
msgid "Other OK paths are tracked upstream:"
msgstr "Há outros caminhos OK rastreados no remoto:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "Outras formas de instalar"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Outras formas de instalar o Slidev"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "Saída"
@@ -8455,6 +8491,14 @@ msgstr "Preparando a URL de compartilhamento..."
msgid "Preparing to uninstall OpenKnowledge"
msgstr "Preparando a desinstalação do OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "Apresente um documento como slides em uma janela própria. Adicione <0>slides: true</0> ao frontmatter de um documento e abra-o com a ação do Slidev. A renderização é feita pela CLI do Slidev, que o OpenKnowledge não inclui."
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "Apresente um documento como slides em uma janela própria. Funciona apenas no aplicativo de desktop do OpenKnowledge e precisa da CLI do Slidev, instalada separadamente. Quando ativado, aparece em Plugins na barra lateral."
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "Pressione Espaço para pegar uma aba. Use as setas para movê-la dentro da barra de abas e pressione Espaço ou Enter para soltá-la. Pressione Shift+F10 ou a tecla Menu para abrir o menu de contexto da aba, com as ações de dividir, fechar, fixar e outras."
@@ -9490,6 +9534,10 @@ msgstr "Rode uma auditoria do projeto pelo painel Problemas."
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "Rode um terminal de verdade acoplado dentro do OpenKnowledge, começando na pasta deste projeto."
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "Executar no terminal"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "Rode isto no seu terminal"
@@ -10408,6 +10456,39 @@ msgstr "Menu de comandos de barra"
msgid "Slash commands"
msgstr "Comandos de barra"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "O Slidev não conseguiu renderizar este documento."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Os slides do Slidev abrem apenas no aplicativo de desktop do OpenKnowledge."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "Slidev encontrado neste projeto. Os slides usarão a versão do projeto."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "Slidev encontrado no seu sistema."
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Comando de instalação do Slidev"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "O Slidev não está instalado, então a ação do Slidev fica oculta. Instale-o e volte para esta janela."
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "O Slidev demorou demais para iniciar. Tente novamente."
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "Título de seção pequeno."
@@ -11512,6 +11593,10 @@ msgstr "Isto é uma pré-visualização de {boldName}, detectada em {boldHarness
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "Isto é uma pré-visualização de {boldName}. Instale-a nos seus agentes."
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "Esta não é uma versão compatível do Slidev."
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "este item"
@@ -12367,6 +12452,10 @@ msgstr "Aguardando sua aprovação"
msgid "Warning"
msgstr "Aviso"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "Não foi possível verificar se o Slidev está instalado. Volte para esta janela para tentar de novo."
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "Não foi possível verificar sua conexão com o GitHub."
diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.json
index e824d03bc..62c67962e 100644
--- a/packages/app/src/locales/ur/messages.json
+++ b/packages/app/src/locales/ur/messages.json
@@ -128,6 +128,7 @@
"1J0c0X": [["displayName"], " تک اب بھی رسائی نہیں ہو سکی۔ ایک بار اور کوشش کریں؟"],
"1LtA5r": ["مہارت کو ", ["path"], " سے سِم لنک کرتا ہے"],
"1MGRQl": ["ٹرمینل کے سیشنز"],
+ "1NgrlY": ["انسٹال کرنے کے دیگر طریقے"],
"1OKzC_": ["آپ کی رپورٹ نہیں بھیجی جا سکی۔ دوبارہ کوشش کریں یا اس کے بجائے ای میل کر دیں۔"],
"1QfxQT": ["برخاست کریں"],
"1RluQD": ["تبدیلی دکھائیں"],
@@ -289,6 +290,9 @@
"45MZFs": ["کمانڈز"],
"484LKL": ["لنک ہٹائیں"],
"494br3": ["اس پروجیکٹ کے سب لوگوں کے ساتھ مشترک — git کے ذریعے config.yml میں کمٹ شدہ۔"],
+ "49Mb7P": [
+ "ہم جانچ نہیں سکے کہ Slidev انسٹال ہے یا نہیں۔ دوبارہ کوشش کے لیے اس ونڈو پر واپس آئیں۔"
+ ],
"4A3Yzu": ["کوڈ بلاک"],
"4BITzH": ["خرابی:"],
"4CfgPM": ["پروجیکٹ کا فولڈر بن گیا، مگر git init ناکام رہا۔ دوبارہ کوشش کریں۔"],
@@ -1092,6 +1096,7 @@
],
"GK-IRZ": ["واپسی کے بٹن بند ہیں — فی سیشن حالت میموری سے صاف ہو چکی ہے۔"],
"GLxIKR": ["دستی طور پر پُش کیسے کریں"],
+ "GMaDTM": ["Slidev کی ترتیب محفوظ نہیں ہو سکی"],
"GN6L5F": ["فائل کا نام"],
"GNkUvW": ["قطار میں — یہ عمل مکمل ہونے پر بھیجا جائے گا"],
"GQDSBN": ["خاکہ بندی کے آپشنز"],
@@ -1158,6 +1163,9 @@
"HKH-W-": ["ڈیٹا"],
"HM56Bx": ["بنایا جا رہا ہے..."],
"HPTPGr": ["میری صارف کہانی کے لیے نئی اسپیک فائل بنائیں"],
+ "HPaAxt": [
+ "Slidev انسٹال نہیں ہے، اس لیے Slidev ایکشن پوشیدہ رہتا ہے۔ اسے انسٹال کریں، پھر اس ونڈو پر واپس آئیں۔"
+ ],
"HSh8u_": ["فولڈرز"],
"HTW0Zw": [
"ایک اور مرحلہ: اس پروجیکٹ میں <0>claude</0> چلائیں اور ایک بار OpenKnowledge کو منظور کریں۔"
@@ -1353,6 +1361,9 @@
"L1BQTH": [["0"], " ابھی نصب نہیں ہے — اس کا ڈاؤن لوڈ صفحہ کھولا جا رہا ہے۔"],
"L1ZE3M": ["دستاویز کے اعداد و شمار"],
"L3CEC1": ["یہ آئٹم"],
+ "L3w0_C": [
+ "کسی دستاویز کو الگ ونڈو میں سلائیڈ ڈیک کے طور پر پیش کریں۔ دستاویز کے frontmatter میں <0>slides: true</0> شامل کریں، پھر اسے Slidev ایکشن سے کھولیں۔ رینڈرنگ Slidev CLI کرتا ہے، جو OpenKnowledge میں شامل نہیں۔"
+ ],
"L4Cdd9": ["یا نئی فائل بنائیں <0/>"],
"L6Hhh6": ["(جڑ)"],
"L6Ud-t": ["تنازعات لوڈ نہیں ہو سکے۔ دوبارہ کوشش کے لیے صفحہ ری لوڈ کریں۔"],
@@ -1412,6 +1423,7 @@
" ٹریک ہو رہی ہیں۔ نیچے دیا پیغام دیکھیں۔"
],
"Llyqvo": ["اس کا عام طور پر مطلب ان میں سے کوئی ایک ہے:"],
+ "Lm3r51": ["Slidev اس دستاویز کو رینڈر نہیں کر سکا۔"],
"LnVIW4": ["سائن اِن شروع نہیں ہو سکا — دوبارہ کوشش کریں"],
"LpB85N": ["سادہ"],
"LtI9AS": ["مالک"],
@@ -1557,6 +1569,8 @@
"Nay2Yr": ["آپ کی تلاش سے کوئی ایجنٹ مماثل نہیں۔"],
"NcurBF": ["نیچے کھسکائیں"],
"NeQ_0G": ["ان تبصروں پر کام کریں"],
+ "NeY1Np": ["Slidev شروع ہوتے ہوئے وقت ختم ہو گیا۔ دوبارہ کوشش کریں۔"],
+ "NfraGd": ["Slidev انسٹال کرنے کے دیگر طریقے"],
"NgZwB0": [["enabledCount"], "/", ["0"], " فعال"],
"NjrIak": ["فائل: <0>", ["fixedName"], ".md</0>"],
"NkNfSr": [["tag"], " میں ترمیم کریں"],
@@ -1646,6 +1660,9 @@
"OxplNM": ["«", ["0"], "» تازہ ہوا: ", ["1"], " شامل، ", ["2"], " ہٹائے گئے"],
"Oxyd5f": ["کوئی نام منتخب کریں"],
"OyIC0Q": ["پروجیکٹ کا نام"],
+ "Ozyht_": [
+ "کسی دستاویز کو الگ ونڈو میں سلائیڈ ڈیک کے طور پر پیش کریں۔ یہ صرف OpenKnowledge ڈیسک ٹاپ ایپ میں کام کرتا ہے اور اس کے لیے Slidev CLI درکار ہے، جسے آپ الگ سے انسٹال کرتے ہیں۔ فعال ہونے پر یہ سائیڈبار میں Plugins کے نیچے ظاہر ہوتا ہے۔"
+ ],
"P-ye9o": ["فولڈر منتخب کنندہ نہیں کھل سکا"],
"P0HC30": ["یہ ", ["targetNoun"], " <0>", ["0"], "</0> پر منتقل ہو گیا۔ اسے وہیں کھولیں؟"],
"P3NS4G": ["پیٹرن کی ساخت میں خرابی (سطر ", ["lineNumber"], "): ", ["message"]],
@@ -1654,6 +1671,7 @@
"P47EWZ": ["سائیڈ بار کی ترتیبات تازہ نہیں ہو سکیں"],
"P6gXB-": [["keyName"], " تبدیل کریں"],
"P6lAT3": ["فولڈر کا ہدف: ", ["linkTitle"], "۔ جائزہ کھولنے کے لیے کلک کریں۔"],
+ "P8AnMN": ["Slidev تلاش کیا جا رہا ہے"],
"PB4upl": ["پچھلی مماثلت تلاش کریں"],
"PBwmDJ": ["معنی کے لحاظ سے تلاش جاری ہے"],
"PBxg_E": ["ابھی نہیں"],
@@ -1889,6 +1907,7 @@
"T0OVm7": ["طے شدہ برانچ محفوظ ہے — پُش کے لیے پُل ریکویسٹ درکار ہے۔"],
"T3Mld1": ["ونڈو"],
"T3j-7o": ["مثلاً مطابقت پذیری کے دوران پروجیکٹ بدلنا"],
+ "TBfy1C": ["Slidev شروع نہیں ہو سکا۔"],
"TDeOpa": [
"اپنی ترامیم واپس لیں یا دوبارہ کریں، ساتھیوں اور ایجنٹس کی ترامیم اپنی جگہ چھوڑتے ہوئے۔"
],
@@ -1900,6 +1919,7 @@
"TQJCR6": [["0", "plural", { "one": ["#", " نتیجہ"], "other": ["#", " نتائج"] }]],
"TTDXD8": ["نیا ورک ٹری…"],
"TUzThQ": ["مہارتیں شیئر کریں"],
+ "T_j5G0": ["یہ Slidev کا معاون ورژن نہیں ہے۔"],
"T_wG4n": ["ہم آپ کا GitHub کنکشن نہیں جانچ سکے۔"],
"Ta25TG": ["ابھی کوئی تاریخ نہیں"],
"TbjyhA": ["دستاویزات"],
@@ -1999,6 +2019,7 @@
"Ugvy4O": ["فائلوں کے تمام گروپ پھیلائیں"],
"UhpfxY": ["بائیں کھسکائیں"],
"UkQGhd": ["تبدیلی چھپائیں"],
+ "UlVARL": ["Slidev فعال کریں"],
"Uobeu9": ["مہارت کو ", ["rootRel"], " میں شامل کرتا ہے — اسے ", ["0"], " بھی پڑھتا ہے"],
"Uoux8m": ["اگلی بار بھیجتے وقت یہ تبصرہ شامل کریں"],
"Up2_7p": ["مکمل راستہ نقل کریں"],
@@ -2134,6 +2155,7 @@
"X0ttSN": ["«", ["tagListQuery"], "» سے کوئی ٹیگ مماثل نہیں۔"],
"X2zUS5": ["یہ تبصرہ حذف کریں"],
"X3MMeA": ["ان میں سے کسی مسئلے کا خودکار حل نہیں ہے۔"],
+ "X59Fx2": ["یہ دستاویز Slidev میں نہیں کھولی جا سکی۔"],
"X7ShnN": ["ایجنٹس کا پینل کھولیں"],
"X7u0xR": [["0"], " ٹیمپلیٹس دستیاب"],
"X8kjQX": ["GitHub سے دوبارہ توثیق کریں"],
@@ -2688,6 +2710,7 @@
"Git اس فولڈر کو ٹریک نہیں کر سکتا — یہ خالی ہے یا اس میں صرف نظر انداز شدہ فائلیں ہیں۔ جب تک آپ کوئی ٹریک شدہ دستاویز شامل نہ کریں لنک کام نہیں کرے گا۔"
],
"eiUA4k": [["count", "plural", { "one": ["#", " تبصرہ"], "other": ["#", " تبصرے"] }]],
+ "el2KyL": ["اس پروجیکٹ میں Slidev مل گیا۔ ڈیک پروجیکٹ کا ورژن استعمال کریں گے۔"],
"emgiet": ["مستند مواد؛ جہاں بھی اس کا حوالہ ہو وہاں لفظ بہ لفظ منعکس ہوتا ہے۔"],
"enPTnx": ["سطر ", ["displayLine"]],
"eoEUI3": ["وہ تبصرہ حل نہیں ہو سکا۔"],
@@ -2699,6 +2722,7 @@
"evHlIg": ["پیروی آپ کی مقامی تبدیلیاں کبھی پُش یا کمٹ نہیں کرتی۔ وہ صرف اسی مشین پر رہتی ہیں۔"],
"evs0iw": ["«", ["tagListQuery"], "» سے مماثل ٹیگز"],
"ezUmoU": ["اجازت شدہ عنصری اقدار (خالی = کوئی بھی)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["بلاک منتقل کریں"],
"f3Nvg7": [
["0"],
@@ -2860,6 +2884,7 @@
"hQjvzi": ["ایک .zip یا .skill آرکائیو۔"],
"hSBIG-": ["عنوان، تفصیل، ٹیگز — کوئی بھی چیز جو اس فولڈر کو بیان کرے۔"],
"hSySVc": ["تنصیب کی منتقلی ناکام: ", ["msg"]],
+ "hVAkI8": ["ٹرمینل میں چلائیں"],
"hXUWyd": ["قدر درکار ہے"],
"hXbSxc": ["اثاثہ: ", ["title"]],
"hY8pka": ["اگلا موقع منتخب کریں"],
@@ -2892,6 +2917,7 @@
"hxnF0I": [["0"], " کی خصوصیات"],
"hyCxJY": ["اس کے بجائے وہ ورک ٹری کھولیں"],
"hynz2K": ["ڈاؤن لوڈ شروع ہو گیا"],
+ "hz076O": ["Slidev انسٹال کمانڈ"],
"i-ShMB": ["خاکہ"],
"i-wHEp": [
["boldName"],
@@ -3174,6 +3200,7 @@
"مہارت کے اندر کا راستہ — کوئی بھی فولڈر چلتا ہے (مثلاً references/notes.md)۔ راستے میں شامل فولڈرز آپ کے لیے بنا دیے جاتے ہیں۔"
],
"lPzyrU": ["تمام حصے حل ہو گئے"],
+ "lScd1O": ["Slidev ڈیک صرف OpenKnowledge ڈیسک ٹاپ ایپ میں کھلتے ہیں۔"],
"lUtr1r": [["1"], " میں سے ", ["0"], " منتخب"],
"lVWEIL": [["total"], " میں سے ", ["embedded"], " صفحات اشاریہ بند ہو گئے۔"],
"lWNpNB": ["CodeMirror کے ذریعے کرسر شامل کریں یا مماثل مواقع منتخب کریں۔"],
@@ -3863,6 +3890,7 @@
"w4hMYl": [
"اس پروجیکٹ کی برانچ کی حالت پڑھی نہیں جا سکی۔ یہ ڈائیلاگ بند کریں اور شیئر لنک دوبارہ کھولیں۔"
],
+ "w52SKa": ["Slidev میں کھولیں"],
"w61W3L": [["0"], " ہٹائیں"],
"w6sBjd": ["ٹرمینل کی ترتیبات ابھی لوڈ نہیں ہوئیں — تھوڑی دیر بعد دوبارہ کوشش کریں"],
"w6sT-y": ["ایجنٹ کی ترامیم کی پیروی کریں"],
@@ -3884,6 +3912,7 @@
"wJo9oS": ["تلاش بند کریں"],
"wQp1V3": ["<0>", ["src"], "</0> کا مرر"],
"wQvvZY": ["مہارت کی نئی فائل"],
+ "wRni1Z": ["Slidev بند کریں"],
"wT4iQr": ["بصری ایڈیٹر کی تلاش تبدیلی کے کنٹرولز کھلے ہوئے کھولیں۔"],
"wTcjov": ["کوئی ورک اسپیس نہیں"],
"wU8WyK": ["عنصر کے فیلڈز"],
@@ -3973,6 +4002,7 @@
"xrVr_k": ["مہارت نہیں بن سکی: ", ["0"]],
"xsZhu-": ["صفحہ نمبر"],
"xtJgSe": ["یہ ماخذ کئی مہارتیں سمیٹے ہوئے ہے — درآمد کے لیے ایک منتخب کریں۔"],
+ "xxRpzT": ["آپ کے سسٹم پر Slidev مل گیا۔"],
"xzAmL_": ["خودکار منظور شدہ"],
"xzktOa": ["وکی لنک میں ترمیم کریں"],
"y1eoq1": ["لنک کاپی کریں"],
diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.po
index 6ccfc6ad3..3432f4632 100644
--- a/packages/app/src/locales/ur/messages.po
+++ b/packages/app/src/locales/ur/messages.po
@@ -2066,6 +2066,10 @@ msgstr "جانچا جا رہا ہے"
msgid "Checking for agents"
msgstr "ایجنٹس تلاش کیے جا رہے ہیں"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "Slidev تلاش کیا جا رہا ہے"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "اپ ڈیٹس دیکھے جا رہے ہیں"
@@ -3234,6 +3238,10 @@ msgstr "ٹرمینل نہیں کھل سکا — تبصرے اب بھی بھیج
msgid "Couldn't open the worktree. Try again."
msgstr "ورک ٹری نہیں کھل سکا۔ دوبارہ کوشش کریں۔"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "یہ دستاویز Slidev میں نہیں کھولی جا سکی۔"
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "اس پروجیکٹ کو اشاعت کے لیے تیار نہیں کیا جا سکا۔"
@@ -3412,6 +3420,10 @@ msgstr "مہارتیں شیئر نہیں ہو سکیں: داخلی خرابی۔
msgid "Couldn't start {0}: {1}"
msgstr "{0} شروع نہ ہو سکا: {1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "Slidev شروع نہیں ہو سکا۔"
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "ایجنٹ کا تھریڈ شروع نہیں ہو سکا — براہِ کرم دوبارہ کوشش کریں۔"
@@ -3968,6 +3980,10 @@ msgstr "بیرونی لنکس کے پیش منظر بند کریں"
msgid "Disable semantic search"
msgstr "معنوی تلاش بند کریں"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "Slidev بند کریں"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "ہجے کی جانچ بند کریں"
@@ -4468,6 +4484,10 @@ msgstr "پلگ اِنز فعال کریں"
msgid "Enable semantic search"
msgstr "معنوی تلاش فعال کریں"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "Slidev فعال کریں"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "ہجے کی جانچ چالو کریں"
@@ -4901,6 +4921,10 @@ msgstr "ترتیب نہیں بدلی جا سکی"
msgid "Failed to save content rules — {0}"
msgstr "مواد کے قواعد محفوظ نہیں ہو سکے — {0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "Slidev کی ترتیب محفوظ نہیں ہو سکی"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "اسکیما کا فیلڈ محفوظ نہیں ہو سکا"
@@ -6292,11 +6316,11 @@ msgstr "خاکہ بندی"
msgid "Layout options"
msgstr "خاکہ بندی کے آپشنز"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "مزید جانیں"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "{title} کے بارے میں مزید جانیں"
@@ -7854,6 +7878,10 @@ msgstr "ڈیفالٹ ایپ میں کھولیں"
msgid "Open in file manager"
msgstr "فائل مینیجر میں کھولیں"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "Slidev میں کھولیں"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "ورک ٹری میں کھولیں"
@@ -8119,6 +8147,14 @@ msgstr "دیگر"
msgid "Other OK paths are tracked upstream:"
msgstr "OK کے دیگر راستے اپ سٹریم ٹریک ہوتے ہیں:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "انسٹال کرنے کے دیگر طریقے"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "Slidev انسٹال کرنے کے دیگر طریقے"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "جانے والے"
@@ -8459,6 +8495,14 @@ msgstr "شیئر URL تیار کیا جا رہا ہے..."
msgid "Preparing to uninstall OpenKnowledge"
msgstr "OpenKnowledge کی تنصیب ختم کرنے کی تیاری"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "کسی دستاویز کو الگ ونڈو میں سلائیڈ ڈیک کے طور پر پیش کریں۔ دستاویز کے frontmatter میں <0>slides: true</0> شامل کریں، پھر اسے Slidev ایکشن سے کھولیں۔ رینڈرنگ Slidev CLI کرتا ہے، جو OpenKnowledge میں شامل نہیں۔"
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "کسی دستاویز کو الگ ونڈو میں سلائیڈ ڈیک کے طور پر پیش کریں۔ یہ صرف OpenKnowledge ڈیسک ٹاپ ایپ میں کام کرتا ہے اور اس کے لیے Slidev CLI درکار ہے، جسے آپ الگ سے انسٹال کرتے ہیں۔ فعال ہونے پر یہ سائیڈبار میں Plugins کے نیچے ظاہر ہوتا ہے۔"
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "ٹیب اٹھانے کے لیے Space دبائیں۔ اسے ٹیب پٹی کے اندر منتقل کرنے کے لیے تیر والی کلیدیں استعمال کریں، پھر چھوڑنے کے لیے Space یا Enter دبائیں۔ تقسیم، بند، پن اور دیگر ٹیب اعمال والا سیاقی مینو کھولنے کے لیے Shift+F10 یا Menu کلید دبائیں۔"
@@ -9494,6 +9538,10 @@ msgstr "مسائل کے پینل سے پروجیکٹ کا آڈٹ چلائیں۔"
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "OpenKnowledge کے اندر لگا ہوا ایک حقیقی ٹرمینل چلائیں، جو اس پروجیکٹ کے فولڈر سے شروع ہو۔"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "ٹرمینل میں چلائیں"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "یہ اپنے ٹرمینل میں چلائیں"
@@ -10412,6 +10460,39 @@ msgstr "سلیش کمانڈ کا مینو"
msgid "Slash commands"
msgstr "سلیش کمانڈز"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev اس دستاویز کو رینڈر نہیں کر سکا۔"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Slidev ڈیک صرف OpenKnowledge ڈیسک ٹاپ ایپ میں کھلتے ہیں۔"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "اس پروجیکٹ میں Slidev مل گیا۔ ڈیک پروجیکٹ کا ورژن استعمال کریں گے۔"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "آپ کے سسٹم پر Slidev مل گیا۔"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Slidev انسٹال کمانڈ"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "Slidev انسٹال نہیں ہے، اس لیے Slidev ایکشن پوشیدہ رہتا ہے۔ اسے انسٹال کریں، پھر اس ونڈو پر واپس آئیں۔"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev شروع ہوتے ہوئے وقت ختم ہو گیا۔ دوبارہ کوشش کریں۔"
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "چھوٹا سیکشن عنوان۔"
@@ -11516,6 +11597,10 @@ msgstr "یہ {boldName} کا پیش منظر ہے، جو {boldHarness} میں {b
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "یہ {boldName} کا پیش منظر ہے۔ اسے اپنے ایجنٹس میں نصب کریں۔"
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "یہ Slidev کا معاون ورژن نہیں ہے۔"
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "یہ آئٹم"
@@ -12371,6 +12456,10 @@ msgstr "آپ کی منظوری کا انتظار ہے"
msgid "Warning"
msgstr "انتباہ"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "ہم جانچ نہیں سکے کہ Slidev انسٹال ہے یا نہیں۔ دوبارہ کوشش کے لیے اس ونڈو پر واپس آئیں۔"
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "ہم آپ کا GitHub کنکشن نہیں جانچ سکے۔"
diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.json
index 0d8a1ba44..d76801a44 100644
--- a/packages/app/src/locales/zh-Hans/messages.json
+++ b/packages/app/src/locales/zh-Hans/messages.json
@@ -119,6 +119,7 @@
"1J0c0X": ["仍然无法连接 ", ["displayName"], "。要再试一次吗?"],
"1LtA5r": ["把技能符号链接到 ", ["path"]],
"1MGRQl": ["终端会话"],
+ "1NgrlY": ["其他安装方式"],
"1OKzC_": ["你的报告没能发送出去。请重试,或者改用邮件发送。"],
"1QfxQT": ["忽略"],
"1RluQD": ["显示替换"],
@@ -260,6 +261,7 @@
"45MZFs": ["命令"],
"484LKL": ["移除链接"],
"494br3": ["与这个项目的所有人共享——通过 git 提交到 config.yml。"],
+ "49Mb7P": ["无法检查是否已安装 Slidev。返回此窗口重试。"],
"4A3Yzu": ["代码块"],
"4BITzH": ["错误:"],
"4CfgPM": ["项目文件夹已创建,但 git init 失败。请重试。"],
@@ -941,6 +943,7 @@
"GJH-AT": [["docName"], " 有 ", ["0"], "。OpenKnowledge 目前最多可打开 ", ["1"], " 的文件。"],
"GK-IRZ": ["撤销按钮已禁用——按会话保存的状态已被回收。"],
"GLxIKR": ["如何手动推送"],
+ "GMaDTM": ["保存 Slidev 设置失败"],
"GN6L5F": ["文件名"],
"GNkUvW": ["已排队——本次运行结束后发送"],
"GQDSBN": ["布局选项"],
@@ -997,6 +1000,7 @@
"HKH-W-": ["数据"],
"HM56Bx": ["正在创建…"],
"HPTPGr": ["为我的用户故事新建一个规格文件"],
+ "HPaAxt": ["尚未安装 Slidev,因此 Slidev 操作保持隐藏。安装后请返回此窗口。"],
"HSh8u_": ["文件夹"],
"HTW0Zw": ["还差一步:在这个项目中运行 <0>claude</0>,并批准 OpenKnowledge 一次。"],
"HbcQYf": ["要把 ", ["display"], " 处的符号链接替换为技能的独立副本吗?其他内容不会移动。"],
@@ -1155,6 +1159,9 @@
"L1BQTH": [["0"], " 尚未安装——正在打开它的下载页面。"],
"L1ZE3M": ["文档统计"],
"L3CEC1": ["这个项目"],
+ "L3w0_C": [
+ "在独立窗口中将文档演示为幻灯片。在文档的 frontmatter 中添加 <0>slides: true</0>,然后通过 Slidev 操作打开它。渲染由 Slidev CLI 完成,OpenKnowledge 不捆绑它。"
+ ],
"L4Cdd9": ["或者新建一个文件 <0/>"],
"L6Hhh6": ["(根目录)"],
"L6Ud-t": ["无法加载冲突。请重新加载后重试。"],
@@ -1197,6 +1204,7 @@
"。请查看下方的消息。"
],
"Llyqvo": ["这通常意味着以下之一:"],
+ "Lm3r51": ["Slidev 无法渲染此文档。"],
"LnVIW4": ["启动登录失败——请重试"],
"LpB85N": ["纯文本"],
"LtI9AS": ["所有者"],
@@ -1322,6 +1330,8 @@
"Nay2Yr": ["没有智能体匹配你的搜索。"],
"NcurBF": ["向下平移"],
"NeQ_0G": ["处理这些评论"],
+ "NeY1Np": ["Slidev 启动超时。请重试。"],
+ "NfraGd": ["安装 Slidev 的其他方式"],
"NgZwB0": ["已开启 ", ["enabledCount"], "/", ["0"]],
"NjrIak": ["文件:<0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["编辑 ", ["tag"]],
@@ -1401,6 +1411,9 @@
"OxplNM": ["已更新“", ["0"], "”:新增 ", ["1"], ",移除 ", ["2"]],
"Oxyd5f": ["取个名字"],
"OyIC0Q": ["项目名称"],
+ "Ozyht_": [
+ "在独立窗口中将文档演示为幻灯片。仅在 OpenKnowledge 桌面应用中可用,并需要单独安装 Slidev CLI。启用后会显示在侧边栏的 Plugins 下。"
+ ],
"P-ye9o": ["无法打开文件夹选择器"],
"P0HC30": ["这个", ["targetNoun"], "已移动到 <0>", ["0"], "</0>。要在那里打开它吗?"],
"P3NS4G": ["模式语法错误(第 ", ["lineNumber"], " 行):", ["message"]],
@@ -1409,6 +1422,7 @@
"P47EWZ": ["无法更新侧边栏设置"],
"P6gXB-": ["替换 ", ["keyName"]],
"P6lAT3": ["目标文件夹:", ["linkTitle"], "。点击可打开总览。"],
+ "P8AnMN": ["正在检查 Slidev"],
"PB4upl": ["查找上一处匹配"],
"PBwmDJ": ["正在按语义搜索"],
"PBxg_E": ["暂时不用"],
@@ -1609,6 +1623,7 @@
"T0OVm7": ["默认分支受保护——推送需要通过 pull request。"],
"T3Mld1": ["窗口"],
"T3j-7o": ["例如:同步过程中切换了项目"],
+ "TBfy1C": ["无法启动 Slidev。"],
"TDeOpa": ["撤销或重做你自己的编辑,协作者和智能体的编辑保持不变。"],
"TEEPPF": ["将替换已有的 OpenKnowledge 条目"],
"TJnkyf": ["ok ui 有响应,但 server.lock 中还没有端口"],
@@ -1618,6 +1633,7 @@
"TQJCR6": [["0", "plural", { "other": ["#", " 条结果"] }]],
"TTDXD8": ["新建 worktree…"],
"TUzThQ": ["共享技能"],
+ "T_j5G0": ["这不是受支持的 Slidev 版本。"],
"T_wG4n": ["我们无法检查你的 GitHub 连接。"],
"Ta25TG": ["还没有历史记录"],
"TbjyhA": ["文档"],
@@ -1709,6 +1725,7 @@
"Ugvy4O": ["展开所有文件分组"],
"UhpfxY": ["向左平移"],
"UkQGhd": ["隐藏替换"],
+ "UlVARL": ["启用 Slidev"],
"Uobeu9": ["把技能添加到 ", ["rootRel"], "——", ["0"], " 也会读取该处"],
"Uoux8m": ["下次发送时包含这条评论"],
"Up2_7p": ["复制完整路径"],
@@ -1834,6 +1851,7 @@
"X0ttSN": ["没有标签匹配 \"", ["tagListQuery"], "\"。"],
"X2zUS5": ["删除这条评论"],
"X3MMeA": ["这些问题都没有自动修复方案。"],
+ "X59Fx2": ["无法在 Slidev 中打开此文档。"],
"X7ShnN": ["打开智能体面板"],
"X7u0xR": ["有 ", ["0"], " 个模板可用"],
"X8kjQX": ["重新通过 GitHub 认证"],
@@ -2335,6 +2353,7 @@
"Git 无法跟踪这个文件夹——它是空的,或者只包含被忽略的文件。在你添加一个受跟踪的文档之前,链接不会生效。"
],
"eiUA4k": [["count", "plural", { "other": ["#", " 条评论"] }]],
+ "el2KyL": ["在此项目中找到 Slidev。幻灯片将使用项目的版本。"],
"emgiet": ["权威内容;在所有被引用的地方逐字镜像。"],
"enPTnx": ["第 ", ["displayLine"], " 行"],
"eoEUI3": ["无法解决那条评论。"],
@@ -2344,6 +2363,7 @@
"evHlIg": ["「跟随」从不推送或提交你的本地改动。它们只留在这台电脑上。"],
"evs0iw": ["匹配 \"", ["tagListQuery"], "\" 的标签"],
"ezUmoU": ["允许的元素值(留空 = 任意)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["移动块"],
"f3Nvg7": [["0"], " 无法继续这次对话——记录已保留,但智能体会话已结束。"],
"f65AOQ": ["起始于"],
@@ -2486,6 +2506,7 @@
"hQjvzi": ["一个 .zip 或 .skill 压缩包。"],
"hSBIG-": ["标题、描述、标签——任何能描述这个文件夹的信息。"],
"hSySVc": ["安装交接失败:", ["msg"]],
+ "hVAkI8": ["在终端中运行"],
"hXUWyd": ["此项必填"],
"hXbSxc": ["资源:", ["title"]],
"hY8pka": ["选中下一处出现"],
@@ -2516,6 +2537,7 @@
"hxnF0I": [["0"], " 属性"],
"hyCxJY": ["改为打开那个 worktree"],
"hynz2K": ["下载已开始"],
+ "hz076O": ["Slidev 安装命令"],
"i-ShMB": ["图示"],
"i-wHEp": ["正在就地编辑 ", ["boldName"], "。更改会直接保存到你编辑器中的那份副本。"],
"i09An-": ["已恢复到较早的版本(", ["0"], ")"],
@@ -2764,6 +2786,7 @@
"技能内部的一个路径——任何文件夹都可以(例如 references/notes.md)。路径中的文件夹会自动创建。"
],
"lPzyrU": ["所有差异块均已解决"],
+ "lScd1O": ["Slidev 幻灯片仅在 OpenKnowledge 桌面应用中打开。"],
"lUtr1r": ["已选择 ", ["1"], " 项中的 ", ["0"], " 项"],
"lVWEIL": ["已索引 ", ["total"], " 个页面中的 ", ["embedded"], " 个。"],
"lWNpNB": ["通过 CodeMirror 添加光标或选中匹配项。"],
@@ -3355,6 +3378,7 @@
"w3vFfL": ["隐藏「文件」"],
"w4ZzmQ": ["无法连接到嵌入服务提供方——请重试"],
"w4hMYl": ["无法读取这个项目的分支状态。请关闭此对话框并重新打开共享链接。"],
+ "w52SKa": ["在 Slidev 中打开"],
"w61W3L": ["移除 ", ["0"]],
"w6sBjd": ["终端设置尚未加载——请稍后再试"],
"w6sT-y": ["跟随智能体的编辑"],
@@ -3376,6 +3400,7 @@
"wJo9oS": ["关闭查找"],
"wQp1V3": ["<0>", ["src"], "</0> 的镜像"],
"wQvvZY": ["新建技能文件"],
+ "wRni1Z": ["禁用 Slidev"],
"wT4iQr": ["打开可视化编辑器的查找,并展开替换控件。"],
"wTcjov": ["无工作区"],
"wU8WyK": ["元素字段"],
@@ -3452,6 +3477,7 @@
"xrVr_k": ["无法创建技能:", ["0"]],
"xsZhu-": ["页码"],
"xtJgSe": ["这个来源包含多个技能——请选择要导入的那一个。"],
+ "xxRpzT": ["在你的系统中找到 Slidev。"],
"xzAmL_": ["已自动批准"],
"xzktOa": ["编辑维基链接"],
"y1eoq1": ["复制链接"],
diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.po
index dc5bd98c8..e14097f90 100644
--- a/packages/app/src/locales/zh-Hans/messages.po
+++ b/packages/app/src/locales/zh-Hans/messages.po
@@ -2066,6 +2066,10 @@ msgstr "正在检查"
msgid "Checking for agents"
msgstr "正在查找智能体"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "正在检查 Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "正在检查更新"
@@ -3234,6 +3238,10 @@ msgstr "无法打开终端——这些评论仍在等待发送。"
msgid "Couldn't open the worktree. Try again."
msgstr "无法打开 worktree。请重试。"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "无法在 Slidev 中打开此文档。"
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "无法为发布准备此项目。"
@@ -3412,6 +3420,10 @@ msgstr "无法共享技能:内部错误。请重启应用。"
msgid "Couldn't start {0}: {1}"
msgstr "无法启动 {0}:{1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "无法启动 Slidev。"
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "无法启动智能体线程——请重试。"
@@ -3968,6 +3980,10 @@ msgstr "关闭外部链接预览"
msgid "Disable semantic search"
msgstr "关闭语义搜索"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "禁用 Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "关闭拼写检查"
@@ -4468,6 +4484,10 @@ msgstr "启用插件"
msgid "Enable semantic search"
msgstr "开启语义搜索"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "启用 Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "开启拼写检查"
@@ -4901,6 +4921,10 @@ msgstr "重新排序失败"
msgid "Failed to save content rules — {0}"
msgstr "保存内容规则失败——{0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "保存 Slidev 设置失败"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "保存架构字段失败"
@@ -6292,11 +6316,11 @@ msgstr "布局"
msgid "Layout options"
msgstr "布局选项"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "了解更多"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "了解更多关于 {title} 的信息"
@@ -7854,6 +7878,10 @@ msgstr "用默认应用打开"
msgid "Open in file manager"
msgstr "在文件管理器中打开"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "在 Slidev 中打开"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "在 worktree 中打开"
@@ -8119,6 +8147,14 @@ msgstr "其他"
msgid "Other OK paths are tracked upstream:"
msgstr "其他 OK 路径在远程受跟踪:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "其他安装方式"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "安装 Slidev 的其他方式"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "出链"
@@ -8459,6 +8495,14 @@ msgstr "正在准备共享 URL…"
msgid "Preparing to uninstall OpenKnowledge"
msgstr "正在准备卸载 OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "在独立窗口中将文档演示为幻灯片。在文档的 frontmatter 中添加 <0>slides: true</0>,然后通过 Slidev 操作打开它。渲染由 Slidev CLI 完成,OpenKnowledge 不捆绑它。"
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "在独立窗口中将文档演示为幻灯片。仅在 OpenKnowledge 桌面应用中可用,并需要单独安装 Slidev CLI。启用后会显示在侧边栏的 Plugins 下。"
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "按空格键拾取标签页。使用方向键在标签栏内移动,然后按空格键或回车键放下。按 Shift+F10 或菜单键打开标签页的右键菜单,其中包含拆分、关闭、固定等操作。"
@@ -9494,6 +9538,10 @@ msgstr "在「问题」面板中运行一次项目审查。"
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "在 OpenKnowledge 内部停靠运行一个真实终端,起始目录为这个项目的文件夹。"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "在终端中运行"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "在你的终端中运行这个"
@@ -10412,6 +10460,39 @@ msgstr "斜杠命令菜单"
msgid "Slash commands"
msgstr "斜杠命令"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev 无法渲染此文档。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Slidev 幻灯片仅在 OpenKnowledge 桌面应用中打开。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "在此项目中找到 Slidev。幻灯片将使用项目的版本。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "在你的系统中找到 Slidev。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Slidev 安装命令"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "尚未安装 Slidev,因此 Slidev 操作保持隐藏。安装后请返回此窗口。"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev 启动超时。请重试。"
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "小号章节标题。"
@@ -11516,6 +11597,10 @@ msgstr "这是 {boldName} 的预览,在 {boldHarness} 的 {boldLevel} 级别
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "这是 {boldName} 的预览。把它安装到你的智能体中。"
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "这不是受支持的 Slidev 版本。"
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "这个项目"
@@ -12371,6 +12456,10 @@ msgstr "正在等待你的批准"
msgid "Warning"
msgstr "警告"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "无法检查是否已安装 Slidev。返回此窗口重试。"
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "我们无法检查你的 GitHub 连接。"
diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.json
index 2547ddaf4..998012dde 100644
--- a/packages/app/src/locales/zh-Hant/messages.json
+++ b/packages/app/src/locales/zh-Hant/messages.json
@@ -119,6 +119,7 @@
"1J0c0X": ["仍然無法連線到 ", ["displayName"], "。要再試最後一次嗎?"],
"1LtA5r": ["把技能符號連結到 ", ["path"]],
"1MGRQl": ["終端機工作階段"],
+ "1NgrlY": ["其他安裝方式"],
"1OKzC_": ["你的回報沒能送出去。請再試一次,或者改用電子郵件寄送。"],
"1QfxQT": ["關閉"],
"1RluQD": ["顯示取代"],
@@ -262,6 +263,7 @@
"45MZFs": ["指令"],
"484LKL": ["移除連結"],
"494br3": ["與這個專案的所有人共享——透過 git 提交到 config.yml。"],
+ "49Mb7P": ["無法檢查是否已安裝 Slidev。請回到此視窗重試。"],
"4A3Yzu": ["程式碼區塊"],
"4BITzH": ["錯誤:"],
"4CfgPM": ["專案資料夾已建立,但 git init 失敗。請再試一次。"],
@@ -947,6 +949,7 @@
"GJH-AT": [["docName"], " 有 ", ["0"], "。OpenKnowledge 目前最多可開啟 ", ["1"], " 的檔案。"],
"GK-IRZ": ["復原按鈕已停用——按工作階段保存的狀態已被回收。"],
"GLxIKR": ["如何手動推送"],
+ "GMaDTM": ["儲存 Slidev 設定失敗"],
"GN6L5F": ["檔案名稱"],
"GNkUvW": ["已排隊——本次執行結束後傳送"],
"GQDSBN": ["版面配置選項"],
@@ -1007,6 +1010,7 @@
"HKH-W-": ["資料"],
"HM56Bx": ["正在建立…"],
"HPTPGr": ["為我的使用者故事建立一個新的規格檔案"],
+ "HPaAxt": ["尚未安裝 Slidev,因此 Slidev 動作會保持隱藏。安裝後請回到此視窗。"],
"HSh8u_": ["資料夾"],
"HTW0Zw": ["還差一步:在這個專案中執行 <0>claude</0>,並核准 OpenKnowledge 一次。"],
"HbcQYf": ["要把 ", ["display"], " 處的符號連結換成技能的獨立副本嗎?其他東西都不會動。"],
@@ -1169,6 +1173,9 @@
"L1BQTH": [["0"], " 尚未安裝——正在開啟它的下載頁面。"],
"L1ZE3M": ["文件統計"],
"L3CEC1": ["這個項目"],
+ "L3w0_C": [
+ "在獨立視窗中將文件展示為簡報。在文件的 frontmatter 中加入 <0>slides: true</0>,再透過 Slidev 動作開啟。算繪由 Slidev CLI 處理,OpenKnowledge 並未內建。"
+ ],
"L4Cdd9": ["或者新增一個檔案 <0/>"],
"L6Hhh6": ["(根目錄)"],
"L6Ud-t": ["無法載入衝突。請重新載入後再試一次。"],
@@ -1217,6 +1224,7 @@
"。請參閱下方訊息。"
],
"Llyqvo": ["這通常代表下列其中之一:"],
+ "Lm3r51": ["Slidev 無法算繪此文件。"],
"LnVIW4": ["啟動登入失敗——請再試一次"],
"LpB85N": ["純文字"],
"LtI9AS": ["擁有者"],
@@ -1342,6 +1350,8 @@
"Nay2Yr": ["沒有代理符合你的搜尋。"],
"NcurBF": ["向下平移"],
"NeQ_0G": ["處理這些註解"],
+ "NeY1Np": ["Slidev 啟動逾時。請再試一次。"],
+ "NfraGd": ["安裝 Slidev 的其他方式"],
"NgZwB0": ["已開啟 ", ["enabledCount"], "/", ["0"]],
"NjrIak": ["檔案:<0>", ["fixedName"], ".md</0>"],
"NkNfSr": ["編輯 ", ["tag"]],
@@ -1421,6 +1431,9 @@
"OxplNM": ["已更新「", ["0"], "」:新增 ", ["1"], ",移除 ", ["2"]],
"Oxyd5f": ["取個名字"],
"OyIC0Q": ["專案名稱"],
+ "Ozyht_": [
+ "在獨立視窗中將文件展示為簡報。僅能在 OpenKnowledge 桌面應用程式中使用,並需要另外安裝 Slidev CLI。啟用後會顯示在側邊欄的 Plugins 下。"
+ ],
"P-ye9o": ["無法開啟資料夾選擇器"],
"P0HC30": ["這個", ["targetNoun"], "已經移到 <0>", ["0"], "</0>。要在那裡開啟它嗎?"],
"P3NS4G": ["模式語法錯誤(第 ", ["lineNumber"], " 行):", ["message"]],
@@ -1429,6 +1442,7 @@
"P47EWZ": ["無法更新側邊欄設定"],
"P6gXB-": ["取代 ", ["keyName"]],
"P6lAT3": ["目標資料夾:", ["linkTitle"], "。點一下可開啟總覽。"],
+ "P8AnMN": ["正在檢查 Slidev"],
"PB4upl": ["尋找上一個相符項"],
"PBwmDJ": ["正在按語意搜尋"],
"PBxg_E": ["現在不用"],
@@ -1629,6 +1643,7 @@
"T0OVm7": ["預設分支受保護——推送需要透過 pull request。"],
"T3Mld1": ["視窗"],
"T3j-7o": ["例如:同步進行到一半時切換了專案"],
+ "TBfy1C": ["無法啟動 Slidev。"],
"TDeOpa": ["復原或重做你自己的編輯,協作者和代理的編輯維持不變。"],
"TEEPPF": ["會取代既有的 OpenKnowledge 項目"],
"TJnkyf": ["ok ui 有回應,但 server.lock 裡還沒有連接埠"],
@@ -1638,6 +1653,7 @@
"TQJCR6": [["0", "plural", { "other": ["#", " 筆結果"] }]],
"TTDXD8": ["新增 worktree…"],
"TUzThQ": ["分享技能"],
+ "T_j5G0": ["這不是支援的 Slidev 版本。"],
"T_wG4n": ["我們無法檢查你的 GitHub 連線。"],
"Ta25TG": ["還沒有任何記錄"],
"TbjyhA": ["文件"],
@@ -1729,6 +1745,7 @@
"Ugvy4O": ["展開所有檔案群組"],
"UhpfxY": ["向左平移"],
"UkQGhd": ["隱藏取代"],
+ "UlVARL": ["啟用 Slidev"],
"Uobeu9": ["把技能加到 ", ["rootRel"], "——", ["0"], " 也會讀取該處"],
"Uoux8m": ["下次傳送時包含這則註解"],
"Up2_7p": ["複製完整路徑"],
@@ -1856,6 +1873,7 @@
"X0ttSN": ["沒有標籤符合「", ["tagListQuery"], "」。"],
"X2zUS5": ["刪除這則註解"],
"X3MMeA": ["這些問題都沒有自動修正的方式。"],
+ "X59Fx2": ["無法在 Slidev 中開啟此文件。"],
"X7ShnN": ["開啟代理面板"],
"X7u0xR": ["有 ", ["0"], " 個範本可用"],
"X8kjQX": ["重新用 GitHub 驗證"],
@@ -2355,6 +2373,7 @@
"Git 無法追蹤這個資料夾——它是空的,或者只有被忽略的檔案。在你加入一份被追蹤的文件之前,連結不會生效。"
],
"eiUA4k": [["count", "plural", { "other": ["#", " 則註解"] }]],
+ "el2KyL": ["在此專案中找到 Slidev。簡報將使用專案的版本。"],
"emgiet": ["權威內容;在所有被參照的地方逐字鏡像。"],
"enPTnx": ["第 ", ["displayLine"], " 行"],
"eoEUI3": ["無法解決那則註解。"],
@@ -2364,6 +2383,7 @@
"evHlIg": ["「跟隨」不會推送或提交你的本機變更。它們只會留在這台電腦上。"],
"evs0iw": ["符合「", ["tagListQuery"], "」的標籤"],
"ezUmoU": ["允許的元素值(留空 = 任意)"],
+ "f14doC": ["Slidev"],
"f1XQyZ": ["移動區塊"],
"f3Nvg7": [["0"], " 無法接續這次對話——記錄已保留,但代理工作階段已結束。"],
"f65AOQ": ["起點"],
@@ -2510,6 +2530,7 @@
"hQjvzi": ["一個 .zip 或 .skill 封存檔。"],
"hSBIG-": ["標題、描述、標籤——任何能描述這個資料夾的資訊。"],
"hSySVc": ["安裝交接失敗:", ["msg"]],
+ "hVAkI8": ["在終端機中執行"],
"hXUWyd": ["這一項必填"],
"hXbSxc": ["資產:", ["title"]],
"hY8pka": ["選取下一個出現的位置"],
@@ -2540,6 +2561,7 @@
"hxnF0I": [["0"], " 屬性"],
"hyCxJY": ["改為開啟那個 worktree"],
"hynz2K": ["下載已開始"],
+ "hz076O": ["Slidev 安裝指令"],
"i-ShMB": ["圖表"],
"i-wHEp": ["正在原地編輯 ", ["boldName"], "。變更會直接存到你編輯器裡的那份副本。"],
"i09An-": ["已還原到較早的版本(", ["0"], ")"],
@@ -2788,6 +2810,7 @@
"技能內部的一個路徑——任何資料夾都可以(例如 references/notes.md)。路徑中的資料夾會自動建立。"
],
"lPzyrU": ["所有差異區塊都已解決"],
+ "lScd1O": ["Slidev 簡報僅能在 OpenKnowledge 桌面應用程式中開啟。"],
"lUtr1r": ["已選取 ", ["1"], " 項中的 ", ["0"], " 項"],
"lVWEIL": ["已索引 ", ["total"], " 個頁面中的 ", ["embedded"], " 個。"],
"lWNpNB": ["透過 CodeMirror 新增游標或選取相符的項目。"],
@@ -3385,6 +3408,7 @@
"w3vFfL": ["隱藏「檔案」"],
"w4ZzmQ": ["無法連上嵌入服務供應商——請再試一次"],
"w4hMYl": ["無法讀取這個專案的分支狀態。請關閉這個對話方塊,再重新開啟分享連結。"],
+ "w52SKa": ["在 Slidev 中開啟"],
"w61W3L": ["移除 ", ["0"]],
"w6sBjd": ["終端機設定尚未載入——請稍候再試"],
"w6sT-y": ["跟著代理的編輯走"],
@@ -3406,6 +3430,7 @@
"wJo9oS": ["關閉尋找"],
"wQp1V3": ["<0>", ["src"], "</0> 的鏡像"],
"wQvvZY": ["新增技能檔案"],
+ "wRni1Z": ["停用 Slidev"],
"wT4iQr": ["開啟視覺化編輯器的尋找,並展開取代控制項。"],
"wTcjov": ["沒有工作區"],
"wU8WyK": ["元素欄位"],
@@ -3482,6 +3507,7 @@
"xrVr_k": ["無法建立技能:", ["0"]],
"xsZhu-": ["頁碼"],
"xtJgSe": ["這個來源包含好幾個技能——請選要匯入的那一個。"],
+ "xxRpzT": ["在你的系統中找到 Slidev。"],
"xzAmL_": ["已自動核准"],
"xzktOa": ["編輯維基連結"],
"y1eoq1": ["複製連結"],
diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.po
index ffa11bd4a..f4ab3f710 100644
--- a/packages/app/src/locales/zh-Hant/messages.po
+++ b/packages/app/src/locales/zh-Hant/messages.po
@@ -2066,6 +2066,10 @@ msgstr "正在檢查"
msgid "Checking for agents"
msgstr "正在尋找代理"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Checking for Slidev"
+msgstr "正在檢查 Slidev"
+
#: src/components/SyncStatusBadge.tsx
msgid "Checking for updates"
msgstr "正在檢查更新"
@@ -3234,6 +3238,10 @@ msgstr "無法開啟終端機——那些註解仍在等著傳送。"
msgid "Couldn't open the worktree. Try again."
msgstr "無法開啟 worktree。請再試一次。"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't open this document in Slidev."
+msgstr "無法在 Slidev 中開啟此文件。"
+
#: src/lib/share/publish-wizard.ts
msgid "Couldn't prepare this project for publish."
msgstr "無法為發布準備這個專案。"
@@ -3412,6 +3420,10 @@ msgstr "無法分享技能:內部錯誤。請重新啟動應用程式。"
msgid "Couldn't start {0}: {1}"
msgstr "無法啟動 {0}:{1}"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Couldn't start Slidev."
+msgstr "無法啟動 Slidev。"
+
#: src/lib/acp/launch-agent-thread.ts
msgid "Couldn't start the agent thread — please try again."
msgstr "無法啟動代理執行緒——請再試一次。"
@@ -3968,6 +3980,10 @@ msgstr "關閉外部連結預覽"
msgid "Disable semantic search"
msgstr "關閉語意搜尋"
+#: src/components/settings/LintingSection.tsx
+msgid "Disable Slidev"
+msgstr "停用 Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Disable Spell Check"
msgstr "關閉拼字檢查"
@@ -4468,6 +4484,10 @@ msgstr "啟用外掛"
msgid "Enable semantic search"
msgstr "開啟語意搜尋"
+#: src/components/settings/LintingSection.tsx
+msgid "Enable Slidev"
+msgstr "啟用 Slidev"
+
#: src/lib/native-menu-catalog.ts
msgid "Enable Spell Check"
msgstr "開啟拼字檢查"
@@ -4901,6 +4921,10 @@ msgstr "重新排序失敗"
msgid "Failed to save content rules — {0}"
msgstr "儲存內容規則失敗——{0}"
+#: src/components/settings/LintingSection.tsx
+msgid "Failed to save Slidev setting"
+msgstr "儲存 Slidev 設定失敗"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Failed to save the schema field"
msgstr "儲存結構描述欄位失敗"
@@ -6292,11 +6316,11 @@ msgstr "版面配置"
msgid "Layout options"
msgstr "版面配置選項"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more"
msgstr "了解更多"
-#: src/components/settings/LintingSection.tsx
+#: src/components/settings/PluginSectionHeader.tsx
msgid "Learn more about {title}"
msgstr "進一步了解 {title}"
@@ -7854,6 +7878,10 @@ msgstr "用預設應用程式打開"
msgid "Open in file manager"
msgstr "在檔案管理程式中打開"
+#: src/components/SlidesToolbarControls.tsx
+msgid "Open in Slidev"
+msgstr "在 Slidev 中開啟"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "Open in worktree"
msgstr "在 worktree 中開啟"
@@ -8119,6 +8147,14 @@ msgstr "其他"
msgid "Other OK paths are tracked upstream:"
msgstr "其他 OK 路徑在上游受追蹤:"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install"
+msgstr "其他安裝方式"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Other ways to install Slidev"
+msgstr "安裝 Slidev 的其他方式"
+
#: src/components/LinksPanel.tsx
msgid "Outgoing"
msgstr "連出"
@@ -8459,6 +8495,14 @@ msgstr "正在準備分享 URL…"
msgid "Preparing to uninstall OpenKnowledge"
msgstr "正在準備解除安裝 OpenKnowledge"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Present a document as a slide deck in its own window. Add <0>slides: true</0> to a document's frontmatter, then open it with the Slidev action. Rendering is handled by the Slidev CLI, which OpenKnowledge does not bundle."
+msgstr "在獨立視窗中將文件展示為簡報。在文件的 frontmatter 中加入 <0>slides: true</0>,再透過 Slidev 動作開啟。算繪由 Slidev CLI 處理,OpenKnowledge 並未內建。"
+
+#: src/components/settings/LintingSection.tsx
+msgid "Present a document as a slide deck in its own window. Works in the OpenKnowledge desktop app only, and needs the Slidev CLI, which you install separately. When on, it appears under Plugins in the sidebar."
+msgstr "在獨立視窗中將文件展示為簡報。僅能在 OpenKnowledge 桌面應用程式中使用,並需要另外安裝 Slidev CLI。啟用後會顯示在側邊欄的 Plugins 下。"
+
#: src/components/EditorWorkspace.tsx
msgid "Press Space to pick up a tab. Use the arrow keys to move it within a tab strip, then press Space or Enter to drop it. Press Shift+F10 or the Menu key to open the tab context menu for split, close, pin, and other tab actions."
msgstr "按空白鍵拾取分頁。使用方向鍵在分頁列內移動,然後按空白鍵或 Enter 鍵放下。按 Shift+F10 或選單鍵開啟分頁的快顯功能表,其中包含分割、關閉、釘選等操作。"
@@ -9494,6 +9538,10 @@ msgstr "在「問題」面板中執行一次專案稽核。"
msgid "Run a real terminal docked inside OpenKnowledge, starting in this project's folder."
msgstr "在 OpenKnowledge 內部停靠執行一個真正的終端機,起始位置是這個專案的資料夾。"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Run in terminal"
+msgstr "在終端機中執行"
+
#: src/components/InstallInClaudeDesktopDialog.tsx
msgid "Run this in your terminal"
msgstr "在你的終端機中執行這個"
@@ -10412,6 +10460,39 @@ msgstr "斜線指令選單"
msgid "Slash commands"
msgstr "斜線指令"
+#: src/components/settings/LintingSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Slidev"
+msgstr "Slidev"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev couldn't render this document."
+msgstr "Slidev 無法算繪此文件。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev decks open in the OpenKnowledge desktop app only."
+msgstr "Slidev 簡報僅能在 OpenKnowledge 桌面應用程式中開啟。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found in this project. Decks will use the project's version."
+msgstr "在此專案中找到 Slidev。簡報將使用專案的版本。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev found on your system."
+msgstr "在你的系統中找到 Slidev。"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev install command"
+msgstr "Slidev 安裝指令"
+
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "Slidev isn't installed, so the Slidev action stays hidden. Install it, then return to this window."
+msgstr "尚未安裝 Slidev,因此 Slidev 動作會保持隱藏。安裝後請回到此視窗。"
+
+#: src/components/SlidesToolbarControls.tsx
+msgid "Slidev timed out while starting. Try again."
+msgstr "Slidev 啟動逾時。請再試一次。"
+
#: src/editor/slash-command/items.tsx
msgid "Small section heading."
msgstr "小型章節標題。"
@@ -11516,6 +11597,10 @@ msgstr "這是 {boldName} 的預覽,在 {boldHarness} 的 {boldLevel} 層級
msgid "This is a preview of {boldName}. Install it into your agents."
msgstr "這是 {boldName} 的預覽。把它安裝到你的代理中。"
+#: src/components/SlidesToolbarControls.tsx
+msgid "This isn't a supported version of Slidev."
+msgstr "這不是支援的 Slidev 版本。"
+
#: src/components/DeleteConfirmationDialog.tsx
msgid "this item"
msgstr "這個項目"
@@ -12371,6 +12456,10 @@ msgstr "正在等你核准"
msgid "Warning"
msgstr "警告"
+#: src/components/settings/SlidesPluginSection.tsx
+msgid "We couldn't check whether Slidev is installed. Return to this window to retry."
+msgstr "無法檢查是否已安裝 Slidev。請回到此視窗重試。"
+
#: src/components/settings/AccountSection.tsx
msgid "We couldn't check your GitHub connection."
msgstr "我們無法檢查你的 GitHub 連線。"
diff --git a/packages/app/tests/stress/fixtures/handoff-mocks.ts b/packages/app/tests/stress/fixtures/handoff-mocks.ts
index 02e5681bd..3d8c1982f 100644
--- a/packages/app/tests/stress/fixtures/handoff-mocks.ts
+++ b/packages/app/tests/stress/fixtures/handoff-mocks.ts
@@ -455,6 +455,19 @@ export async function installHandoffMocks(page: Page, cfg: HandoffMockConfig): P
mode: 'local-only' as const,
}),
},
+ slides: {
+ status: async () =>
+ ({
+ kind: 'status' as const,
+ available: false as const,
+ }) satisfies import('@/lib/desktop-bridge-types').OkSlidesStatusResult,
+ open: async () =>
+ ({
+ kind: 'open' as const,
+ ok: false as const,
+ reason: 'not-available' as const,
+ }) satisfies import('@/lib/desktop-bridge-types').OkSlidesOpenResult,
+ },
bugReport: {
create: async () => ({ ok: false as const, error: 'test mock' }),
captureScreenshot: async () => null,
diff --git a/packages/core/src/config/field-registry.test.ts b/packages/core/src/config/field-registry.test.ts
index c0709979f..ab18b8760 100644
--- a/packages/core/src/config/field-registry.test.ts
+++ b/packages/core/src/config/field-registry.test.ts
@@ -143,7 +143,7 @@ describe('ConfigSchema coverage (NR3 — every leaf has fieldRegistry metadata)'
expect(allowlisted).toEqual([]);
});
- test('user-strict fields cover agents.autoApproveOkTools + appearance.{colorTheme*,customTheme.*,language,preview.autoOpen,theme} + editor.{previewTabs,wordWrap}', () => {
+ test('user-strict fields cover agents.autoApproveOkTools + appearance.{colorTheme*,customTheme.*,language,preview.autoOpen,theme} + editor.{previewTabs,wordWrap} + slides.enabled', () => {
const leaves: { path: string[]; schema: unknown }[] = [];
walkLeaves(ConfigSchema, [], leaves);
const userStrict = leaves
@@ -184,6 +184,9 @@ describe('ConfigSchema coverage (NR3 — every leaf has fieldRegistry metadata)'
'appearance.theme',
'editor.previewTabs',
'editor.wordWrap',
+ // The Slides plugin toggle — a personal preference like the Themes
+ // toggle above, gating whether a `slides: true` doc offers the deck view.
+ 'slides.enabled',
// The one `telemetry` leaf that leaves the machine. USER scope so a
// repository cannot decide that its collaborators report to a third
// party — its `localSink.*` siblings are project-scope and local-only.
diff --git a/packages/core/src/config/schema.test.ts b/packages/core/src/config/schema.test.ts
index 49eba0163..7bc8211d4 100644
--- a/packages/core/src/config/schema.test.ts
+++ b/packages/core/src/config/schema.test.ts
@@ -223,6 +223,24 @@ describe('linkPreviews.enabled (external link-hover preview egress default)', ()
});
});
+describe('slides.enabled (Slides plugin toggle default)', () => {
+ test('resolves to disabled when the section is absent', () => {
+ expect(ConfigSchema.parse({}).slides).toEqual({ enabled: false });
+ });
+
+ test('defaults enabled to false when slides is present but enabled is absent', () => {
+ expect(ConfigSchema.parse({ slides: {} }).slides.enabled).toBe(false);
+ });
+
+ test('accepts an explicit opt-in', () => {
+ expect(ConfigSchema.parse({ slides: { enabled: true } }).slides.enabled).toBe(true);
+ });
+
+ test('accepts an explicit opt-out', () => {
+ expect(ConfigSchema.parse({ slides: { enabled: false } }).slides.enabled).toBe(false);
+ });
+});
+
describe('legacy upload.* keys remain non-authoritative', () => {
test('upload.* keys pass through looseObject without schema error', () => {
const result = ConfigSchema.safeParse({
diff --git a/packages/core/src/config/schema.ts b/packages/core/src/config/schema.ts
index 44307ae11..4c3fed92e 100644
--- a/packages/core/src/config/schema.ts
+++ b/packages/core/src/config/schema.ts
@@ -597,6 +597,27 @@ export const ConfigSchema = z.looseObject({
.default(null),
})
.default({ enabled: null }),
+ // USER-scope: whether the Slides plugin is offered is a personal preference,
+ // not project content — the same posture as the Themes plugin toggle
+ // (appearance.colorThemeEnabled). A document opts into the deck view with
+ // `slides: true` in its own frontmatter; this leaf only gates whether that
+ // affordance appears at all, and only on desktop, where a Slidev process can
+ // be spawned. Default off, so a user who never enables it sees nothing and
+ // pays nothing.
+ slides: z
+ .looseObject({
+ enabled: z
+ .boolean()
+ .register(fieldRegistry, {
+ scope: 'user',
+ agentSettable: false,
+ defaultScope: 'user',
+ description:
+ 'Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off.',
+ })
+ .default(false),
+ })
+ .default({ enabled: false }),
// PROJECT-scope: the local telemetry file sink writes spans + logs to
// `<contentDir>/.ok/local/{telemetry,logs}/*.jsonl` for `ok diagnose bundle`
// to harvest. The data is local-only — it never leaves the machine until
diff --git a/packages/core/src/desktop-bridge.ts b/packages/core/src/desktop-bridge.ts
index 79ad480b9..5572323a3 100644
--- a/packages/core/src/desktop-bridge.ts
+++ b/packages/core/src/desktop-bridge.ts
@@ -953,6 +953,29 @@ export type OkSharingSetModeResult =
readonly reason: 'no-git' | 'no-info-dir' | 'malformed-pointer' | 'inaccessible';
};
+/** Slides (Slidev) — detect-only IPC payload. Canonical types in
+ * `packages/desktop/src/shared/ipc-channels.ts`; mirrored here per the
+ * OkDesktopBridge 3-way-mirror invariant. */
+export type SlidevSource = 'project-local' | 'global';
+
+export type OkSlidesStatusResult =
+ | { readonly kind: 'status'; readonly available: true; readonly source: SlidevSource }
+ | { readonly kind: 'status'; readonly available: false };
+
+/** Why opening a deck as slides failed. Canonical types in
+ * `packages/desktop/src/shared/ipc-channels.ts`; mirrored here. */
+export type SlidevOpenFailureReason =
+ | 'not-available'
+ | 'invalid-path'
+ | 'spawn-error'
+ | 'exited-early'
+ | 'timeout'
+ | 'unsupported-server';
+
+export type OkSlidesOpenResult =
+ | { readonly kind: 'open'; readonly ok: true }
+ | { readonly kind: 'open'; readonly ok: false; readonly reason: SlidevOpenFailureReason };
+
/**
* Payload for `onServerVersionDrift` — the desktop attached to a server whose
* version differs from the running app's (most often a prior version's
@@ -1456,6 +1479,17 @@ export interface OkDesktopBridge {
setSkillsShared(shared: boolean): Promise<OkSharingSetModeResult>;
};
+ /**
+ * Slides (Slidev) — `status` detects a runnable `slidev`; `open` starts (or
+ * reuses) a server for the deck and resolves once it is confirmed serving.
+ * Canonical JSDoc in `packages/desktop/src/shared/ipc-channels.ts`.
+ * Mirrored here per the OkDesktopBridge 3-way-mirror invariant.
+ */
+ slides: {
+ status(): Promise<OkSlidesStatusResult>;
+ open(docPath: string): Promise<OkSlidesOpenResult>;
+ };
+
/**
* In-app "Report a bug" — `create` builds the redacted diagnostic zip
* (optional crash-dump opt-in via `includeCrashDump`, optional app
diff --git a/packages/desktop/src/main/graceful-terminate.test.ts b/packages/desktop/src/main/graceful-terminate.test.ts
new file mode 100644
index 000000000..79a6f7532
--- /dev/null
+++ b/packages/desktop/src/main/graceful-terminate.test.ts
@@ -0,0 +1,99 @@
+/**
+ * Tests for the SIGTERM → grace-poll → SIGKILL teardown ladder.
+ *
+ * Every case runs on a virtual clock: `sleep` advances the clock and resolves
+ * synchronously, so the grace window and its escalation are deterministic and
+ * take no wall-clock time. The assertions pin the ORDER and the exact SIGNALS
+ * sent, not merely that a kill happened.
+ */
+
+import { describe, expect, it } from 'vitest';
+import { gracefulTerminate } from './graceful-terminate.ts';
+
+/**
+ * Assemble deps around a virtual clock and a scripted liveness. `aliveForChecks`
+ * is how many of the grace-window liveness polls report the process still
+ * running before it is observed gone; `Infinity` models a process that never
+ * exits (forcing escalation).
+ */
+function scriptedDeps(opts: { aliveForChecks: number; graceMs?: number; pollMs?: number }) {
+ let clock = 0;
+ let checks = 0;
+ const signals: Array<'SIGTERM' | 'SIGKILL'> = [];
+ const sleeps: number[] = [];
+ return {
+ deps: {
+ sendSignal: (s: 'SIGTERM' | 'SIGKILL') => {
+ signals.push(s);
+ },
+ isAlive: () => {
+ checks += 1;
+ return checks <= opts.aliveForChecks;
+ },
+ now: () => clock,
+ sleep: (ms: number) => {
+ sleeps.push(ms);
+ clock += ms;
+ return Promise.resolve();
+ },
+ graceMs: opts.graceMs,
+ pollMs: opts.pollMs,
+ },
+ signals: () => signals,
+ sleeps: () => sleeps,
+ };
+}
+
+describe('gracefulTerminate', () => {
+ it('escalates SIGTERM → SIGKILL when the process stays alive through the grace window', async () => {
+ const { deps, signals } = scriptedDeps({
+ aliveForChecks: Infinity,
+ graceMs: 1_000,
+ pollMs: 250,
+ });
+ const result = await gracefulTerminate(deps);
+ // Order matters: the gentle signal first, the hard signal only after grace.
+ expect(signals()).toEqual(['SIGTERM', 'SIGKILL']);
+ expect(result).toEqual({ escalated: true });
+ });
+
+ it('sends SIGTERM alone — never SIGKILL — when the process exits within the grace window', async () => {
+ // Alive on the first poll, gone on the second: it died mid-grace.
+ const { deps, signals } = scriptedDeps({ aliveForChecks: 1, graceMs: 1_000, pollMs: 250 });
+ const result = await gracefulTerminate(deps);
+ expect(signals()).toEqual(['SIGTERM']);
+ expect(result).toEqual({ escalated: false });
+ });
+
+ it('sends SIGTERM first, before any liveness poll or sleep', async () => {
+ // Already gone at the first poll — proves SIGTERM precedes the grace loop and
+ // a fast exit is neither polled-around nor SIGKILLed.
+ const { deps, signals, sleeps } = scriptedDeps({
+ aliveForChecks: 0,
+ graceMs: 1_000,
+ pollMs: 250,
+ });
+ const result = await gracefulTerminate(deps);
+ expect(signals()).toEqual(['SIGTERM']);
+ expect(sleeps()).toEqual([]);
+ expect(result).toEqual({ escalated: false });
+ });
+
+ it('defaults the grace and poll cadence to the shared lifecycle constants', async () => {
+ // No graceMs/pollMs supplied: the loop must run the shared 10 s / 200 ms —
+ // 50 polls of 200 ms each — then escalate. Pins the defaults behaviorally.
+ const { deps, signals, sleeps } = scriptedDeps({ aliveForChecks: Infinity });
+ const result = await gracefulTerminate(deps);
+ expect(signals()).toEqual(['SIGTERM', 'SIGKILL']);
+ expect(sleeps()).toEqual(Array.from({ length: 50 }, () => 200));
+ expect(result).toEqual({ escalated: true });
+ });
+
+ it('does not wait a real timeout — the grace is injectable', async () => {
+ // A tiny grace with an immediate virtual sleep completes instantly; the test
+ // itself is the proof (it returns without a wall-clock stall).
+ const { deps, signals } = scriptedDeps({ aliveForChecks: Infinity, graceMs: 1, pollMs: 1 });
+ await gracefulTerminate(deps);
+ expect(signals()).toEqual(['SIGTERM', 'SIGKILL']);
+ });
+});
diff --git a/packages/desktop/src/main/graceful-terminate.ts b/packages/desktop/src/main/graceful-terminate.ts
new file mode 100644
index 000000000..0ccce93cf
--- /dev/null
+++ b/packages/desktop/src/main/graceful-terminate.ts
@@ -0,0 +1,59 @@
+/**
+ * SIGTERM → grace-poll → SIGKILL process teardown, extracted so the slides deck
+ * reap can reuse the ladder the desktop already runs for its detached servers
+ * (`window-manager.ts`'s `stopAllOwnedServers` / `terminateServerByPid`) rather
+ * than force-killing outright. A hard SIGKILL denies a Vite-backed dev server
+ * the chance to release its port and flush its on-disk cache; SIGTERM first,
+ * escalating only if a bounded grace expires, gives it that chance.
+ *
+ * Pure over its injected `sendSignal` / `isAlive` / clock, so the escalation is
+ * unit-testable on a virtual clock with no real subprocess and no wall-clock
+ * wait. The grace + poll cadence default to the shared `@inkeep/open-knowledge-
+ * core` lifecycle constants, so slides teardown stays calibrated in lockstep
+ * with the server-teardown paths that own those numbers.
+ */
+
+import { DEFAULT_SIGTERM_GRACE_MS, DEFAULT_SIGTERM_POLL_MS } from '@inkeep/open-knowledge-core';
+
+export interface GracefulTerminateDeps {
+ /** Deliver `signal` to the target. Must be total (swallow "already gone"):
+ * the caller owns a possibly-dead process, so a send is best-effort. */
+ sendSignal(signal: 'SIGTERM' | 'SIGKILL'): void;
+ /** Whether the target is still running — polled during the grace window to
+ * decide whether escalation is needed. */
+ isAlive(): boolean;
+ /** Monotonic-enough clock for the deadline (real: `Date.now`). */
+ now(): number;
+ /** Sleep `ms` between liveness polls (real: `setTimeout`-backed). */
+ sleep(ms: number): Promise<void>;
+ /** Grace before escalating to SIGKILL. Defaults to the shared 10 s. */
+ graceMs?: number;
+ /** Liveness poll cadence within the grace. Defaults to the shared 200 ms. */
+ pollMs?: number;
+}
+
+/**
+ * SIGTERM the target, then poll its liveness every `pollMs` until it exits or
+ * `graceMs` elapses; escalate to SIGKILL only if it is still alive at the
+ * deadline. Returns `{ escalated: true }` iff SIGKILL was sent — i.e. the grace
+ * expired with the process still running.
+ *
+ * A process that exits within the grace is never SIGKILLed. A process that has
+ * already exited before the first poll is likewise only SIGTERM'd (a no-op the
+ * `sendSignal` contract absorbs) and reported not-escalated.
+ */
+export async function gracefulTerminate(
+ deps: GracefulTerminateDeps,
+): Promise<{ escalated: boolean }> {
+ const graceMs = deps.graceMs ?? DEFAULT_SIGTERM_GRACE_MS;
+ const pollMs = deps.pollMs ?? DEFAULT_SIGTERM_POLL_MS;
+
+ deps.sendSignal('SIGTERM');
+ const deadline = deps.now() + graceMs;
+ while (deps.now() < deadline) {
+ if (!deps.isAlive()) return { escalated: false };
+ await deps.sleep(pollMs);
+ }
+ deps.sendSignal('SIGKILL');
+ return { escalated: true };
+}
diff --git a/packages/desktop/src/main/index.ts b/packages/desktop/src/main/index.ts
index 0ae4fda1e..8456e597a 100644
--- a/packages/desktop/src/main/index.ts
+++ b/packages/desktop/src/main/index.ts
@@ -281,6 +281,7 @@ import {
handleSharingSetSkillsShared,
handleSharingStatus,
} from './ipc/sharing.ts';
+import { handleSlidesOpen, handleSlidesStatus } from './ipc/slides.ts';
import {
detectProtocol as detectProtocolImpl,
recordHandoff as recordHandoffImpl,
@@ -353,6 +354,12 @@ import { applyHarvestedAuthSock, harvestShellAuthSock } from './shell-env.ts';
import { createShowGateRegistry, type ShowGateRegistry } from './show-gate.ts';
import { installSignalCleanQuit } from './signal-clean-quit.ts';
import { reclaimProjectSkillsOnProjectOpen, reclaimUserSkillsOnLaunch } from './skill-reclaim.ts';
+import { resolveDeckPath } from './slides-deck-path.ts';
+import { createSlidesDeckRegistry, type SlidesDeckWindow } from './slides-registry.ts';
+import { recordDeckOpen } from './slides-telemetry.ts';
+import { createSlidesWindow, slidesWindowChrome } from './slides-window.ts';
+import { realIsExecutableFile, resolveSlidev } from './slidev-resolve.ts';
+import { findFreePort, probeSlidevReady, realSpawnSlidev } from './slidev-server.ts';
import { attachSpellcheckContextMenu } from './spellcheck-context-menu.ts';
import { popSpellcheckMenu } from './spellcheck-menu.ts';
import { beginRoot, childSpan, endRoot, injectTraceparent } from './startup-trace.ts';
@@ -907,6 +914,14 @@ let wm: WindowManager;
* quit — callers guard with `?.` / a truthiness check.
*/
let terminalReaper: TerminalReaper | null = null;
+/**
+ * Every open Slidev deck (server + its window), keyed by deck path. Module-scoped
+ * so the `ok:slides:dispatch` `open` handler can focus-existing / open, each
+ * window's close handler can reap its own server, and the `will-quit` handler can
+ * reap them all — no Slidev process outlives the app. Dependency-free, so it is
+ * created eagerly rather than published by `registerIpcHandlers`.
+ */
+const slidesDeckRegistry = createSlidesDeckRegistry();
/**
* Per-window docked-terminal visibility, recorded from the renderer's view-menu
* push so a reloaded renderer can restore an expanded dock. Keyed by windowId
@@ -4006,6 +4021,27 @@ function formatUnknownError(err: unknown): string {
* injected spawn. `args` selects the binary (`cliProbeArgs(bin)`); it defaults
* to the `claude` probe.
*/
+/**
+ * Windows counterpart to {@link probeLoginShellOnPath}: is `bin` resolvable on
+ * this process's PATH? `where.exe` honours PATHEXT, so it finds the `.cmd`
+ * shim that `CreateProcess` can actually run — an extension-less existence
+ * check would report a POSIX shim that then fails to spawn. Exit 0 = found.
+ */
+function probeWindowsPath(bin: string): Promise<boolean> {
+ return new Promise((resolveProbe) => {
+ try {
+ // `where`, not `where.exe` — matches the binary name the CLI's git
+ // preflight already uses (and the one knip's ignore list declares).
+ // CreateProcess resolves it via PATHEXT either way.
+ const child = spawn('where', [bin], { stdio: 'ignore', shell: false, windowsHide: true });
+ child.on('exit', (code) => resolveProbe(code === 0));
+ child.on('error', () => resolveProbe(false));
+ } catch {
+ resolveProbe(false);
+ }
+ });
+}
+
function probeLoginShellOnPath(args?: readonly string[]): Promise<number | null> {
return runLoginShellProbe(
(file, spawnArgs) => {
@@ -5045,6 +5081,154 @@ function registerIpcHandlers() {
return handleSharingSetMode(ctx.projectPath, mode);
});
+ // Slides (Slidev). `status` detects whether a runnable slidev resolves for the
+ // active project window (a window with no bound project still resolves a
+ // global slidev, so the status read is total). `open` starts a server for a
+ // deck and confirms it serves. The global probe reuses the same login-shell
+ // PATH walk the terminal CLI-readiness surface uses (a GUI Electron process
+ // does not inherit the user's shell PATH).
+ handle('ok:slides:dispatch', async (event, request) => {
+ const win = BrowserWindow.fromWebContents(event.sender);
+ const projectRoot =
+ win && wm
+ ? wm.getContextForBrowserWindow(win as unknown as BrowserWindowLike)?.projectPath
+ : undefined;
+ const probes = {
+ isExecutableFile: realIsExecutableFile,
+ // The login-shell probe exists for the macOS/Linux GUI-PATH problem: a
+ // desktop-launched process does not source the user's rc files, so a
+ // globally-installed binary is invisible to `process.env.PATH`. Windows
+ // has neither that problem (a GUI process inherits the user PATH from the
+ // registry) nor a POSIX login shell to run `-l -i -c` against, so it uses
+ // `where.exe`, which also honours PATHEXT and finds the `.cmd` shim.
+ isOnLoginPath: async (bin: string) =>
+ process.platform === 'win32'
+ ? await probeWindowsPath(bin)
+ : (await probeLoginShellOnPath(cliProbeArgs(bin))) === 0,
+ };
+ if (request.kind === 'status') {
+ return handleSlidesStatus(projectRoot, probes);
+ }
+ // Trust boundary: the deck path is a renderer-supplied string over IPC.
+ // Require a bound project and a well-formed absolute path, then canonicalize
+ // via realpath and enforce project containment on the RESOLVED path before
+ // spawning a server against it — the same order the trash / asset handlers
+ // apply. Lexical containment alone would let an in-project symlink whose
+ // target is OUTSIDE the project pass, and Slidev/Vite would then serve that
+ // out-of-project target over loopback; realpath collapses the symlink so the
+ // escape is refused (the window's projectPath is already realpath-canonical
+ // via discoverProject). A window with no project has nothing to contain
+ // against, so it is refused.
+ // Trust boundary: the deck path is a renderer-supplied string over IPC.
+ // The admission decision (bound project + well-formed absolute path +
+ // realpath-then-contain, so an in-project symlink cannot escape) lives in
+ // `slides-deck-path.ts` where it is reachable from a test against a real
+ // filesystem; this site only logs the refusal.
+ const deckPath = resolveDeckPath({
+ docPath: request.docPath,
+ projectRoot,
+ platform: process.platform,
+ realpath: (p) => realpathSync(p),
+ });
+ if (!deckPath.ok) {
+ logIpcError({
+ event: 'ipc.error',
+ channel: 'ok:slides:dispatch',
+ reason: 'invalid-path',
+ handler: 'slidesOpen',
+ ...(deckPath.cause === undefined ? {} : { cause: deckPath.cause }),
+ });
+ return { kind: 'open', ok: false, reason: 'invalid-path' };
+ }
+ // Both come from the admission decision, which proved the root defined —
+ // keeps the narrowing the discriminated spawn config depends on.
+ const { resolvedDocPath, projectRoot: containedRoot } = deckPath;
+ const resolution = await resolveSlidev(projectRoot, probes);
+ if (!resolution.available) {
+ logIpcError({
+ event: 'ipc.error',
+ channel: 'ok:slides:dispatch',
+ reason: 'not-available',
+ handler: 'slidesOpen',
+ });
+ return { kind: 'open', ok: false, reason: 'not-available' };
+ }
+ const opened = await handleSlidesOpen(resolvedDocPath, {
+ registry: slidesDeckRegistry,
+ startDeps: {
+ findFreePort,
+ spawnSlidev: (port) => {
+ const base = { docPath: resolvedDocPath, shell: resolveShell(process.env) };
+ return realSpawnSlidev(
+ resolution.source === 'project-local'
+ ? { ...base, source: 'project-local', projectRoot: containedRoot }
+ : { ...base, source: 'global', projectRoot: containedRoot },
+ port,
+ );
+ },
+ probeReady: probeSlidevReady,
+ now: () => Date.now(),
+ delay: (ms) => new Promise((resolveDelay) => setTimeout(resolveDelay, ms)),
+ },
+ recordOpenAttempt: recordDeckOpen,
+ openWindow: (deck) => {
+ createSlidesWindow({
+ createWindow: (winOpts) => {
+ const win = new BrowserWindow({
+ ...DEFAULT_WIN_OPTS,
+ // A deck loads Slidev's page, not OK's renderer, so it has no
+ // `-webkit-app-region: drag` strip to move the window by. Restore
+ // an ordinary native title bar (see `slidesWindowChrome`).
+ ...slidesWindowChrome(),
+ minWidth: WINDOW_MIN_SIZE.EDITOR.width,
+ minHeight: WINDOW_MIN_SIZE.EDITOR.height,
+ title: winOpts.title,
+ webPreferences: {
+ ...DEFAULT_WIN_OPTS.webPreferences,
+ // Isolate the deck's session from the editor and inject no OK
+ // preload/bridge — a slides window loads the out-of-process
+ // Slidev server, not OK's renderer, so it needs neither.
+ partition: winOpts.partition,
+ },
+ });
+ win.on('page-title-updated', (e) => {
+ e.preventDefault();
+ });
+ applyCascadePosition(win);
+ return win as unknown as SlidesDeckWindow;
+ },
+ registry: slidesDeckRegistry,
+ deck: { docPath: deck.docPath, port: deck.port, process: deck.process },
+ });
+ },
+ focusWindow: (window) => {
+ // Raise the already-open deck window (restore → show → moveTop → focus),
+ // the recipe editor windows use to surface an existing window.
+ if (window.isMinimized?.()) window.restore?.();
+ window.show?.();
+ window.moveTop?.();
+ window.focus();
+ },
+ });
+ // The deck-open span + failure counter are emitted inside handleSlidesOpen,
+ // once per genuine spawn attempt — never for a focus-existing reopen or a
+ // joined in-flight activation, which perform no spawn (see recordOpenAttempt
+ // above). That keeps the span's denominator genuine spawn attempts.
+ // Log the start/readiness failure at this boundary before returning it.
+ // Returning handleSlidesOpen(...) directly would let spawn-error / timeout
+ // / unsupported-server reach the renderer unlogged, re-opening the IPC
+ // observability asymmetry the paired-log discipline exists to close.
+ if (!opened.ok) {
+ logIpcError({
+ event: 'ipc.error',
+ channel: 'ok:slides:dispatch',
+ reason: opened.reason,
+ handler: 'slidesOpen',
+ });
+ }
+ return opened;
+ });
+
// In-app bug reporting — build the redacted diagnostic bundle for the
// sender window's project, upload a reviewed bundle to the private intake,
// or acknowledge a crash-detected invitation. Unlike the sibling
@@ -7509,6 +7693,8 @@ function bootPrimaryInstance(): void {
// Reap every window's PTY host first so no user shell / spawn-helper
// outlives the app. Idempotent (clears the map; a second pass no-ops).
terminalReaper?.killAll();
+ // Reap every spawned Slidev server for the same reason. Idempotent.
+ slidesDeckRegistry.reapAll();
dockVisibleForWindow.clear();
agentPanelVisibleForWindow.clear();
dockOrderForWindow.clear();
diff --git a/packages/desktop/src/main/ipc/slides.test.ts b/packages/desktop/src/main/ipc/slides.test.ts
new file mode 100644
index 000000000..2e884ca9c
--- /dev/null
+++ b/packages/desktop/src/main/ipc/slides.test.ts
@@ -0,0 +1,379 @@
+/**
+ * IPC handler tests for the `ok:slides:dispatch` channel (status + open).
+ *
+ * `handleSlidesStatus` is exercised with injected fs/PATH probes; `handleSlidesOpen`
+ * with an injected registry, start deps, and window callbacks — covering the
+ * resolution logic and the open orchestration (dedup→focus, start→open,
+ * failure→nothing) as behavior, without an Electron runtime. The IPC wrapping in
+ * main/index.ts is one createHandler call whose behavior (look up ctx, forward
+ * projectPath) is shared with every project-scoped IPC and is covered by the
+ * existing main-side tests for those siblings.
+ */
+
+import { join } from 'node:path';
+import { describe, expect, it } from 'vitest';
+import type { OkSlidesOpenResult } from '../../shared/ipc-channels.ts';
+import { createSlidesDeckRegistry, type SlidesDeckWindow } from '../slides-registry.ts';
+import type { SlidevResolveProbes } from '../slidev-resolve.ts';
+import type { SlidevProcess, StartSlidevDeps } from '../slidev-server.ts';
+import { handleSlidesOpen, handleSlidesStatus } from './slides.ts';
+
+const PROJECT = '/tmp/deck-project';
+const LOCAL_BIN = join(PROJECT, 'node_modules', '.bin', 'slidev');
+
+/** Build injected probes from explicit fs/PATH state, recording every query so
+ * tests can assert the resolver looks in the right places. */
+function fakeProbes(state: { executablePaths?: string[]; onLoginPath?: string[] }) {
+ const executable = new Set(state.executablePaths ?? []);
+ const onPath = new Set(state.onLoginPath ?? []);
+ const execQueries: string[] = [];
+ const pathQueries: string[] = [];
+ const probes: SlidevResolveProbes = {
+ isExecutableFile: async (p) => {
+ execQueries.push(p);
+ return executable.has(p);
+ },
+ isOnLoginPath: async (bin) => {
+ pathQueries.push(bin);
+ return onPath.has(bin);
+ },
+ };
+ return { probes, execQueries, pathQueries };
+}
+
+describe('handleSlidesStatus', () => {
+ it('reports project-local when the project has its own slidev', async () => {
+ const { probes, execQueries } = fakeProbes({ executablePaths: [LOCAL_BIN] });
+ const result = await handleSlidesStatus(PROJECT, probes);
+ expect(result).toEqual({ kind: 'status', available: true, source: 'project-local' });
+ // Proves the project's node_modules/.bin/slidev was the path probed.
+ expect(execQueries).toContain(LOCAL_BIN);
+ });
+
+ it('falls back to a global slidev when the project has none', async () => {
+ const { probes } = fakeProbes({ onLoginPath: ['slidev'] });
+ const result = await handleSlidesStatus(PROJECT, probes);
+ expect(result).toEqual({ kind: 'status', available: true, source: 'global' });
+ });
+
+ it('prefers the project-local slidev over a global one', async () => {
+ const { probes, pathQueries } = fakeProbes({
+ executablePaths: [LOCAL_BIN],
+ onLoginPath: ['slidev'],
+ });
+ const result = await handleSlidesStatus(PROJECT, probes);
+ expect(result).toEqual({ kind: 'status', available: true, source: 'project-local' });
+ // Resolving locally short-circuits before the (slower) login-shell probe.
+ expect(pathQueries).toEqual([]);
+ });
+
+ it('reports unavailable when neither a project-local nor a global slidev resolves', async () => {
+ const { probes } = fakeProbes({});
+ const result = await handleSlidesStatus(PROJECT, probes);
+ expect(result).toEqual({ kind: 'status', available: false });
+ });
+
+ it('resolves a global slidev for a window with no project, without touching the filesystem', async () => {
+ const { probes, execQueries } = fakeProbes({ onLoginPath: ['slidev'] });
+ const result = await handleSlidesStatus(undefined, probes);
+ expect(result).toEqual({ kind: 'status', available: true, source: 'global' });
+ // No projectRoot → no project-local path to stat.
+ expect(execQueries).toEqual([]);
+ });
+
+ it('reports unavailable for a window with no project and no global slidev', async () => {
+ const { probes } = fakeProbes({});
+ const result = await handleSlidesStatus(undefined, probes);
+ expect(result).toEqual({ kind: 'status', available: false });
+ });
+});
+
+const DECK = '/decks/talk/slides.md';
+
+function fakeSlidevProcess(): SlidevProcess {
+ return { onExit: () => {}, signal: () => {}, isAlive: () => true, pid: 7 };
+}
+
+/** A stand-in deck window for pre-registration + focus assertions. */
+function fakeWindow(id: number): SlidesDeckWindow {
+ return { id } as unknown as SlidesDeckWindow;
+}
+
+/** Start deps whose server becomes ready immediately, on `port`. */
+function readyStartDeps(port: number): { deps: StartSlidevDeps; process: SlidevProcess } {
+ const process = fakeSlidevProcess();
+ return {
+ process,
+ deps: {
+ findFreePort: () => Promise.resolve(port),
+ spawnSlidev: () => process,
+ probeReady: () => Promise.resolve({ reachable: true, hasVersionMeta: true }),
+ now: () => 0,
+ delay: () => Promise.resolve(),
+ },
+ };
+}
+
+/** Start deps whose server never becomes reachable, so the poll times out. */
+function timingOutStartDeps(): { deps: StartSlidevDeps; spawned: () => boolean } {
+ let spawned = false;
+ let clock = 0;
+ return {
+ spawned: () => spawned,
+ deps: {
+ findFreePort: () => Promise.resolve(4100),
+ spawnSlidev: () => {
+ spawned = true;
+ return fakeSlidevProcess();
+ },
+ probeReady: () => Promise.resolve({ reachable: false }),
+ now: () => clock,
+ delay: (ms) => {
+ clock += ms;
+ return Promise.resolve();
+ },
+ timeoutMs: 500,
+ pollIntervalMs: 250,
+ },
+ };
+}
+
+describe('handleSlidesOpen', () => {
+ it('starts a server and opens the ready deck in a window', async () => {
+ const registry = createSlidesDeckRegistry();
+ const { deps: startDeps, process } = readyStartDeps(5200);
+ const opened: Array<{ docPath: string; port: number; process: SlidevProcess }> = [];
+ const result = await handleSlidesOpen(DECK, {
+ registry,
+ startDeps,
+ openWindow: (deck) => opened.push(deck),
+ focusWindow: () => {
+ throw new Error('a fresh open must not focus an existing window');
+ },
+ recordOpenAttempt: () => {},
+ });
+ expect(result).toEqual({ kind: 'open', ok: true });
+ // The confirmed server + its port are handed to the window factory.
+ expect(opened).toEqual([{ docPath: DECK, port: 5200, process }]);
+ });
+
+ it('joins an in-flight open instead of spawning a rival server for the same deck', async () => {
+ // A deck is registered only once its server is confirmed serving, and a
+ // cold Slidev start takes seconds — so two activations inside that window
+ // (a double-click on the toolbar action) both find an empty registry.
+ // Without the in-flight marker both spawn, and the second window's
+ // registration overwrites the first, leaving a server the registry — and
+ // so app-quit reapAll — knows nothing about.
+ const registry = createSlidesDeckRegistry();
+ let spawns = 0;
+ let releaseProbe: (() => void) | undefined;
+ const gate = new Promise<void>((resolve) => {
+ releaseProbe = resolve;
+ });
+ const startDeps: StartSlidevDeps = {
+ findFreePort: () => Promise.resolve(5300),
+ spawnSlidev: () => {
+ spawns += 1;
+ return fakeSlidevProcess();
+ },
+ // Hold the first attempt open across the second activation.
+ probeReady: async () => {
+ await gate;
+ return { reachable: true, hasVersionMeta: true };
+ },
+ now: () => 0,
+ delay: () => Promise.resolve(),
+ };
+ const opened: Array<{ docPath: string; port: number }> = [];
+ const deps = {
+ registry,
+ startDeps,
+ openWindow: (deck: { docPath: string; port: number; process: SlidevProcess }) => {
+ opened.push({ docPath: deck.docPath, port: deck.port });
+ registry.register({ ...deck, window: fakeWindow(opened.length) });
+ },
+ focusWindow: () => {},
+ recordOpenAttempt: () => {},
+ };
+
+ const first = handleSlidesOpen(DECK, deps);
+ const second = handleSlidesOpen(DECK, deps);
+ releaseProbe?.();
+ const results = await Promise.all([first, second]);
+
+ expect(results).toEqual([
+ { kind: 'open', ok: true },
+ { kind: 'open', ok: true },
+ ]);
+ expect(spawns).toBe(1);
+ expect(opened).toEqual([{ docPath: DECK, port: 5300 }]);
+ expect(registry.size()).toBe(1);
+ });
+
+ it('gives a joined activation the real verdict when the in-flight open fails', async () => {
+ // The joiner must not assume success — a failed start has to surface to
+ // every activation, or a double-click silently swallows the error for one.
+ const registry = createSlidesDeckRegistry();
+ const { deps: startDeps } = timingOutStartDeps();
+ const deps = {
+ registry,
+ startDeps,
+ openWindow: () => {
+ throw new Error('a timed-out start must not open a window');
+ },
+ focusWindow: () => {},
+ recordOpenAttempt: () => {},
+ };
+ const results = await Promise.all([handleSlidesOpen(DECK, deps), handleSlidesOpen(DECK, deps)]);
+ expect(results).toEqual([
+ { kind: 'open', ok: false, reason: 'timeout' },
+ { kind: 'open', ok: false, reason: 'timeout' },
+ ]);
+ // The marker is cleared on failure, so a later retry can start fresh.
+ expect(registry.getOpenInFlight(DECK)).toBeUndefined();
+ });
+
+ it('focuses an already-open deck instead of spawning a second server', async () => {
+ const registry = createSlidesDeckRegistry();
+ const window = fakeWindow(1);
+ registry.register({ docPath: DECK, port: 5200, process: fakeSlidevProcess(), window });
+
+ let secondSpawned = false;
+ const focused: SlidesDeckWindow[] = [];
+ const result = await handleSlidesOpen(DECK, {
+ registry,
+ startDeps: {
+ findFreePort: () => Promise.resolve(5300),
+ spawnSlidev: () => {
+ secondSpawned = true;
+ return fakeSlidevProcess();
+ },
+ probeReady: () => Promise.resolve({ reachable: true, hasVersionMeta: true }),
+ now: () => 0,
+ delay: () => Promise.resolve(),
+ },
+ openWindow: () => {
+ throw new Error('an already-open deck must not open a second window');
+ },
+ focusWindow: (w) => focused.push(w),
+ recordOpenAttempt: () => {},
+ });
+ expect(result).toEqual({ kind: 'open', ok: true });
+ expect(secondSpawned).toBe(false);
+ expect(focused).toEqual([window]);
+ });
+
+ it('reports the start failure and opens nothing when readiness never lands', async () => {
+ const registry = createSlidesDeckRegistry();
+ const { deps: startDeps, spawned } = timingOutStartDeps();
+ let openedCount = 0;
+ const result = await handleSlidesOpen(DECK, {
+ registry,
+ startDeps,
+ openWindow: () => {
+ openedCount += 1;
+ },
+ focusWindow: () => {},
+ recordOpenAttempt: () => {},
+ });
+ expect(result).toEqual({ kind: 'open', ok: false, reason: 'timeout' });
+ expect(spawned()).toBe(true);
+ // A failed start opens no window — no blank window onto a dead port.
+ expect(openedCount).toBe(0);
+ });
+
+ it('records exactly one open attempt for a fresh spawn', async () => {
+ const registry = createSlidesDeckRegistry();
+ const attempts: OkSlidesOpenResult[] = [];
+ await handleSlidesOpen(DECK, {
+ registry,
+ startDeps: readyStartDeps(5200).deps,
+ openWindow: (deck) => registry.register({ ...deck, window: fakeWindow(1) }),
+ focusWindow: () => {},
+ recordOpenAttempt: (r) => attempts.push(r),
+ });
+ expect(attempts).toEqual([{ kind: 'open', ok: true }]);
+ });
+
+ it('records no open attempt when focusing an already-open deck (no spawn happened)', async () => {
+ const registry = createSlidesDeckRegistry();
+ registry.register({
+ docPath: DECK,
+ port: 5200,
+ process: fakeSlidevProcess(),
+ window: fakeWindow(1),
+ });
+ const attempts: OkSlidesOpenResult[] = [];
+ await handleSlidesOpen(DECK, {
+ registry,
+ startDeps: readyStartDeps(5300).deps,
+ openWindow: () => {
+ throw new Error('an already-open deck must not open a second window');
+ },
+ focusWindow: () => {},
+ recordOpenAttempt: (r) => attempts.push(r),
+ });
+ // Focus-existing spawns nothing, so it is not a genuine open attempt.
+ expect(attempts).toEqual([]);
+ });
+
+ it('records one open attempt — not two — when a second activation joins the in-flight open', async () => {
+ // The double-click case the in-flight registry exists for: one spawn, two
+ // returned oks. Telemetry must count the single spawn once, not once per
+ // activation, or adoption/failure rates are inflated.
+ const registry = createSlidesDeckRegistry();
+ let releaseProbe: (() => void) | undefined;
+ const gate = new Promise<void>((resolve) => {
+ releaseProbe = resolve;
+ });
+ const startDeps: StartSlidevDeps = {
+ findFreePort: () => Promise.resolve(5300),
+ spawnSlidev: () => fakeSlidevProcess(),
+ probeReady: async () => {
+ await gate;
+ return { reachable: true, hasVersionMeta: true };
+ },
+ now: () => 0,
+ delay: () => Promise.resolve(),
+ };
+ const attempts: OkSlidesOpenResult[] = [];
+ const deps = {
+ registry,
+ startDeps,
+ openWindow: (deck: { docPath: string; port: number; process: SlidevProcess }) =>
+ registry.register({ ...deck, window: fakeWindow(1) }),
+ focusWindow: () => {},
+ recordOpenAttempt: (r: OkSlidesOpenResult) => attempts.push(r),
+ };
+
+ const first = handleSlidesOpen(DECK, deps);
+ const second = handleSlidesOpen(DECK, deps);
+ releaseProbe?.();
+ await Promise.all([first, second]);
+
+ expect(attempts).toEqual([{ kind: 'open', ok: true }]);
+ });
+
+ it('opens two different decks in their own windows on their own ports', async () => {
+ const registry = createSlidesDeckRegistry();
+ const opened: Array<{ docPath: string; port: number }> = [];
+ const openDeck = (docPath: string, port: number) =>
+ handleSlidesOpen(docPath, {
+ registry,
+ startDeps: readyStartDeps(port).deps,
+ openWindow: (deck) => opened.push({ docPath: deck.docPath, port: deck.port }),
+ focusWindow: () => {
+ throw new Error('distinct decks never focus');
+ },
+ recordOpenAttempt: () => {},
+ });
+
+ await openDeck('/decks/a.md', 5200);
+ await openDeck('/decks/b.md', 5300);
+
+ expect(opened).toEqual([
+ { docPath: '/decks/a.md', port: 5200 },
+ { docPath: '/decks/b.md', port: 5300 },
+ ]);
+ });
+});
diff --git a/packages/desktop/src/main/ipc/slides.ts b/packages/desktop/src/main/ipc/slides.ts
new file mode 100644
index 000000000..c7e1b4648
--- /dev/null
+++ b/packages/desktop/src/main/ipc/slides.ts
@@ -0,0 +1,138 @@
+/**
+ * IPC handler implementations for the Slides (Slidev) surface.
+ *
+ * Single channel `ok:slides:dispatch` with discriminated args:
+ * - `status` — pure read; whether a runnable `slidev` resolved for the
+ * window's project and from where (project-local vs global).
+ * - `open` — start a `slidev` server for a deck, confirm it serves, and open
+ * it in a dedicated window; a deck already open focuses its
+ * window instead of spawning again.
+ *
+ * Project scoping: each editor window has one bound project via the
+ * window-manager context. The renderer never passes a project; main looks it up
+ * from `event.sender`. For `open`, main also validates the deck path is absolute
+ * and inside that project before it reaches here.
+ *
+ * Electron-free and dependency-injected (resolution probes, the start deps, and
+ * the deck registry are passed in) so this unit-tests without an Electron
+ * runtime; `main/index.ts` wires the real ones.
+ */
+
+import type { OkSlidesOpenResult, OkSlidesStatusResult } from '../../shared/ipc-channels.ts';
+import type { SlidesDeckRegistry, SlidesDeckWindow } from '../slides-registry.ts';
+import { resolveSlidev, type SlidevResolveProbes } from '../slidev-resolve.ts';
+import { type SlidevProcess, type StartSlidevDeps, startSlidevServer } from '../slidev-server.ts';
+
+/**
+ * Pure read — never throws (the injected probes report absence rather than
+ * erroring). Safe to invoke from a mount effect: it performs at most one fs
+ * stat plus one login-shell probe, and reports `available: false` when neither
+ * a project-local nor a global `slidev` resolves.
+ */
+export async function handleSlidesStatus(
+ projectRoot: string | undefined,
+ probes: SlidevResolveProbes,
+): Promise<OkSlidesStatusResult> {
+ const resolution = await resolveSlidev(projectRoot, probes);
+ return resolution.available
+ ? { kind: 'status', available: true, source: resolution.source }
+ : { kind: 'status', available: false };
+}
+
+export interface SlidesOpenDeps {
+ /** App-wide deck registry — read for the one-deck dedup (focus-existing), and
+ * for the in-flight marker that dedups activations arriving before the first
+ * one has finished starting its server. */
+ registry: Pick<
+ SlidesDeckRegistry,
+ | 'get'
+ | 'getOpenInFlight'
+ | 'setOpenInFlight'
+ | 'clearOpenInFlight'
+ | 'trackSpawned'
+ | 'untrackSpawned'
+ >;
+ /** Injected deps for {@link startSlidevServer} (spawn, free port, probe, clock). */
+ startDeps: StartSlidevDeps;
+ /** Open a confirmed-ready deck in its window. The window factory records the
+ * deck and wires its close-time reap, so this returns nothing. Injected so
+ * the orchestration unit-tests without an Electron runtime. */
+ openWindow(deck: { docPath: string; port: number; process: SlidevProcess }): void;
+ /** Raise an already-open deck's window to the foreground. */
+ focusWindow(window: SlidesDeckWindow): void;
+ /** Record one genuine deck-open attempt — a spawn was actually tried. Fired
+ * exactly once per attempt from inside the in-flight promise, so it never
+ * double-counts a joined activation and never fires for a focus-existing
+ * reopen (neither spawns). Injected so this module stays Electron- and
+ * telemetry-free; `main/index.ts` wires it to `recordDeckOpen`. Required (not
+ * optional) so a future refactor that drops the wiring fails to compile rather
+ * than silently stopping the adoption/failure signal. */
+ recordOpenAttempt(result: OkSlidesOpenResult): void;
+}
+
+/**
+ * Open the deck at `docPath` as slides. `docPath` is already validated absolute +
+ * project-contained by the caller. A deck already open focuses its existing
+ * window (one deck, one server, one window); otherwise a server is started and,
+ * only once it is confirmed serving, opened in a window. The four start/readiness
+ * failure reasons flow straight from {@link startSlidevServer}; the caller adds
+ * `not-available` / `invalid-path`.
+ *
+ * The one-deck guarantee spans two windows of time, so it takes two checks. A
+ * deck that finished opening is in the registry and is focused. A deck still
+ * starting is not — registration only happens once its server is confirmed
+ * serving, seconds after a cold Slidev start begins — so a second activation in
+ * that gap (a double-click on the toolbar action) joins the in-flight attempt
+ * and returns its real verdict, rather than starting a rival server whose window
+ * would then overwrite the first's registry entry.
+ */
+export async function handleSlidesOpen(
+ docPath: string,
+ deps: SlidesOpenDeps,
+): Promise<OkSlidesOpenResult> {
+ const existing = deps.registry.get(docPath);
+ if (existing !== undefined) {
+ deps.focusWindow(existing.window);
+ return { kind: 'open', ok: true };
+ }
+ const inFlight = deps.registry.getOpenInFlight(docPath);
+ if (inFlight !== undefined) return inFlight;
+
+ const attempt = (async (): Promise<OkSlidesOpenResult> => {
+ const started = await startSlidevServer({
+ ...deps.startDeps,
+ // Reachable by app-quit teardown from the instant of spawn, not from the
+ // instant of success — the readiness poll in between takes seconds on a
+ // cold Vite start, and a quit landing there would otherwise strand a
+ // `detached` process holding its port.
+ onSpawned: (process) => deps.registry.trackSpawned(docPath, process),
+ });
+ if (!started.ok) {
+ deps.registry.untrackSpawned(docPath);
+ const result: OkSlidesOpenResult = { kind: 'open', ok: false, reason: started.reason };
+ deps.recordOpenAttempt(result);
+ return result;
+ }
+ try {
+ deps.openWindow({ docPath, port: started.port, process: started.process });
+ } catch (err) {
+ // The server is confirmed serving but never made it into `decks`, so
+ // nothing downstream would ever reap it. Signal before rethrowing.
+ started.process.signal('SIGTERM');
+ throw err;
+ } finally {
+ // `openWindow` registers the deck, so ownership has transferred to
+ // `decks`; on the throw path the signal above already handled it.
+ deps.registry.untrackSpawned(docPath);
+ }
+ const result: OkSlidesOpenResult = { kind: 'open', ok: true };
+ deps.recordOpenAttempt(result);
+ return result;
+ })();
+ deps.registry.setOpenInFlight(docPath, attempt);
+ try {
+ return await attempt;
+ } finally {
+ deps.registry.clearOpenInFlight(docPath);
+ }
+}
diff --git a/packages/desktop/src/main/path-containment.ts b/packages/desktop/src/main/path-containment.ts
index 129ec6fa3..b045d3ccc 100644
--- a/packages/desktop/src/main/path-containment.ts
+++ b/packages/desktop/src/main/path-containment.ts
@@ -14,6 +14,15 @@ export function validateSpawnPath(path: string, platform: NodeJS.Platform): bool
if (!path || typeof path !== 'string') return false;
if (path.includes('\0')) return false;
if (platform === 'win32') {
+ // The Windows spawn path runs through `cmd.exe` (the only way to launch a
+ // `.cmd` shim, and how a global install resolves against PATHEXT), so the
+ // deck path is re-parsed under cmd's grammar after Node builds the command
+ // line. Quoting makes `& | < > ^` inert, but two characters survive it:
+ // `%` still expands inside double quotes, and `"` cannot be quoted at all.
+ // Both are refused here rather than escaped — neither is legal in a Windows
+ // filename anyway (`"`) or plausible in a deck name (`%`), so refusing costs
+ // nothing and removes the class instead of trying to out-escape cmd.
+ if (/["%]/.test(path)) return false;
// Match `C:\…`, `C:/…`, or UNC `\\server\share\…`.
return /^([a-zA-Z]:[\\/]|\\\\)/.test(path);
}
diff --git a/packages/desktop/src/main/slides-deck-path.test.ts b/packages/desktop/src/main/slides-deck-path.test.ts
new file mode 100644
index 000000000..ed1ef0304
--- /dev/null
+++ b/packages/desktop/src/main/slides-deck-path.test.ts
@@ -0,0 +1,144 @@
+/**
+ * The deck-path admission decision, driven against a REAL filesystem.
+ *
+ * The symlink-escape case is the reason this suite exists, and it is the one
+ * case a stubbed resolver cannot honestly prove: the guard's whole job is that
+ * `realpath` collapses an in-project symlink to its out-of-project target, so a
+ * fake `realpath` returning whatever the test scripts would be asserting the
+ * fake, not the guard. These build genuine symlinks in a temp dir and let the
+ * real `realpathSync` resolve them.
+ *
+ * `realpath` stays injected only for the throwing paths (ENOENT / ELOOP), where
+ * provoking the real errno is either slow or platform-fragile — and those cases
+ * assert the refusal, not a resolved value.
+ */
+
+import { mkdirSync, mkdtempSync, realpathSync, rmSync, symlinkSync, writeFileSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { afterAll, beforeAll, describe, expect, test } from 'vitest';
+import { resolveDeckPath } from './slides-deck-path.ts';
+
+let root: string;
+let projectRoot: string;
+let outside: string;
+
+beforeAll(() => {
+ // realpath the temp root itself: on macOS /var is a symlink to /private/var,
+ // so an unresolved projectRoot would make every containment check fail and
+ // the suite would pass for the wrong reason.
+ root = realpathSync(mkdtempSync(join(tmpdir(), 'ok-deck-path-')));
+ projectRoot = join(root, 'project');
+ outside = join(root, 'outside');
+ mkdirSync(join(projectRoot, 'decks'), { recursive: true });
+ mkdirSync(outside, { recursive: true });
+ writeFileSync(join(projectRoot, 'decks', 'talk.md'), '---\nslides: true\n---\n# Deck\n');
+ writeFileSync(join(outside, 'secret.md'), '---\nslides: true\n---\n# Outside\n');
+ // The attack: a file that LOOKS in-project but resolves outside it.
+ symlinkSync(join(outside, 'secret.md'), join(projectRoot, 'decks', 'escape.md'));
+ // A broken symlink — resolves to nothing at all.
+ symlinkSync(join(outside, 'gone.md'), join(projectRoot, 'decks', 'broken.md'));
+});
+
+afterAll(() => {
+ rmSync(root, { recursive: true, force: true });
+});
+
+const real = { platform: process.platform, realpath: (p: string) => realpathSync(p) };
+
+describe('resolveDeckPath — admits a genuine in-project deck', () => {
+ test('resolves a plain deck inside the project', () => {
+ const result = resolveDeckPath({
+ ...real,
+ docPath: join(projectRoot, 'decks', 'talk.md'),
+ projectRoot,
+ });
+ expect(result).toEqual({
+ ok: true,
+ resolvedDocPath: join(projectRoot, 'decks', 'talk.md'),
+ projectRoot,
+ });
+ });
+
+ test('admits a symlink whose target is ALSO inside the project', () => {
+ // Containment is about where the path RESOLVES, not whether a symlink was
+ // involved — refusing every symlink would break legitimate in-project ones.
+ const alias = join(projectRoot, 'decks', 'alias.md');
+ symlinkSync(join(projectRoot, 'decks', 'talk.md'), alias);
+ const result = resolveDeckPath({ ...real, docPath: alias, projectRoot });
+ expect(result).toEqual({
+ ok: true,
+ resolvedDocPath: join(projectRoot, 'decks', 'talk.md'),
+ projectRoot,
+ });
+ });
+});
+
+describe('resolveDeckPath — refuses an escape', () => {
+ test('refuses an in-project symlink that resolves OUTSIDE the project', () => {
+ // The security property. Lexically `decks/escape.md` is inside the project;
+ // it resolves to `outside/secret.md`. Admitting it would have Slidev serve
+ // an out-of-project file over loopback.
+ const result = resolveDeckPath({
+ ...real,
+ docPath: join(projectRoot, 'decks', 'escape.md'),
+ projectRoot,
+ });
+ expect(result).toEqual({ ok: false, reason: 'invalid-path' });
+ });
+
+ test('refuses a path plainly outside the project', () => {
+ const result = resolveDeckPath({
+ ...real,
+ docPath: join(outside, 'secret.md'),
+ projectRoot,
+ });
+ expect(result).toEqual({ ok: false, reason: 'invalid-path' });
+ });
+
+ test('refuses a broken symlink, carrying the OS code and not the path', () => {
+ const result = resolveDeckPath({
+ ...real,
+ docPath: join(projectRoot, 'decks', 'broken.md'),
+ projectRoot,
+ });
+ expect(result.ok).toBe(false);
+ if (result.ok) throw new Error('unreachable');
+ expect(result.reason).toBe('invalid-path');
+ expect(result.cause?.code).toBe('ENOENT');
+ // The deck path must never ride along in diagnostics.
+ expect(JSON.stringify(result)).not.toContain('broken.md');
+ });
+
+ test('refuses when the window has no bound project — nothing to contain against', () => {
+ const result = resolveDeckPath({
+ ...real,
+ docPath: join(projectRoot, 'decks', 'talk.md'),
+ projectRoot: undefined,
+ });
+ expect(result).toEqual({ ok: false, reason: 'invalid-path' });
+ });
+
+ test('refuses a relative path before it ever reaches the filesystem', () => {
+ const result = resolveDeckPath({ ...real, docPath: 'decks/talk.md', projectRoot });
+ expect(result).toEqual({ ok: false, reason: 'invalid-path' });
+ });
+
+ test('surfaces a symlink loop as a refusal with its code', () => {
+ // ELOOP is awkward to provoke portably, so this one case uses an injected
+ // resolver — it asserts the refusal shape, never a resolved path.
+ const result = resolveDeckPath({
+ platform: process.platform,
+ docPath: join(projectRoot, 'decks', 'talk.md'),
+ projectRoot,
+ realpath: () => {
+ throw Object.assign(new Error('ELOOP'), { code: 'ELOOP' });
+ },
+ });
+ expect(result).toEqual({
+ ok: false,
+ reason: 'invalid-path',
+ cause: { code: 'ELOOP' },
+ });
+ });
+});
diff --git a/packages/desktop/src/main/slides-deck-path.ts b/packages/desktop/src/main/slides-deck-path.ts
new file mode 100644
index 000000000..ec60769a2
--- /dev/null
+++ b/packages/desktop/src/main/slides-deck-path.ts
@@ -0,0 +1,79 @@
+/**
+ * Decide whether a renderer-supplied deck path may be spawned against.
+ *
+ * Extracted from the `ok:slides:dispatch` open handler so the decision is
+ * reachable from a test. The pieces it composes are individually covered
+ * (`path-containment.ts` has its own suite), but their COMPOSITION is the
+ * security property — and inline in `main/index.ts` it sat in the wiring, where
+ * nothing could reach it without an Electron runtime.
+ *
+ * Trust boundary: the deck path is a renderer-supplied string over IPC.
+ * Require a bound project and a well-formed absolute path, then canonicalize via
+ * realpath and enforce project containment on the RESOLVED path — the same order
+ * the trash / asset handlers apply. Lexical containment alone would let an
+ * in-project symlink whose target is OUTSIDE the project pass, and Slidev/Vite
+ * would then serve that out-of-project target over loopback; realpath collapses
+ * the symlink so the escape is refused (the window's projectPath is already
+ * realpath-canonical via discoverProject). A window with no project has nothing
+ * to contain against, so it is refused.
+ *
+ * `realpath` is injected so a test can drive the throwing paths (ENOENT on a
+ * broken symlink, ELOOP on a cycle) deterministically; the real filesystem is
+ * the higher-fidelity default and is what the suite exercises for the escape
+ * case, using a genuine symlink rather than a stubbed resolver.
+ */
+
+import { isPathWithinProject, validateSpawnPath } from './path-containment.ts';
+
+/** Why a deck path was refused. `cause.code` carries only the OS error code —
+ * the deck path itself stays out of diagnostics (cardinality/security), and
+ * realpath's own message embeds it. */
+type DeckPathRefusal = {
+ readonly ok: false;
+ readonly reason: 'invalid-path';
+ readonly cause?: { readonly code: string | null };
+};
+
+export type DeckPathResolution =
+ /** `projectRoot` rides along because admission PROVED it defined — carrying it
+ * lets the caller keep the narrowing instead of re-asserting it, which is
+ * what the discriminated spawn config needs for the project-local arm. */
+ | { readonly ok: true; readonly resolvedDocPath: string; readonly projectRoot: string }
+ | DeckPathRefusal;
+
+export interface ResolveDeckPathDeps {
+ /** The renderer-supplied deck path, unvalidated. */
+ readonly docPath: string;
+ /** The window's bound project root, already realpath-canonical. `undefined`
+ * when the window has no project — nothing to contain against. */
+ readonly projectRoot: string | undefined;
+ readonly platform: NodeJS.Platform;
+ /** Injected so the throwing paths are drivable; production passes the real
+ * `node:fs` `realpathSync`. */
+ realpath(path: string): string;
+}
+
+export function resolveDeckPath(deps: ResolveDeckPathDeps): DeckPathResolution {
+ const { docPath, projectRoot, platform } = deps;
+ if (projectRoot === undefined || !validateSpawnPath(docPath, platform)) {
+ return { ok: false, reason: 'invalid-path' };
+ }
+
+ let resolvedDocPath: string;
+ try {
+ resolvedDocPath = deps.realpath(docPath);
+ } catch (err) {
+ // Missing deck, broken symlink, or an unreadable path — refuse rather than
+ // spawn a server against a path that does not resolve.
+ return {
+ ok: false,
+ reason: 'invalid-path',
+ cause: { code: (err as NodeJS.ErrnoException | null)?.code ?? null },
+ };
+ }
+
+ if (!isPathWithinProject(resolvedDocPath, projectRoot, platform)) {
+ return { ok: false, reason: 'invalid-path' };
+ }
+ return { ok: true, resolvedDocPath, projectRoot };
+}
diff --git a/packages/desktop/src/main/slides-registry.test.ts b/packages/desktop/src/main/slides-registry.test.ts
new file mode 100644
index 000000000..080348183
--- /dev/null
+++ b/packages/desktop/src/main/slides-registry.test.ts
@@ -0,0 +1,169 @@
+import { describe, expect, it } from 'vitest';
+import type { OkSlidesOpenResult } from '../shared/ipc-channels.ts';
+import {
+ createSlidesDeckRegistry,
+ type RunningSlidesDeck,
+ type SlidesDeckWindow,
+} from './slides-registry.ts';
+
+/** A stand-in for the deck's window — the registry only stores it, so an id
+ * plus a structural cast is enough. */
+function fakeWindow(id: number): SlidesDeckWindow {
+ return { id } as unknown as SlidesDeckWindow;
+}
+
+/** A deck whose process records the signals it was sent. */
+function fakeDeck(docPath: string, port: number) {
+ const signals: Array<'SIGTERM' | 'SIGKILL'> = [];
+ const deck: RunningSlidesDeck = {
+ docPath,
+ port,
+ process: {
+ onExit: () => {},
+ signal: (sig) => {
+ signals.push(sig);
+ },
+ isAlive: () => true,
+ pid: undefined,
+ },
+ window: fakeWindow(port),
+ };
+ return { deck, signals: () => signals };
+}
+
+describe('createSlidesDeckRegistry', () => {
+ it('returns a registered server by its deck path', () => {
+ const registry = createSlidesDeckRegistry();
+ const { deck } = fakeDeck('/decks/a.md', 3001);
+ registry.register(deck);
+ expect(registry.get('/decks/a.md')).toBe(deck);
+ expect(registry.get('/decks/other.md')).toBeUndefined();
+ });
+
+ it('signals every server to stop with SIGTERM and empties on reapAll', () => {
+ const registry = createSlidesDeckRegistry();
+ const a = fakeDeck('/decks/a.md', 3001);
+ const b = fakeDeck('/decks/b.md', 3002);
+ registry.register(a.deck);
+ registry.register(b.deck);
+ expect(registry.size()).toBe(2);
+
+ registry.reapAll();
+
+ // App-quit teardown asks each server to stop cleanly (SIGTERM), never a
+ // straight SIGKILL that would deny its Vite server a port release + flush.
+ expect(a.signals()).toEqual(['SIGTERM']);
+ expect(b.signals()).toEqual(['SIGTERM']);
+ expect(registry.size()).toBe(0);
+ expect(registry.get('/decks/a.md')).toBeUndefined();
+ });
+
+ it('unregister drops one entry without reaping its process', () => {
+ const registry = createSlidesDeckRegistry();
+ const a = fakeDeck('/decks/a.md', 3001);
+ const b = fakeDeck('/decks/b.md', 3002);
+ registry.register(a.deck);
+ registry.register(b.deck);
+
+ // The window's own close handler already reaped the process; unregister only
+ // removes the bookkeeping so a reopen starts fresh — it must not signal again.
+ registry.unregister('/decks/a.md');
+
+ expect(a.signals()).toEqual([]);
+ expect(registry.get('/decks/a.md')).toBeUndefined();
+ expect(registry.get('/decks/b.md')).toBe(b.deck);
+ expect(registry.size()).toBe(1);
+ });
+
+ it('unregister for an unknown deck is a no-op', () => {
+ const registry = createSlidesDeckRegistry();
+ registry.register(fakeDeck('/decks/a.md', 3001).deck);
+ registry.unregister('/decks/never-opened.md');
+ expect(registry.size()).toBe(1);
+ });
+
+ it('a fresh registry starts empty', () => {
+ expect(createSlidesDeckRegistry().size()).toBe(0);
+ });
+
+ it('tracks and clears an in-flight open independently of registered decks', () => {
+ const registry = createSlidesDeckRegistry();
+ expect(registry.getOpenInFlight('/decks/a.md')).toBeUndefined();
+
+ const attempt: Promise<OkSlidesOpenResult> = Promise.resolve({ kind: 'open', ok: true });
+ registry.setOpenInFlight('/decks/a.md', attempt);
+ // The marker is the exact promise a joiner awaits, so a second activation
+ // shares the first attempt's real verdict instead of spawning a rival.
+ expect(registry.getOpenInFlight('/decks/a.md')).toBe(attempt);
+ // In-flight tracking is separate from the registered decks (a deck registers
+ // only once its server is confirmed serving, seconds after the start begins).
+ expect(registry.get('/decks/a.md')).toBeUndefined();
+
+ registry.clearOpenInFlight('/decks/a.md');
+ expect(registry.getOpenInFlight('/decks/a.md')).toBeUndefined();
+ });
+
+ it('reapAll clears in-flight markers as well as registered decks', () => {
+ const registry = createSlidesDeckRegistry();
+ const a = fakeDeck('/decks/a.md', 3001);
+ registry.register(a.deck);
+ const attempt: Promise<OkSlidesOpenResult> = Promise.resolve({ kind: 'open', ok: true });
+ registry.setOpenInFlight('/decks/b.md', attempt);
+
+ registry.reapAll();
+
+ // App-quit teardown empties both maps, so nothing survives to be re-entered.
+ expect(registry.size()).toBe(0);
+ expect(registry.getOpenInFlight('/decks/b.md')).toBeUndefined();
+ });
+});
+
+describe('reapAll reaches children that are spawned but not yet registered', () => {
+ // The leak this guards: `register` only runs once a server is CONFIRMED
+ // serving, and a cold Vite start takes seconds. A quit inside that window used
+ // to find nothing to signal — `decks` was empty and `opening` held only a
+ // promise, which carries no killable handle — so the `detached` child outlived
+ // the app holding its port.
+ function fakeProc() {
+ const signals: string[] = [];
+ return {
+ signals,
+ proc: {
+ onExit: () => {},
+ signal: (s: 'SIGTERM' | 'SIGKILL') => signals.push(s),
+ isAlive: () => true,
+ pid: 1234,
+ },
+ };
+ }
+
+ it('SIGTERMs a spawned-but-unregistered child', () => {
+ const registry = createSlidesDeckRegistry();
+ const { signals, proc } = fakeProc();
+ registry.trackSpawned('/proj/deck.md', proc);
+ // Never registered — this is the mid-boot state.
+ expect(registry.size()).toBe(0);
+
+ registry.reapAll();
+
+ expect(signals).toEqual(['SIGTERM']);
+ });
+
+ it('does not double-signal once the child has been handed to decks', () => {
+ const registry = createSlidesDeckRegistry();
+ const { signals, proc } = fakeProc();
+ registry.trackSpawned('/proj/deck.md', proc);
+ // Ownership transfers to `decks` when the window opens.
+ registry.register({
+ docPath: '/proj/deck.md',
+ port: 4300,
+ process: proc,
+ window: { on: () => {}, focus: () => {}, isDestroyed: () => false } as never,
+ });
+ registry.untrackSpawned('/proj/deck.md');
+
+ registry.reapAll();
+
+ expect(signals).toEqual(['SIGTERM']);
+ });
+});
diff --git a/packages/desktop/src/main/slides-registry.ts b/packages/desktop/src/main/slides-registry.ts
new file mode 100644
index 000000000..04128d8d1
--- /dev/null
+++ b/packages/desktop/src/main/slides-registry.ts
@@ -0,0 +1,117 @@
+/**
+ * Registry of the Slidev decks OK has open, keyed by the deck's absolute path.
+ *
+ * Deck path is the identity because re-selecting Slides for a deck already open
+ * must focus its existing window rather than spawn a second server + window —
+ * one deck, one server, one window. Each entry pairs the spawned server with the
+ * OK window showing it, so a reopen can raise that window and app quit can reap
+ * every server, guaranteeing no Slidev process outlives the app.
+ *
+ * A plain factory (not a module-level singleton) so tests get a fresh instance
+ * with no cross-test state; `main/index.ts` holds the single app-wide instance.
+ */
+
+import type { OkSlidesOpenResult } from '../shared/ipc-channels.ts';
+import type { SlidevProcess } from './slidev-server.ts';
+import type { BrowserWindowLike } from './window-manager.ts';
+
+/** The OK window showing a deck. `id` is carried for structured load-failure
+ * logging (a bounded int); the registry keys on docPath, not id. */
+export type SlidesDeckWindow = BrowserWindowLike & { readonly id: number };
+
+export interface RunningSlidesDeck {
+ /** Absolute path of the deck being served — the registry key. */
+ readonly docPath: string;
+ /** Loopback port the Slidev server is serving on. */
+ readonly port: number;
+ /** The spawned server: `signal()` delivers SIGTERM/SIGKILL to it and its child
+ * tree, `isAlive()` reports whether it is still running. */
+ readonly process: SlidevProcess;
+ /** The dedicated OK window showing the deck — raised on reopen, reaped
+ * alongside its process when closed. */
+ readonly window: SlidesDeckWindow;
+}
+
+export interface SlidesDeckRegistry {
+ /** The running deck for `docPath`, or undefined if none is open for it. */
+ get(docPath: string): RunningSlidesDeck | undefined;
+ /** Record a newly-opened deck. */
+ register(deck: RunningSlidesDeck): void;
+ /** Drop a deck's entry without reaping it — the window's close handler owns
+ * the reap, and calls this so a subsequent reopen starts fresh. */
+ unregister(docPath: string): void;
+ /** Signal every registered server to stop and empty the registry (app-quit
+ * teardown — best-effort SIGTERM, since quit cannot await a grace poll). */
+ reapAll(): void;
+ /** How many decks are currently registered. */
+ size(): number;
+ /** The in-flight open for `docPath`, if one is already running.
+ *
+ * A deck only enters `decks` once its server is confirmed serving, and a
+ * cold Slidev start takes seconds — so registry lookup alone cannot dedup
+ * two activations issued inside that window (a double-click on the toolbar
+ * action). Without this, both see an empty registry, both spawn, and the
+ * user gets two servers and two windows for one deck while the registry —
+ * what app-quit `reapAll` iterates — records only the last. Callers join the
+ * returned promise instead of starting a second attempt, so they share the
+ * first attempt's real verdict rather than assuming it succeeds. */
+ getOpenInFlight(docPath: string): Promise<OkSlidesOpenResult> | undefined;
+ /** Record the in-flight open for `docPath`. */
+ setOpenInFlight(docPath: string, attempt: Promise<OkSlidesOpenResult>): void;
+ /** Drop the in-flight marker once the attempt settles (success or failure). */
+ clearOpenInFlight(docPath: string): void;
+ /** Record a child that has been spawned but is not yet a registered deck.
+ *
+ * `setOpenInFlight` stores a promise, which carries no killable handle, so
+ * it cannot serve app-quit teardown. This does: `reapAll` signals these
+ * alongside `decks`, closing the window between spawn and confirmed-serving
+ * in which a quit would otherwise leave a `detached` process holding its
+ * port with nothing left referencing it. */
+ trackSpawned(docPath: string, process: SlidevProcess): void;
+ /** Drop a spawned-but-unregistered child once it is registered or reaped. */
+ untrackSpawned(docPath: string): void;
+}
+
+export function createSlidesDeckRegistry(): SlidesDeckRegistry {
+ const decks = new Map<string, RunningSlidesDeck>();
+ const opening = new Map<string, Promise<OkSlidesOpenResult>>();
+ const spawned = new Map<string, SlidevProcess>();
+ return {
+ get: (docPath) => decks.get(docPath),
+ register: (deck) => {
+ decks.set(deck.docPath, deck);
+ },
+ unregister: (docPath) => {
+ decks.delete(docPath);
+ },
+ reapAll: () => {
+ // App quit cannot hold itself open for the per-deck grace poll the
+ // window-close path runs, so this only asks each server to stop: a SIGTERM
+ // (to the whole group) lets its Vite dev server release its port and flush
+ // its cache, and a detached server that outlives our exit finishes
+ // shutting down on its own. Mirrors the desktop's synchronous
+ // `signalStopAllOwnedServers` server teardown.
+ for (const deck of decks.values()) deck.process.signal('SIGTERM');
+ // Children spawned but not yet confirmed serving are NOT in `decks`, and
+ // `opening` holds only promises. Signal them here or they outlive the app.
+ for (const proc of spawned.values()) proc.signal('SIGTERM');
+ decks.clear();
+ spawned.clear();
+ opening.clear();
+ },
+ size: () => decks.size,
+ getOpenInFlight: (docPath) => opening.get(docPath),
+ setOpenInFlight: (docPath, attempt) => {
+ opening.set(docPath, attempt);
+ },
+ clearOpenInFlight: (docPath) => {
+ opening.delete(docPath);
+ },
+ trackSpawned: (docPath, process) => {
+ spawned.set(docPath, process);
+ },
+ untrackSpawned: (docPath) => {
+ spawned.delete(docPath);
+ },
+ };
+}
diff --git a/packages/desktop/src/main/slides-telemetry.test.ts b/packages/desktop/src/main/slides-telemetry.test.ts
new file mode 100644
index 000000000..1ddf21bce
--- /dev/null
+++ b/packages/desktop/src/main/slides-telemetry.test.ts
@@ -0,0 +1,132 @@
+/**
+ * Main-side slides deck-open telemetry — assert `recordDeckOpen` maps an open
+ * result to one bounded `ok.slides.deckOpen` span, that a failure additionally
+ * increments the reason-labeled counter (so a spawn fault is separable from a
+ * readiness timeout), and that the counter instrument is created lazily on first
+ * failure — never at module load — and then reused.
+ *
+ * The desktop package has no `@opentelemetry/*` SDK dep and cannot mount an
+ * `InMemorySpanExporter`, so we intercept at the `@inkeep/open-knowledge-server`
+ * boundary with `vi.doMock` — the precedent set by
+ * `git-preflight-handler-otel.test.ts`. `vi.resetModules()` per test gives each
+ * a pristine module so the lazy counter cache never leaks across cases.
+ */
+
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+import type { OkSlidesOpenResult } from '../shared/ipc-channels.ts';
+
+const actual = await import('@inkeep/open-knowledge-server');
+
+interface SpanCall {
+ name: string;
+ attributes: Record<string, unknown>;
+}
+interface CounterAdd {
+ value: number;
+ attributes: Record<string, unknown>;
+}
+
+const spanCalls: SpanCall[] = [];
+const counterAdds: CounterAdd[] = [];
+let getMeterCalls = 0;
+let createCounterCalls = 0;
+
+vi.doMock('@inkeep/open-knowledge-server', () => ({
+ ...actual,
+ withSpanSync: (
+ name: string,
+ options: { attributes?: Record<string, unknown> } | undefined,
+ fn: (span: unknown) => unknown,
+ ) => {
+ spanCalls.push({ name, attributes: options?.attributes ?? {} });
+ return fn({ setAttribute() {}, setAttributes() {}, end() {} });
+ },
+ getMeter: () => {
+ getMeterCalls += 1;
+ return {
+ createCounter: () => {
+ createCounterCalls += 1;
+ return {
+ add: (value: number, attributes: Record<string, unknown>) =>
+ counterAdds.push({ value, attributes }),
+ };
+ },
+ };
+ },
+}));
+
+async function loadFresh() {
+ // Fresh module instance so the module-level lazy counter cache starts null.
+ return import('./slides-telemetry.ts');
+}
+
+beforeEach(() => {
+ spanCalls.length = 0;
+ counterAdds.length = 0;
+ getMeterCalls = 0;
+ createCounterCalls = 0;
+ vi.resetModules();
+});
+
+describe('recordDeckOpen — span outcome', () => {
+ test('a successful open emits one ok-outcome span and no counter', async () => {
+ const { recordDeckOpen } = await loadFresh();
+ recordDeckOpen({ kind: 'open', ok: true });
+ expect(spanCalls).toEqual([
+ { name: 'ok.slides.deckOpen', attributes: { 'ok.slides.outcome': 'ok' } },
+ ]);
+ expect(counterAdds).toEqual([]);
+ });
+
+ test('a timeout failure spans outcome=failure with the timeout reason', async () => {
+ const { recordDeckOpen } = await loadFresh();
+ recordDeckOpen({ kind: 'open', ok: false, reason: 'timeout' });
+ expect(spanCalls).toEqual([
+ {
+ name: 'ok.slides.deckOpen',
+ attributes: { 'ok.slides.outcome': 'failure', 'ok.slides.reason': 'timeout' },
+ },
+ ]);
+ });
+});
+
+describe('recordDeckOpen — failure counter distinguishes reasons', () => {
+ test('a spawn failure counts under spawn-error, not timeout', async () => {
+ const { recordDeckOpen } = await loadFresh();
+ recordDeckOpen({ kind: 'open', ok: false, reason: 'spawn-error' });
+ expect(counterAdds).toEqual([{ value: 1, attributes: { 'ok.slides.reason': 'spawn-error' } }]);
+ });
+
+ test('a readiness timeout counts under timeout', async () => {
+ const { recordDeckOpen } = await loadFresh();
+ recordDeckOpen({ kind: 'open', ok: false, reason: 'timeout' });
+ expect(counterAdds).toEqual([{ value: 1, attributes: { 'ok.slides.reason': 'timeout' } }]);
+ });
+});
+
+describe('recordDeckOpen — lazily-cached instrument', () => {
+ test('a successful open never touches the meter (no instrument at load)', async () => {
+ const { recordDeckOpen } = await loadFresh();
+ recordDeckOpen({ kind: 'open', ok: true });
+ expect(getMeterCalls).toBe(0);
+ expect(createCounterCalls).toBe(0);
+ });
+
+ test('the failure counter is created once and reused across failures', async () => {
+ const { recordDeckOpen } = await loadFresh();
+ const failures: OkSlidesOpenResult[] = [
+ { kind: 'open', ok: false, reason: 'timeout' },
+ { kind: 'open', ok: false, reason: 'exited-early' },
+ { kind: 'open', ok: false, reason: 'unsupported-server' },
+ { kind: 'open', ok: false, reason: 'spawn-error' },
+ ];
+ for (const f of failures) recordDeckOpen(f);
+ expect(createCounterCalls).toBe(1);
+ expect(counterAdds).toEqual([
+ { value: 1, attributes: { 'ok.slides.reason': 'timeout' } },
+ { value: 1, attributes: { 'ok.slides.reason': 'exited-early' } },
+ { value: 1, attributes: { 'ok.slides.reason': 'unsupported-server' } },
+ { value: 1, attributes: { 'ok.slides.reason': 'spawn-error' } },
+ ]);
+ });
+});
diff --git a/packages/desktop/src/main/slides-telemetry.ts b/packages/desktop/src/main/slides-telemetry.ts
new file mode 100644
index 000000000..9d7c0e788
--- /dev/null
+++ b/packages/desktop/src/main/slides-telemetry.ts
@@ -0,0 +1,56 @@
+/**
+ * Slides (Slidev) deck-open telemetry — the main-side half.
+ *
+ * A deck-open attempt that reaches the spawn/readiness path emits one
+ * `ok.slides.deckOpen` span carrying a bounded outcome, and on failure the
+ * bounded reason that separates a spawn failure from a readiness timeout.
+ * Failures also increment a reason-labeled counter so the failure rate reads
+ * off metrics independently of trace sampling. The pre-attempt guard rejections
+ * (`invalid-path` / `not-available`) are logged at the IPC boundary instead of
+ * spanned here, so the span's denominator stays genuine spawn attempts.
+ *
+ * Attributes are bounded-cardinality only — a two-bucket outcome and the closed
+ * failure-reason union; never a deck path, document name, or content. The
+ * counter is created behind a lazily-cached accessor, mirroring the sibling
+ * `ok.shell.trash_item` meters, so an SDK-disabled build (the default) creates
+ * no instrument at module load; `withSpanSync` / `getMeter` are themselves
+ * no-ops when no SDK is registered, so telemetry-off behaves identically.
+ */
+
+import { getMeter, withSpanSync } from '@inkeep/open-knowledge-server';
+import type { OkSlidesOpenResult } from '../shared/ipc-channels.ts';
+
+let _deckOpenFailureCounterCache: ReturnType<ReturnType<typeof getMeter>['createCounter']> | null =
+ null;
+function deckOpenFailureCounter() {
+ _deckOpenFailureCounterCache ||= getMeter().createCounter('ok.slides.deck_open.failures', {
+ // The metric NAME stays `ok.slides.*` — it is a stable telemetry key that
+ // outlives the plugin's display name. Only the human-readable description
+ // tracks the rename.
+ description: 'Count of Slidev deck-open failures, labeled by reason',
+ });
+ return _deckOpenFailureCounterCache;
+}
+
+/**
+ * Record one deck-open attempt. `ok.slides.outcome` partitions success from
+ * failure; on failure `ok.slides.reason` carries the closed
+ * `SlidevOpenFailureReason` so a spawn fault is separable from a readiness
+ * timeout. SDK disabled → both the span and the counter are no-ops.
+ */
+export function recordDeckOpen(result: OkSlidesOpenResult): void {
+ if (result.ok) {
+ withSpanSync(
+ 'ok.slides.deckOpen',
+ { attributes: { 'ok.slides.outcome': 'ok' } },
+ () => undefined,
+ );
+ return;
+ }
+ withSpanSync(
+ 'ok.slides.deckOpen',
+ { attributes: { 'ok.slides.outcome': 'failure', 'ok.slides.reason': result.reason } },
+ () => undefined,
+ );
+ deckOpenFailureCounter().add(1, { 'ok.slides.reason': result.reason });
+}
diff --git a/packages/desktop/src/main/slides-window.test.ts b/packages/desktop/src/main/slides-window.test.ts
new file mode 100644
index 000000000..e3f62fe3c
--- /dev/null
+++ b/packages/desktop/src/main/slides-window.test.ts
@@ -0,0 +1,373 @@
+import { describe, expect, test, vi } from 'vitest';
+import {
+ createSlidesDeckRegistry,
+ type RunningSlidesDeck,
+ type SlidesDeckWindow,
+} from './slides-registry.ts';
+import { createSlidesWindow, slidesWindowChrome } from './slides-window.ts';
+
+describe('slidesWindowChrome', () => {
+ test('gives the deck an ordinary native title bar to drag by', () => {
+ // The shared window defaults hide the title bar because OK's renderer draws
+ // its own and marks a `-webkit-app-region: drag` strip. Slidev's page marks
+ // none, so a deck inheriting those defaults has no draggable region and the
+ // window cannot be moved at all.
+ const chrome = slidesWindowChrome();
+ expect(chrome.titleBarStyle).toBe('default');
+ expect(chrome.titleBarOverlay).toBe(false);
+ });
+
+ test('clears the macOS chrome the shared defaults set for OK-rendered windows', () => {
+ // Spread over DEFAULT_WIN_OPTS, so every key the darwin branch sets must be
+ // present here to override it — an absent key would silently inherit.
+ const chrome = slidesWindowChrome();
+ expect(chrome.transparent).toBe(false);
+ expect(chrome.trafficLightPosition).toBeUndefined();
+ expect(chrome.vibrancy).toBeUndefined();
+ expect(chrome.visualEffectState).toBeUndefined();
+ // Every darwin-branch chrome key is accounted for; a new one added to
+ // DEFAULT_WIN_OPTS without a matching override here would leak into the
+ // deck window.
+ expect(Object.keys(chrome).sort()).toEqual([
+ 'titleBarOverlay',
+ 'titleBarStyle',
+ 'trafficLightPosition',
+ 'transparent',
+ 'vibrancy',
+ 'visualEffectState',
+ ]);
+ });
+});
+
+/** A fake window exposing only what the factory touches. The `ready-to-show` and
+ * `closed` handlers are captured so a test can fire the lifecycle events; the
+ * `webContents` captures the navigation guards so a test can drive them. */
+function makeFakeWindow(id: number) {
+ const closedHandlers: Array<() => void> = [];
+ const readyHandlers: Array<() => void> = [];
+ let windowOpenHandler: ((details: { url: string }) => { action: 'allow' | 'deny' }) | undefined;
+ let willNavigateHandler:
+ | ((event: { preventDefault: () => void }, url: string) => void)
+ | undefined;
+ let willRedirectHandler:
+ | ((event: { preventDefault: () => void }, url: string) => void)
+ | undefined;
+ const show = vi.fn(() => {});
+ // Mirror Electron: close() eventually fires the 'closed' event, which the
+ // factory listens on to reap + unregister.
+ const close = vi.fn(() => {
+ for (const cb of closedHandlers) cb();
+ });
+ const window = {
+ id,
+ show,
+ close,
+ once: (event: string, cb: () => void) => {
+ if (event === 'ready-to-show') readyHandlers.push(cb);
+ },
+ on: (event: string, cb: () => void) => {
+ if (event === 'closed') closedHandlers.push(cb);
+ },
+ webContents: {
+ setWindowOpenHandler: (
+ handler: (details: { url: string }) => { action: 'allow' | 'deny' },
+ ) => {
+ windowOpenHandler = handler;
+ },
+ on: (
+ event: string,
+ handler: (event: { preventDefault: () => void }, url: string) => void,
+ ) => {
+ if (event === 'will-navigate') willNavigateHandler = handler;
+ if (event === 'will-redirect') willRedirectHandler = handler;
+ },
+ },
+ loadFile: vi.fn(async () => {}),
+ loadURL: vi.fn(async () => {}),
+ } as unknown as SlidesDeckWindow;
+ return {
+ window,
+ show,
+ close,
+ fireReadyToShow: () => {
+ for (const cb of readyHandlers) cb();
+ },
+ fireClosed: () => {
+ for (const cb of closedHandlers) cb();
+ },
+ /** Drive the new-window handler the factory registered. */
+ requestNewWindow: (url: string) => windowOpenHandler?.({ url }),
+ /** Drive the top-level navigation guard; returns whether it was prevented. */
+ navigateTo: (url: string) => {
+ let prevented = false;
+ willNavigateHandler?.({ preventDefault: () => (prevented = true) }, url);
+ return prevented;
+ },
+ /** Drive the redirect guard (a navigation answered by a server redirect);
+ * returns whether it was prevented. */
+ redirectTo: (url: string) => {
+ let prevented = false;
+ willRedirectHandler?.({ preventDefault: () => (prevented = true) }, url);
+ return prevented;
+ },
+ };
+}
+
+/** A Slidev server whose signals are observable and whose liveness is scripted:
+ * `alive: true` never exits (forcing SIGKILL escalation), the default reports
+ * gone on the first liveness poll (the clean SIGTERM-only path). */
+function fakeProcess(opts: { alive?: boolean } = {}) {
+ const signals: Array<'SIGTERM' | 'SIGKILL'> = [];
+ return {
+ process: {
+ onExit: () => {},
+ signal: (sig: 'SIGTERM' | 'SIGKILL') => {
+ signals.push(sig);
+ },
+ isAlive: () => opts.alive ?? false,
+ pid: 4321,
+ },
+ signals: () => signals,
+ };
+}
+
+function makeDeck(
+ docPath: string,
+ port: number,
+ opts: { alive?: boolean } = {},
+): Omit<RunningSlidesDeck, 'window'> & {
+ signals: () => Array<'SIGTERM' | 'SIGKILL'>;
+} {
+ const { process, signals } = fakeProcess(opts);
+ return { docPath, port, process, signals };
+}
+
+/** A virtual clock for the close-time teardown ladder — `sleep` advances it and
+ * resolves synchronously, so the grace + escalation run in microtasks with no
+ * real timer. Tiny grace/poll keep the loop to a single iteration. */
+function virtualTerminateClock() {
+ let clock = 0;
+ return {
+ now: () => clock,
+ sleep: (ms: number) => {
+ clock += ms;
+ return Promise.resolve();
+ },
+ graceMs: 1,
+ pollMs: 1,
+ };
+}
+
+/** Let the fire-and-forget teardown ladder settle its microtask chain. */
+async function flushTeardown() {
+ for (let i = 0; i < 5; i += 1) await Promise.resolve();
+}
+
+describe('createSlidesWindow', () => {
+ test('loads the embedded loopback URL — never OK content over file://', () => {
+ const fake = makeFakeWindow(80_001);
+ const registry = createSlidesDeckRegistry();
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry,
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+
+ // `localhost`, not a pinned `127.0.0.1`: Slidev inherits Vite's `localhost`
+ // bind, which Node resolves verbatim to `::1` first on macOS, so a real deck
+ // listens on the IPv6 loopback only and an IPv4-pinned URL loads a blank
+ // window. Verified against a live Slidev, whose listen socket is
+ // `IPv6 [::1]:<port>` with nothing on IPv4.
+ expect(fake.window.loadURL).toHaveBeenCalledWith('http://localhost:4300/?embedded=true');
+ expect(fake.window.loadFile).not.toHaveBeenCalled();
+ });
+
+ test('denies every new-window request the deck makes — no window.open to any origin', () => {
+ const fake = makeFakeWindow(80_001);
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry: createSlidesDeckRegistry(),
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+
+ // A crafted deck's `window.open(...)`, same-origin or not, is denied — the
+ // deck can never spawn a native window at an arbitrary origin.
+ expect(fake.requestNewWindow('https://evil.example/phish')).toEqual({ action: 'deny' });
+ expect(fake.requestNewWindow('http://localhost:4300/presenter')).toEqual({ action: 'deny' });
+ });
+
+ test('blocks a top-level navigation off the deck origin but allows in-deck routing', () => {
+ const fake = makeFakeWindow(80_001);
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry: createSlidesDeckRegistry(),
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+
+ // A crafted deck doing `location = 'https://evil…'` is refused, so the
+ // fixed-title window can never be repointed at attacker content (phishing).
+ expect(fake.navigateTo('https://evil.example/phish')).toBe(true);
+ // Slidev's own in-app routes are same-origin — those stay allowed.
+ expect(fake.navigateTo('http://localhost:4300/presenter')).toBe(false);
+ // A malformed URL is treated as off-origin and refused.
+ expect(fake.navigateTo('not a url')).toBe(true);
+ });
+
+ test('refuses a cross-origin redirect that a same-origin navigation lands on', () => {
+ const fake = makeFakeWindow(80_001);
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry: createSlidesDeckRegistry(),
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+
+ // `will-navigate` only sees the pre-redirect URL, so a same-origin start
+ // that a server bounces cross-origin would slip past it — `will-redirect`
+ // catches the landing origin and refuses it.
+ expect(fake.redirectTo('https://evil.example/phish')).toBe(true);
+ // A same-origin redirect (Slidev bouncing `/` to a first slide) is allowed.
+ expect(fake.redirectTo('http://localhost:4300/1')).toBe(false);
+ });
+
+ test('creates the window on an isolated, non-persistent session partition', () => {
+ const fake = makeFakeWindow(80_001);
+ const createWindow = vi.fn((_o: { partition: string; title: string }) => fake.window);
+ createSlidesWindow({
+ createWindow,
+ registry: createSlidesDeckRegistry(),
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+
+ const opts = createWindow.mock.calls[0]?.[0];
+ // A partition string that does not start with `persist:` is an in-memory
+ // session Electron keeps distinct from the editor's default one.
+ expect(opts?.partition).toBeTruthy();
+ expect(opts?.partition.startsWith('persist:')).toBe(false);
+ });
+
+ test('records the deck (with its window) in the registry', () => {
+ const fake = makeFakeWindow(80_001);
+ const registry = createSlidesDeckRegistry();
+ const deck = makeDeck('/decks/talk.md', 4300);
+ createSlidesWindow({ createWindow: () => fake.window, registry, deck });
+
+ const entry = registry.get('/decks/talk.md');
+ expect(entry?.port).toBe(4300);
+ expect(entry?.process).toBe(deck.process);
+ expect(entry?.window).toBe(fake.window);
+ });
+
+ test('shows the window on first paint', () => {
+ const fake = makeFakeWindow(80_001);
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry: createSlidesDeckRegistry(),
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+
+ expect(fake.show).not.toHaveBeenCalled();
+ fake.fireReadyToShow();
+ expect(fake.show).toHaveBeenCalledTimes(1);
+ });
+
+ test('closing the window gracefully stops the deck: SIGTERM, then SIGKILL when it stays alive', async () => {
+ const fake = makeFakeWindow(80_001);
+ const registry = createSlidesDeckRegistry();
+ const deck = makeDeck('/decks/talk.md', 4300, { alive: true }); // never exits
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry,
+ deck,
+ terminateClock: virtualTerminateClock(),
+ });
+ expect(registry.get('/decks/talk.md')).not.toBeUndefined();
+
+ fake.fireClosed();
+ await flushTeardown();
+
+ // SIGTERM first, SIGKILL only after the grace expired with it still alive —
+ // never a straight kill.
+ expect(deck.signals()).toEqual(['SIGTERM', 'SIGKILL']);
+ // The registry entry drops synchronously on close so a reopen is clean.
+ expect(registry.get('/decks/talk.md')).toBeUndefined();
+ expect(registry.size()).toBe(0);
+ });
+
+ test('closing the window stops the deck with SIGTERM alone when it exits during grace', async () => {
+ const fake = makeFakeWindow(80_001);
+ const registry = createSlidesDeckRegistry();
+ const deck = makeDeck('/decks/talk.md', 4300); // exits on the first liveness poll
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry,
+ deck,
+ terminateClock: virtualTerminateClock(),
+ });
+
+ fake.fireClosed();
+ await flushTeardown();
+
+ // Gone within the grace window — no escalation to SIGKILL.
+ expect(deck.signals()).toEqual(['SIGTERM']);
+ expect(registry.get('/decks/talk.md')).toBeUndefined();
+ });
+
+ test('two decks open independent windows on their own ports', () => {
+ const registry = createSlidesDeckRegistry();
+ const a = makeFakeWindow(80_001);
+ const b = makeFakeWindow(80_002);
+ createSlidesWindow({
+ createWindow: () => a.window,
+ registry,
+ deck: makeDeck('/decks/a.md', 4300),
+ });
+ createSlidesWindow({
+ createWindow: () => b.window,
+ registry,
+ deck: makeDeck('/decks/b.md', 4301),
+ });
+
+ expect(a.window.loadURL).toHaveBeenCalledWith('http://localhost:4300/?embedded=true');
+ expect(b.window.loadURL).toHaveBeenCalledWith('http://localhost:4301/?embedded=true');
+ expect(registry.size()).toBe(2);
+ expect(registry.get('/decks/a.md')?.window).toBe(a.window);
+ expect(registry.get('/decks/b.md')?.window).toBe(b.window);
+ });
+
+ test('a renderer load rejection warns, closes the broken window, and drops the deck', async () => {
+ const fake = makeFakeWindow(80_001);
+ const failing = vi.fn(async () => {
+ throw new Error('slidev boom');
+ });
+ (fake.window as unknown as { loadURL: typeof failing }).loadURL = failing;
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const registry = createSlidesDeckRegistry();
+
+ createSlidesWindow({
+ createWindow: () => fake.window,
+ registry,
+ deck: makeDeck('/decks/talk.md', 4300),
+ });
+ // The factory attaches its `.catch` synchronously; flush the microtask queue
+ // so the handler has run before asserting — deterministic, no timer wait.
+ await Promise.resolve();
+ await Promise.resolve();
+
+ expect(warnSpy).toHaveBeenCalledTimes(1);
+ const payload = JSON.parse(warnSpy.mock.calls[0]?.[0] as string);
+ expect(payload).toMatchObject({
+ event: 'slides-load-failed',
+ windowId: 80_001,
+ port: 4300,
+ message: 'slidev boom',
+ });
+ // The deck path must not leak into diagnostics.
+ expect(JSON.stringify(payload)).not.toContain('/decks/talk.md');
+ // The window doesn't linger on a permanent Chromium error page — it closes,
+ // and its `closed` handler drops the registry entry.
+ expect(fake.close).toHaveBeenCalledTimes(1);
+ expect(registry.get('/decks/talk.md')).toBeUndefined();
+
+ warnSpy.mockRestore();
+ });
+});
diff --git a/packages/desktop/src/main/slides-window.ts b/packages/desktop/src/main/slides-window.ts
new file mode 100644
index 000000000..95beddc90
--- /dev/null
+++ b/packages/desktop/src/main/slides-window.ts
@@ -0,0 +1,217 @@
+/**
+ * Dedicated OK window showing a deck via its spawned Slidev server.
+ *
+ * Unlike editor/terminal/navigator windows — which all load OK's own renderer —
+ * a slides window points at the out-of-process Slidev server on loopback and
+ * loads nothing of OK's over `file://`. Two consequences shape this factory:
+ * - It self-shows on `ready-to-show` rather than routing through the
+ * dual-signal show gate, which also waits for the renderer's
+ * `ok:theme:applied` — an IPC a Slidev page never sends.
+ * - It runs in an isolated, non-persistent session partition with no OK
+ * preload/bridge injected (wired in `main/index.ts`), so the deck renderer
+ * shares no session with the editor and the deck-XSS surface stays
+ * out-of-process, sandboxed, and loopback-only.
+ *
+ * The window is paired with its server in the deck registry, so re-selecting
+ * Slides for an open deck focuses this window instead of spawning again, and
+ * closing it reaps the server. The window factory is injected so this unit-tests
+ * without an Electron runtime; `main/index.ts` wires the real BrowserWindow.
+ */
+
+import { gracefulTerminate } from './graceful-terminate.ts';
+import type { RunningSlidesDeck, SlidesDeckRegistry, SlidesDeckWindow } from './slides-registry.ts';
+
+/** Loopback embedded URL for a Slidev server on `port`. Served at the root with
+ * no `--base` (sidestepping the open upstream `--base` embed regressions), so
+ * no path prefix; `?embedded=true` is Slidev's client-side embed flag.
+ *
+ * The host is `localhost`, not a pinned `127.0.0.1`: Slidev inherits Vite's
+ * `localhost` bind, which resolves verbatim to `::1` first on macOS, so a real
+ * deck listens on the IPv6 loopback only and an IPv4-pinned URL loads a blank
+ * window. `localhost` lets Chromium fall back across families and still names
+ * only loopback. Keep in sync with `probeSlidevReady`'s host — readiness must
+ * confirm the same origin the window then loads. */
+function slidesEmbedUrl(port: number): string {
+ return `http://localhost:${port}/?embedded=true`;
+}
+
+/** Session partition for slide windows. Non-persistent (no `persist:` prefix),
+ * so it is an in-memory session distinct from the editor's default one. */
+const SLIDES_PARTITION = 'slides';
+
+/** Names the renderer AND the app that owns the window. The app half is not
+ * decoration: this title is fixed and deck content cannot change it, so it is
+ * what tells a user a deck window belongs to OpenKnowledge (see the
+ * containment rationale below). */
+const SLIDES_WINDOW_TITLE = 'Slidev — OpenKnowledge';
+
+/**
+ * Chrome the deck window needs on top of the shared window defaults.
+ *
+ * Every other OK window loads OK's own renderer, which draws its own title bar
+ * and marks the drag strip with `-webkit-app-region: drag`. The shared defaults
+ * therefore hide the native title bar on every platform (`hiddenInset` on
+ * macOS, `hidden` + a controls overlay elsewhere) and hand that strip to the
+ * renderer. A deck window loads the Slidev server's page instead, which has
+ * none of that — inheriting the hidden title bar leaves the window with **no
+ * draggable region at all**, so it cannot be moved. macOS compounds it by
+ * offsetting the traffic lights into the page content and enabling
+ * transparency + vibrancy that a foreign page never paints for.
+ *
+ * A deck is a foreign page, so it gets an ordinary native window: a real title
+ * bar (the drag handle, showing the pinned title), default traffic-light
+ * placement, and no transparency. Structurally typed rather than importing
+ * Electron's option type, keeping this module Electron-free so it unit-tests
+ * without a runtime. Spread AFTER the shared defaults.
+ */
+export interface SlidesWindowChrome {
+ readonly titleBarStyle: 'default';
+ readonly titleBarOverlay: false;
+ readonly trafficLightPosition: undefined;
+ readonly transparent: false;
+ readonly vibrancy: undefined;
+ readonly visualEffectState: undefined;
+}
+
+export function slidesWindowChrome(): SlidesWindowChrome {
+ return {
+ titleBarStyle: 'default',
+ titleBarOverlay: false,
+ trafficLightPosition: undefined,
+ transparent: false,
+ vibrancy: undefined,
+ visualEffectState: undefined,
+ };
+}
+
+/**
+ * Contain the deck window to its own loopback origin. A deck is untrusted
+ * content: it renders project markdown, whose raw HTML passes through OK's
+ * storage layer unsanitized, and Slidev renders it. Without this a crafted deck
+ * could navigate this fixed-title native window to an attacker origin (a clean
+ * phishing surface, since the title keeps naming OpenKnowledge) or spawn
+ * windows at arbitrary origins. Deny every new-window request and refuse any
+ * top-level navigation that leaves the deck's own `http://localhost:<port>` —
+ * same-origin navigation (Slidev's in-app routing to /presenter, /overview, …)
+ * is left alone, and normal client-side slide navigation never fires
+ * `will-navigate` at all. `will-redirect` gets the same refusal: a top-level
+ * navigation that STARTS same-origin but a server answers with a cross-origin
+ * redirect would otherwise slip past the `will-navigate` check, which only sees
+ * the pre-redirect URL. The same deny-by-default posture every other OK window
+ * installs (the editor's asset safety net, the uninstall window).
+ *
+ * Cross-origin SUBFRAMES are deliberately left to the browser's same-origin
+ * policy rather than blocked via `will-frame-navigate`: a deck legitimately
+ * embeds cross-origin iframes (Slidev's `<Youtube>` and iframe embeds), and
+ * blocking them would render decks differently here than under plain Slidev
+ * while adding little — a subframe is SOP-sandboxed and cannot navigate the
+ * top-level window, which is the phishing surface this guard exists to close.
+ */
+function containToDeckOrigin(window: SlidesDeckWindow, port: number): void {
+ const deckOrigin = `http://localhost:${port}`;
+ const refuseOffOrigin = (event: { preventDefault: () => void }, url: string): void => {
+ let origin: string | null;
+ try {
+ origin = new URL(url).origin;
+ } catch {
+ origin = null;
+ }
+ if (origin !== deckOrigin) event.preventDefault();
+ };
+ window.webContents.setWindowOpenHandler(() => ({ action: 'deny' }));
+ window.webContents.on('will-navigate', refuseOffOrigin);
+ window.webContents.on('will-redirect', refuseOffOrigin);
+}
+
+export interface CreateSlidesWindowDeps {
+ /** Create the BrowserWindow (with `show: false`). Production wires a window on
+ * the isolated slides session `partition` with no OK preload; the show comes
+ * from `ready-to-show` below. */
+ createWindow(opts: { partition: string; title: string }): SlidesDeckWindow;
+ /** App-wide deck registry — the factory records the deck and drops it on close. */
+ registry: Pick<SlidesDeckRegistry, 'register' | 'unregister'>;
+ /** The started deck to show: its confirmed port + the server to reap on close. */
+ deck: Omit<RunningSlidesDeck, 'window'>;
+ /**
+ * Injection seam for the close-time graceful-teardown clock, so the
+ * SIGTERM → grace → SIGKILL ladder is unit-testable on a virtual clock with no
+ * real timer wait. Production omits it → real `Date.now` + `setTimeout` + the
+ * shared default grace.
+ */
+ terminateClock?: {
+ now(): number;
+ sleep(ms: number): Promise<void>;
+ graceMs?: number;
+ pollMs?: number;
+ };
+}
+
+export function createSlidesWindow(deps: CreateSlidesWindowDeps): SlidesDeckWindow {
+ const { deck } = deps;
+ const window = deps.createWindow({ partition: SLIDES_PARTITION, title: SLIDES_WINDOW_TITLE });
+ // Install the navigation guards before the load below so the deck can never
+ // navigate this window off its own loopback origin.
+ containToDeckOrigin(window, deck.port);
+ deps.registry.register({ ...deck, window });
+
+ window.once('ready-to-show', () => window.show?.());
+
+ // Closing the window tears its deck down: drop the registry entry so a reopen
+ // starts fresh, then gracefully stop the Slidev process — SIGTERM, a grace
+ // window, then SIGKILL only if it is still alive — so its Vite dev server
+ // releases its port and flushes its cache rather than being force-killed
+ // outright. Fire-and-forget: the window is already gone and there is nothing
+ // to await it against. Idempotent after app-quit reapAll cleared the map (a
+ // signal to an already-exited group is a no-op; unregister is a no-op delete).
+ const clock = deps.terminateClock;
+ window.on('closed', () => {
+ deps.registry.unregister(deck.docPath);
+ void gracefulTerminate({
+ sendSignal: (sig) => deck.process.signal(sig),
+ isAlive: () => deck.process.isAlive(),
+ now: clock?.now ?? Date.now,
+ sleep: clock?.sleep ?? ((ms) => new Promise((resolveSleep) => setTimeout(resolveSleep, ms))),
+ graceMs: clock?.graceMs,
+ pollMs: clock?.pollMs,
+ }).catch((err: unknown) => {
+ // Fire-and-forget is intended, but silent is not: this ladder is the only
+ // thing standing between a closed window and an orphaned Vite server, so a
+ // rejection here is the one signal that it did not run.
+ console.warn(
+ JSON.stringify({
+ event: 'slides-terminate-failed',
+ // The port is what a "Slidev is still holding port X" report arrives
+ // with, so it is the field that makes this breadcrumb correlatable.
+ // Bounded cardinality, unlike the deck path, which stays out.
+ port: deck.port,
+ message: err instanceof Error ? err.message : String(err),
+ }),
+ );
+ });
+ });
+
+ // Trust boundary: loadURL drives Chromium (separate release cadence,
+ // imperative shell) and rejects on a load failure. Surface it as a grep-able
+ // structured warn — matching the sibling window factories — rather than an
+ // unhandled rejection. docPath is deliberately not logged
+ // (cardinality/security); the ephemeral port is a bounded int.
+ window.loadURL(slidesEmbedUrl(deck.port)).catch((err: unknown) => {
+ console.warn(
+ JSON.stringify({
+ event: 'slides-load-failed',
+ windowId: window.id,
+ port: deck.port,
+ message: err instanceof Error ? err.message : String(err),
+ }),
+ );
+ // Readiness already confirmed the server before this load, so a rejection
+ // here is the narrow race where the server died between the probe and the
+ // load. The window would otherwise sit on a permanent Chromium error page it
+ // can never recover from (the server is gone), so close it rather than leave
+ // a broken, fixed-title window onscreen. The `closed` handler drops the
+ // registry entry and reaps the (already-dead) process.
+ window.close?.();
+ });
+
+ return window;
+}
diff --git a/packages/desktop/src/main/slidev-resolve.test.ts b/packages/desktop/src/main/slidev-resolve.test.ts
new file mode 100644
index 000000000..b118d619b
--- /dev/null
+++ b/packages/desktop/src/main/slidev-resolve.test.ts
@@ -0,0 +1,52 @@
+/**
+ * Tests for the real filesystem executability probe backing slidev resolution.
+ *
+ * `resolveSlidev` itself is covered behaviorally through `handleSlidesStatus`
+ * (see ipc/slides.test.ts) with injected probes. Here we pin the ONE real-fs
+ * adapter — `realIsExecutableFile` — against a tmpdir, exercising the catch with
+ * genuine ENOENT/EACCES inputs rather than a forced throw.
+ */
+
+import { chmodSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join, resolve } from 'node:path';
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
+import { realIsExecutableFile } from './slidev-resolve.ts';
+
+describe('realIsExecutableFile', () => {
+ let dir: string;
+ beforeEach(() => {
+ dir = resolve(tmpdir(), `slidev-exec-${Date.now()}-${Math.random().toString(36).slice(2)}`);
+ mkdirSync(dir, { recursive: true });
+ });
+ afterEach(() => {
+ rmSync(dir, { recursive: true, force: true });
+ });
+
+ it('returns true for an executable regular file', async () => {
+ const bin = join(dir, 'slidev');
+ writeFileSync(bin, '#!/bin/sh\necho hi\n');
+ chmodSync(bin, 0o755);
+ expect(await realIsExecutableFile(bin)).toBe(true);
+ });
+
+ it('returns false for a path that does not exist', async () => {
+ expect(await realIsExecutableFile(join(dir, 'does-not-exist'))).toBe(false);
+ });
+
+ it('returns false for a directory', async () => {
+ expect(await realIsExecutableFile(dir)).toBe(false);
+ });
+
+ it('reflects the execute bit on POSIX', async () => {
+ const f = join(dir, 'data.txt');
+ writeFileSync(f, 'not a program');
+ chmodSync(f, 0o644);
+ if (process.platform === 'win32') {
+ // Windows has no execute bit; a present regular file is runnable there.
+ expect(await realIsExecutableFile(f)).toBe(true);
+ } else {
+ expect(await realIsExecutableFile(f)).toBe(false);
+ }
+ });
+});
diff --git a/packages/desktop/src/main/slidev-resolve.ts b/packages/desktop/src/main/slidev-resolve.ts
new file mode 100644
index 000000000..7bf973c7a
--- /dev/null
+++ b/packages/desktop/src/main/slidev-resolve.ts
@@ -0,0 +1,83 @@
+/**
+ * Detect a runnable `slidev` for a project without downloading anything.
+ *
+ * Resolution follows npm-exec semantics: a project's own
+ * `node_modules/.bin/slidev` wins over a globally-installed one, so a deck can
+ * pin the Slidev it renders under. The global fallback probes the user's
+ * login-shell PATH — a GUI-launched Electron process does not inherit it, so a
+ * globally-installed `slidev` is invisible to `process.env.PATH`. There is no
+ * managed/download path here: an unresolved binary reports `available: false`
+ * and the renderer hides the affordance.
+ *
+ * Electron-free and dependency-injected (the fs + login-shell probes are passed
+ * in) so the resolution logic unit-tests without a real filesystem or a spawned
+ * shell; `main/index.ts` wires the real probes.
+ */
+import { access, constants, stat } from 'node:fs/promises';
+import { join } from 'node:path';
+import type { SlidevSource } from '../shared/ipc-channels.ts';
+
+/** Whether a runnable `slidev` resolved and from where. The resolved path is
+ * intentionally not surfaced — callers that only need the yes/no + source
+ * never handle a raw filesystem path (which would also leak across the IPC
+ * boundary as unbounded-cardinality data). */
+type SlidevResolution = { available: true; source: SlidevSource } | { available: false };
+
+/** Boundary probes, injected so resolution logic is testable without touching
+ * the real filesystem or spawning a login shell. */
+export interface SlidevResolveProbes {
+ /** True iff an executable file exists at `absPath`. */
+ isExecutableFile: (absPath: string) => Promise<boolean>;
+ /** True iff `bin` resolves on the user's login-shell PATH. */
+ isOnLoginPath: (bin: string) => Promise<boolean>;
+}
+
+/**
+ * The project-local shim npm wrote for this platform.
+ *
+ * On Windows npm writes THREE files into `.bin`: an extension-less POSIX shell
+ * script (for Git Bash), plus `slidev.cmd` and `slidev.ps1`. Only the `.cmd` is
+ * runnable by `CreateProcess` — spawning the extension-less one fails, and it
+ * would still be picked up by an existence check because Windows has no execute
+ * bit. Detect and spawn MUST agree on this name or the "detected ⇒ launchable"
+ * invariant breaks, which is why both sides call this.
+ */
+export function projectLocalSlidevBin(projectRoot: string, platform: NodeJS.Platform): string {
+ return join(projectRoot, 'node_modules', '.bin', platform === 'win32' ? 'slidev.cmd' : 'slidev');
+}
+
+export async function resolveSlidev(
+ projectRoot: string | undefined,
+ probes: SlidevResolveProbes,
+ platform: NodeJS.Platform = process.platform,
+): Promise<SlidevResolution> {
+ if (projectRoot) {
+ const local = projectLocalSlidevBin(projectRoot, platform);
+ if (await probes.isExecutableFile(local)) {
+ return { available: true, source: 'project-local' };
+ }
+ }
+ if (await probes.isOnLoginPath('slidev')) {
+ return { available: true, source: 'global' };
+ }
+ return { available: false };
+}
+
+/**
+ * Real filesystem executability check — `stat().isFile()` then `X_OK`. Absent,
+ * inaccessible, broken-symlink, and not-a-file all collapse to `false`; Windows
+ * has no execute bit, so a present regular file is treated as runnable there.
+ * The catch is the fs API's own contract (it throws ENOENT/EACCES for the exact
+ * absent/unreadable cases this returns `false` for), not a swallowed bug.
+ */
+export async function realIsExecutableFile(absPath: string): Promise<boolean> {
+ try {
+ const st = await stat(absPath);
+ if (!st.isFile()) return false;
+ if (process.platform === 'win32') return true;
+ await access(absPath, constants.X_OK);
+ return true;
+ } catch {
+ return false;
+ }
+}
diff --git a/packages/desktop/src/main/slidev-server.test.ts b/packages/desktop/src/main/slidev-server.test.ts
new file mode 100644
index 000000000..41e58bab8
--- /dev/null
+++ b/packages/desktop/src/main/slidev-server.test.ts
@@ -0,0 +1,470 @@
+/**
+ * Tests for the Slidev start/readiness logic.
+ *
+ * `startSlidevServer` (the readiness state machine) is exercised with injected
+ * spawn/port/probe/clock fakes — real-failure input at each injected boundary,
+ * asserting the returned verdict and that no process is ever left running on a
+ * failure. The real adapters that carry the I/O the state machine does not
+ * (`findFreePort`, `probeSlidevReady`) are pinned against real ephemeral
+ * sockets/servers; `buildSlidevInvocation`'s argv/quoting is pinned as a pure
+ * function.
+ */
+
+import { createServer as createHttpServer, type Server } from 'node:http';
+import { createServer } from 'node:net';
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import { validateSpawnPath } from './path-containment.ts';
+import {
+ buildSlidevInvocation,
+ findFreePort,
+ probeSlidevReady,
+ type ReadinessProbe,
+ type SlidevProcess,
+ type StartSlidevDeps,
+ startSlidevServer,
+} from './slidev-server.ts';
+
+/** A fake spawned process: records the signals it was sent, lets a test drive
+ * the exit callback, and can model a launch that dies the instant it is
+ * observed. */
+function fakeProcess(opts: { exitImmediately?: boolean } = {}) {
+ let exitCb: ((code: number | null) => void) | null = null;
+ let alive = true;
+ const signals: Array<'SIGTERM' | 'SIGKILL'> = [];
+ const proc: SlidevProcess = {
+ onExit: (cb) => {
+ exitCb = cb;
+ if (opts.exitImmediately) {
+ alive = false;
+ cb(null);
+ }
+ },
+ signal: (sig) => {
+ signals.push(sig);
+ },
+ isAlive: () => alive,
+ pid: 4242,
+ };
+ return {
+ proc,
+ emitExit: (code: number | null = null) => {
+ alive = false;
+ exitCb?.(code);
+ },
+ signals: () => signals,
+ };
+}
+
+/** Assemble `StartSlidevDeps` from a scripted probe sequence + a virtual clock
+ * that `delay` advances, so timeouts are deterministic and instantaneous. */
+function makeDeps(overrides: {
+ probes: ReadinessProbe[];
+ process?: ReturnType<typeof fakeProcess>;
+ freePort?: number;
+ spawn?: (port: number) => SlidevProcess;
+ findFreePort?: () => Promise<number>;
+ timeoutMs?: number;
+ pollIntervalMs?: number;
+}) {
+ const proc = overrides.process ?? fakeProcess();
+ const spawnCalls: number[] = [];
+ let clock = 0;
+ let probeIndex = 0;
+ const probeQueries: number[] = [];
+ const deps: StartSlidevDeps = {
+ findFreePort: overrides.findFreePort ?? (() => Promise.resolve(overrides.freePort ?? 3030)),
+ spawnSlidev:
+ overrides.spawn ??
+ ((port) => {
+ spawnCalls.push(port);
+ return proc.proc;
+ }),
+ probeReady: (port) => {
+ probeQueries.push(port);
+ // Last scripted probe repeats, modelling a server that stays in that
+ // state (e.g. never becomes reachable) until the deadline.
+ const probe = overrides.probes[Math.min(probeIndex, overrides.probes.length - 1)];
+ probeIndex += 1;
+ return Promise.resolve(probe);
+ },
+ now: () => clock,
+ delay: (ms) => {
+ clock += ms;
+ return Promise.resolve();
+ },
+ timeoutMs: overrides.timeoutMs ?? 1_000,
+ pollIntervalMs: overrides.pollIntervalMs ?? 250,
+ };
+ return { deps, proc, spawnCalls, probeQueries };
+}
+
+describe('startSlidevServer', () => {
+ it('reports success on the free port once the server serves a slidev deck', async () => {
+ const { deps, proc, spawnCalls } = makeDeps({
+ freePort: 5137,
+ probes: [{ reachable: false }, { reachable: true, hasVersionMeta: true }],
+ });
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: true, port: 5137, process: proc.proc });
+ // Spawned against exactly the port `findFreePort` handed back.
+ expect(spawnCalls).toEqual([5137]);
+ // A successful server is handed to the caller alive — not signalled here.
+ expect(proc.signals()).toEqual([]);
+ });
+
+ it('keeps polling while the server is not yet reachable', async () => {
+ const { deps, probeQueries } = makeDeps({
+ probes: [
+ { reachable: false },
+ { reachable: false },
+ { reachable: true, hasVersionMeta: true },
+ ],
+ });
+ const result = await startSlidevServer(deps);
+ expect(result.ok).toBe(true);
+ // Did not give up on the first not-reachable probe.
+ expect(probeQueries.length).toBe(3);
+ });
+
+ it('reports unsupported-server and reaps when a 200 lacks the version meta tag', async () => {
+ const { deps, proc } = makeDeps({
+ probes: [{ reachable: true, hasVersionMeta: false }],
+ });
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: false, reason: 'unsupported-server' });
+ // A foreign/too-old server is hard-reaped rather than opened onto — no orphan.
+ expect(proc.signals()).toEqual(['SIGKILL']);
+ });
+
+ it('reports timeout and reaps when the server never becomes reachable', async () => {
+ const { deps, proc } = makeDeps({
+ probes: [{ reachable: false }],
+ timeoutMs: 1_000,
+ pollIntervalMs: 250,
+ });
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: false, reason: 'timeout' });
+ // A hung start is hard-reaped so the deadline never leaks a process — no orphan.
+ expect(proc.signals()).toEqual(['SIGKILL']);
+ });
+
+ it('reports exited-early when the process dies before it observes readiness', async () => {
+ const proc = fakeProcess({ exitImmediately: true });
+ const { deps, probeQueries } = makeDeps({
+ process: proc,
+ probes: [{ reachable: true, hasVersionMeta: true }],
+ });
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: false, reason: 'exited-early' });
+ // Dead before the first probe — the poll short-circuits without probing.
+ expect(probeQueries.length).toBe(0);
+ // Already dead: nothing to signal.
+ expect(proc.signals()).toEqual([]);
+ });
+
+ it('reports exited-early when the process dies during a poll', async () => {
+ const proc = fakeProcess();
+ // The first probe both reports not-reachable AND kills the server, so the
+ // post-probe exit check catches the death.
+ let probed = false;
+ const { deps } = makeDeps({
+ process: proc,
+ probes: [{ reachable: false }],
+ spawn: () => proc.proc,
+ });
+ deps.probeReady = () => {
+ if (!probed) {
+ probed = true;
+ proc.emitExit(1);
+ }
+ return Promise.resolve({ reachable: false });
+ };
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: false, reason: 'exited-early' });
+ });
+
+ it('reports spawn-error and logs the OS error code when the spawn throws', async () => {
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const emfile: NodeJS.ErrnoException = Object.assign(new Error('spawn EMFILE'), {
+ code: 'EMFILE',
+ });
+ const { deps } = makeDeps({
+ probes: [{ reachable: true, hasVersionMeta: true }],
+ spawn: () => {
+ throw emfile;
+ },
+ });
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: false, reason: 'spawn-error' });
+ // The OS code is logged so EMFILE / ENOMEM / EACCES stay separable in
+ // diagnostics rather than collapsing into an undiagnosable 'spawn-error'.
+ expect(warnSpy).toHaveBeenCalledTimes(1);
+ expect(JSON.parse(warnSpy.mock.calls[0]?.[0] as string)).toMatchObject({
+ event: 'slides-spawn-error',
+ code: 'EMFILE',
+ });
+ warnSpy.mockRestore();
+ });
+
+ it('reports spawn-error when a free port cannot be found', async () => {
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const proc = fakeProcess();
+ let spawned = false;
+ const { deps } = makeDeps({
+ process: proc,
+ probes: [{ reachable: true, hasVersionMeta: true }],
+ findFreePort: () => Promise.reject(new Error('bind failed')),
+ spawn: () => {
+ spawned = true;
+ return proc.proc;
+ },
+ });
+ const result = await startSlidevServer(deps);
+ expect(result).toEqual({ ok: false, reason: 'spawn-error' });
+ // Never spawned when we could not even secure a port.
+ expect(spawned).toBe(false);
+ // A port-bind failure is logged too (code null — a plain Error carries none).
+ expect(warnSpy).toHaveBeenCalledTimes(1);
+ expect(JSON.parse(warnSpy.mock.calls[0]?.[0] as string)).toMatchObject({
+ event: 'slides-spawn-error',
+ code: null,
+ });
+ warnSpy.mockRestore();
+ });
+});
+
+describe('buildSlidevInvocation', () => {
+ it('spawns a project-local install directly with the deck path and port', () => {
+ const invocation = buildSlidevInvocation(
+ {
+ source: 'project-local',
+ projectRoot: '/decks/talk',
+ docPath: '/decks/talk/slides.md',
+ shell: '/bin/zsh',
+ },
+ 5301,
+ );
+ expect(invocation).toEqual({
+ mode: 'direct',
+ file: '/decks/talk/node_modules/.bin/slidev',
+ args: ['/decks/talk/slides.md', '--port', '5301'],
+ });
+ });
+
+ it('runs a global install through the login shell so PATH resolves slidev', () => {
+ const invocation = buildSlidevInvocation(
+ {
+ source: 'global',
+ projectRoot: '/decks/talk',
+ docPath: '/decks/talk/slides.md',
+ shell: '/bin/zsh',
+ },
+ 5301,
+ );
+ expect(invocation).toEqual({
+ mode: 'login-shell',
+ file: '/bin/zsh',
+ args: ['-l', '-i', '-c', "exec slidev '/decks/talk/slides.md' --port 5301"],
+ });
+ });
+
+ it('single-quote-escapes a deck path so it cannot break out of the shell command', () => {
+ const invocation = buildSlidevInvocation(
+ {
+ source: 'global',
+ projectRoot: undefined,
+ docPath: "/decks/o'brien; rm -rf ~/deck.md",
+ shell: 'zsh',
+ },
+ 3000,
+ );
+ // The embedded quote is escaped as '\'' and the whole path stays one token.
+ expect(invocation).toEqual({
+ mode: 'login-shell',
+ file: 'zsh',
+ args: ['-l', '-i', '-c', "exec slidev '/decks/o'\\''brien; rm -rf ~/deck.md' --port 3000"],
+ });
+ });
+
+ // (The former `project-local` + absent-root fallback test is gone: the
+ // discriminated `SlidevSpawnConfig` makes that state unrepresentable, so
+ // `buildSlidevInvocation` no longer needs a runtime guard for it.)
+});
+
+describe('findFreePort', () => {
+ it('returns a port that is actually bindable', async () => {
+ const port = await findFreePort();
+ expect(port).toBeGreaterThan(0);
+ // Prove it is free on the same host findFreePort binds (localhost) — the
+ // family Slidev then binds too: bind and release it.
+ await new Promise<void>((resolve, reject) => {
+ const s = createServer();
+ s.once('error', reject);
+ s.listen(port, 'localhost', () => s.close(() => resolve()));
+ });
+ });
+});
+
+describe('probeSlidevReady', () => {
+ const servers: Server[] = [];
+ afterEach(async () => {
+ await Promise.all(servers.splice(0).map((s) => new Promise<void>((r) => s.close(() => r()))));
+ });
+
+ /** Start an HTTP server returning `status`/`body` and resolve its port. */
+ function serve(body: string, status = 200): Promise<number> {
+ const server = createHttpServer((_req, res) => {
+ res.writeHead(status, { 'content-type': 'text/html' });
+ res.end(body);
+ });
+ servers.push(server);
+ return new Promise<number>((resolve) => {
+ server.listen(0, '127.0.0.1', () => {
+ const addr = server.address();
+ resolve(addr !== null && typeof addr !== 'string' ? addr.port : 0);
+ });
+ });
+ }
+
+ it('reports reachable with the version meta present on a real slidev-shaped page', async () => {
+ const port = await serve(
+ '<html><head><meta property="slidev:version" content="52.18.1"></head><body></body></html>',
+ );
+ expect(await probeSlidevReady(port)).toEqual({ reachable: true, hasVersionMeta: true });
+ });
+
+ it('reports reachable without the version meta for a 200 that is not slidev', async () => {
+ const port = await serve('<html><head><title>not slidev</title></head></html>');
+ expect(await probeSlidevReady(port)).toEqual({ reachable: true, hasVersionMeta: false });
+ });
+
+ it('reports not-reachable for a non-200 response (still booting)', async () => {
+ const port = await serve('<html>service unavailable</html>', 503);
+ expect(await probeSlidevReady(port)).toEqual({ reachable: false });
+ });
+
+ it('reports not-reachable when nothing is listening on the port', async () => {
+ // A just-released port answers ECONNREFUSED — the not-yet-listening state.
+ const port = await findFreePort();
+ expect(await probeSlidevReady(port)).toEqual({ reachable: false });
+ });
+});
+
+describe('buildSlidevInvocation — platform matrix', () => {
+ // The decision is pure and takes `platform`, so every branch is verifiable
+ // from any host. What this CANNOT prove is that the Windows spawn actually
+ // succeeds — that needs a Windows runtime, and the port spec's Tier-B work.
+ const deck = '/proj/decks/talk.md';
+
+ it('POSIX project-local spawns the shim directly, no shell', () => {
+ const inv = buildSlidevInvocation(
+ { source: 'project-local', projectRoot: '/proj', docPath: deck, shell: '/bin/zsh' },
+ 4300,
+ 'linux',
+ );
+ expect(inv.mode).toBe('direct');
+ expect(inv.file).toBe('/proj/node_modules/.bin/slidev');
+ expect(inv.args).toEqual([deck, '--port', '4300']);
+ });
+
+ it('POSIX global routes through the login shell', () => {
+ const inv = buildSlidevInvocation(
+ { source: 'global', projectRoot: '/proj', docPath: deck, shell: '/bin/zsh' },
+ 4300,
+ 'linux',
+ );
+ expect(inv.mode).toBe('login-shell');
+ expect(inv.file).toBe('/bin/zsh');
+ expect(inv.args.slice(0, 3)).toEqual(['-l', '-i', '-c']);
+ });
+
+ it('Windows project-local targets the .cmd shim via cmd.exe', () => {
+ // `CreateProcess` cannot run the extension-less POSIX shim npm also writes,
+ // and a `.cmd` needs a command processor.
+ const inv = buildSlidevInvocation(
+ { source: 'project-local', projectRoot: 'C:\\proj', docPath: deck, shell: '' },
+ 4300,
+ 'win32',
+ );
+ expect(inv.mode).toBe('windows-shell');
+ expect(inv.file).toBe('cmd.exe');
+ // Assert the DECISION (which shim name), not the separator: `node:path`'s
+ // `join` follows the HOST, so a win32 path built on macOS uses `/`. In
+ // production host and target are the same machine, so this is only a
+ // cross-host testing artefact.
+ //
+ // The target and deck path live inside the single cmd-quoted command line
+ // rather than in their own argv slots — that IS the fix for the cmd.exe
+ // re-parse, so asserting the slot shape would pin the vulnerable form.
+ const cmdline = inv.args[3] ?? '';
+ expect(cmdline).toContain('slidev.cmd');
+ expect(cmdline).toContain('node_modules');
+ expect(cmdline).toContain(deck);
+ expect(inv.verbatim).toBe(true);
+ });
+
+ it('Windows global lets cmd resolve slidev against PATHEXT', () => {
+ const inv = buildSlidevInvocation(
+ { source: 'global', projectRoot: 'C:\\proj', docPath: deck, shell: '' },
+ 4300,
+ 'win32',
+ );
+ expect(inv.mode).toBe('windows-shell');
+ expect(inv.file).toBe('cmd.exe');
+ expect(inv.args.slice(0, 3)).toEqual(['/d', '/s', '/c']);
+ expect(inv.args[3]).toContain('"slidev"');
+ });
+
+ it('never emits POSIX login-shell flags on Windows', () => {
+ // `-l -i -c` are meaningless to cmd.exe; emitting them was the original bug.
+ for (const source of ['project-local', 'global'] as const) {
+ const inv = buildSlidevInvocation(
+ { source, projectRoot: 'C:\\proj', docPath: deck, shell: '' },
+ 4300,
+ 'win32',
+ );
+ expect(inv.args).not.toContain('-l');
+ expect(inv.args).not.toContain('-i');
+ }
+ });
+});
+
+describe('buildSlidevInvocation — Windows command-line injection', () => {
+ // The win32 counterpart to the POSIX "single-quote-escapes a deck path" test.
+ // An argv array is NOT a safety boundary when the executable is `cmd.exe`:
+ // libuv joins argv into one command line quoting only values containing a
+ // space, tab, or quote, and cmd.exe then re-parses that line under its own
+ // grammar, where `&` separates commands. `a&calc.exe&b.md` has no space, so
+ // it arrives unquoted and the second command runs.
+ const evil = 'C:\\proj\\decks\\a&calc.exe&b.md';
+
+ it('does not leave a live cmd.exe separator in the command line', () => {
+ const inv = buildSlidevInvocation(
+ { source: 'global', projectRoot: 'C:\\proj', docPath: evil, shell: '' },
+ 4300,
+ 'win32',
+ );
+ // The deck path must never appear as its own bare argv slot — that is the
+ // shape cmd.exe splits on.
+ expect(inv.args).not.toContain(evil);
+ // `/s` strips exactly the outer quote pair and runs the remainder, so that
+ // remainder is what cmd actually parses. Collapse its quoted spans; any
+ // metacharacter still standing would be a live separator.
+ const cmdline = inv.args[3] ?? '';
+ expect(cmdline.startsWith('"') && cmdline.endsWith('"')).toBe(true);
+ const parsedByCmd = cmdline.slice(1, -1);
+ const unquoted = parsedByCmd.replace(/"[^"]*"/g, '');
+ expect(unquoted).not.toMatch(/[&|<>^]/);
+ // …and the path is still fully present inside its quoted span.
+ expect(parsedByCmd).toContain(`"${evil}"`);
+ });
+
+ it('refuses a deck path carrying characters cmd.exe quoting cannot neutralize', () => {
+ // `%` still expands inside double quotes and `"` cannot be quoted at all,
+ // so these are refused at admission rather than escaped.
+ expect(validateSpawnPath('C:\\proj\\%PATH%.md', 'win32')).toBe(false);
+ expect(validateSpawnPath('C:\\proj\\a"b.md', 'win32')).toBe(false);
+ // A legitimate name with `&` stays admissible — quoting handles it.
+ expect(validateSpawnPath('C:\\proj\\Q1 & Q2.md', 'win32')).toBe(true);
+ });
+});
diff --git a/packages/desktop/src/main/slidev-server.ts b/packages/desktop/src/main/slidev-server.ts
new file mode 100644
index 000000000..f0bb4218a
--- /dev/null
+++ b/packages/desktop/src/main/slidev-server.ts
@@ -0,0 +1,469 @@
+/**
+ * Start a Slidev dev server for a deck and confirm it is actually serving
+ * before anyone points a window at it.
+ *
+ * OK never renders slides — Slidev does, in a process we spawn. The one thing
+ * that can go wrong invisibly is opening a window onto a port that is not yet
+ * (or never will be) a live Slidev server: the spawn can fail, the server can
+ * die mid-boot, it can hang, or the port can answer with something that is not
+ * a Slidev deck. `startSlidevServer` collapses all of that into a single
+ * verdict, and guarantees the spawned process is reaped on every failure path
+ * so a rejected start never leaks a server or its port.
+ *
+ * Readiness copies VS Code's Slidev extension: a served page is a drivable
+ * Slidev server iff it answers HTTP 200 AND carries the `slidev:version` meta
+ * tag. A 200 without that tag is a foreign or too-old server we refuse rather
+ * than open a broken window onto.
+ *
+ * Spawn, free-port selection, HTTP probing, the clock, and the sleeper are all
+ * injected so the readiness logic runs deterministically under Vitest with no
+ * real Slidev, no real socket, and no wall-clock waiting. `main/index.ts` wires
+ * the real adapters below.
+ */
+
+import { type ChildProcess, spawn } from 'node:child_process';
+import { statSync } from 'node:fs';
+import { createServer } from 'node:net';
+import { homedir } from 'node:os';
+import { delimiter } from 'node:path';
+import { augmentAgentSpawnPath } from '@inkeep/open-knowledge-core';
+import { projectLocalSlidevBin } from './slidev-resolve.ts';
+
+/** The subprocess surface the readiness poll drives. Named methods (not a
+ * structural `ChildProcess`) keep the fake in tests tiny and sidestep the
+ * EventEmitter overload friction, matching `ProbeChild` in claude-readiness. */
+export interface SlidevProcess {
+ onExit(cb: (code: number | null) => void): void;
+ /** Deliver `signal` to the process — for the real adapter, to its whole
+ * process group so the forked Vite dev server dies with the launcher.
+ * Best-effort: a signal to an already-exited process is a no-op. */
+ signal(signal: 'SIGTERM' | 'SIGKILL'): void;
+ /** Whether the process is still running — drives the graceful-teardown grace
+ * poll (SIGTERM, wait, escalate). */
+ isAlive(): boolean;
+ readonly pid: number | undefined;
+ /** The `'error'` event's error, when the launch itself failed (ENOENT when
+ * `slidev` is not on PATH, EACCES when it is not executable). Undefined for a
+ * process that started and later exited — that is a different failure, and
+ * conflating the two reports "couldn't render" for "couldn't launch". */
+ readonly spawnError?: NodeJS.ErrnoException | undefined;
+}
+
+/** One HTTP readiness observation. `reachable: false` folds every
+ * not-yet-serving state (connection refused during boot, non-200, fetch
+ * error) into a single retry signal; a reachable page reports whether it is a
+ * Slidev deck via the version meta tag. */
+export type ReadinessProbe = { reachable: false } | { reachable: true; hasVersionMeta: boolean };
+
+/** Why a start did not yield a live, drivable Slidev server. `spawn-error` and
+ * `exited-early` mean no process is left running; `timeout` and
+ * `unsupported-server` mean the poll reaped the process before returning.
+ * Not exported — the wire maps these into `SlidevOpenFailureReason`; nothing
+ * outside this module needs the name. */
+type SlidevStartFailure = 'spawn-error' | 'exited-early' | 'timeout' | 'unsupported-server';
+
+export type StartSlidevResult =
+ | { ok: true; port: number; process: SlidevProcess }
+ | { ok: false; reason: SlidevStartFailure };
+
+export interface StartSlidevDeps {
+ /** Pick an unused TCP port to serve on. */
+ findFreePort(): Promise<number>;
+ /** Launch `slidev` against the deck, serving on `port`. */
+ spawnSlidev(port: number): SlidevProcess;
+ /** GET the served root and classify readiness. Contract: total — reports
+ * `reachable: false` for connection/HTTP failures rather than rejecting. */
+ probeReady(port: number): Promise<ReadinessProbe>;
+ /** Monotonic-enough clock for the deadline (real: `Date.now`). */
+ now(): number;
+ /** Sleep between polls (real: `setTimeout`). */
+ delay(ms: number): Promise<void>;
+ /**
+ * Called with the child the instant it is spawned, before readiness is
+ * probed. A deck only reaches the registry once its server is CONFIRMED
+ * serving, and a cold Vite start takes seconds — so without this hook a quit
+ * landing inside that window finds nothing to signal, and the `detached`
+ * process outlives the app holding its port. This makes the handle reachable
+ * from spawn rather than from success.
+ */
+ onSpawned?(process: SlidevProcess): void;
+ timeoutMs?: number;
+ pollIntervalMs?: number;
+}
+
+/** Slidev cold start pays a Vite dev-server boot; give it generous headroom
+ * before declaring a hang, and poll often enough that a ready server opens
+ * promptly. */
+const DEFAULT_TIMEOUT_MS = 20_000;
+const DEFAULT_POLL_INTERVAL_MS = 250;
+
+export async function startSlidevServer(deps: StartSlidevDeps): Promise<StartSlidevResult> {
+ const timeoutMs = deps.timeoutMs ?? DEFAULT_TIMEOUT_MS;
+ const pollIntervalMs = deps.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
+
+ let port: number;
+ let child: SlidevProcess;
+ try {
+ port = await deps.findFreePort();
+ child = deps.spawnSlidev(port);
+ } catch (err) {
+ // Trust boundary: child_process.spawn throws synchronously on resource
+ // exhaustion (EMFILE/ENOMEM), and a port bind can fail. The child never
+ // started, so there is nothing to reap. Log the OS error code so EMFILE /
+ // ENOMEM / EACCES stay separable in diagnostics — otherwise every cause logs
+ // identically as a bare 'spawn-error'. The wire reason stays the bounded
+ // literal; no path or free-form string crosses the IPC boundary.
+ console.warn(
+ JSON.stringify({
+ event: 'slides-spawn-error',
+ code: (err as NodeJS.ErrnoException | null)?.code ?? null,
+ message: err instanceof Error ? err.message : String(err),
+ }),
+ );
+ return { ok: false, reason: 'spawn-error' };
+ }
+ // Publish the handle before the readiness poll — everything below this line
+ // can take seconds, and app-quit teardown has to be able to reach the child
+ // during all of it.
+ deps.onSpawned?.(child);
+
+ let exited = false;
+ child.onExit(() => {
+ exited = true;
+ });
+
+ const deadline = deps.now() + timeoutMs;
+ while (true) {
+ if (exited) {
+ // A launch that never started (ENOENT / EACCES) also lands here via the
+ // 'error' event, but it is a different failure from a deck that crashed
+ // after serving — report it as such so the user is told Slidev could not
+ // be found rather than that their document could not be rendered.
+ if (child.spawnError !== undefined) return { ok: false, reason: 'spawn-error' };
+ // Slidev quit before it served (unreadable deck, a port it could not
+ // bind, a crash). Already dead — no reap needed.
+ return { ok: false, reason: 'exited-early' };
+ }
+ const probe = await deps.probeReady(port);
+ // The process can exit DURING the probe await, so re-check before acting on
+ // a probe result from an already-dead server (not a duplicate of the pre-
+ // probe check above).
+ if (exited) {
+ if (child.spawnError !== undefined) return { ok: false, reason: 'spawn-error' };
+ return { ok: false, reason: 'exited-early' };
+ }
+ if (probe.reachable) {
+ if (probe.hasVersionMeta) return { ok: true, port, process: child };
+ // Answers HTTP but is not a Slidev deck we can drive (foreign server, or
+ // one too old to carry the meta tag). A failed start is hard-reaped, not
+ // gracefully drained: it never served, so nothing needs to flush, and a
+ // guaranteed kill keeps the no-orphan promise on the error path. (The
+ // window-close teardown, where a deck WAS serving, is the graceful one.)
+ child.signal('SIGKILL');
+ return { ok: false, reason: 'unsupported-server' };
+ }
+ if (deps.now() >= deadline) {
+ // Hung past the readiness deadline — hard-reap for the same reason.
+ child.signal('SIGKILL');
+ return { ok: false, reason: 'timeout' };
+ }
+ await deps.delay(pollIntervalMs);
+ }
+}
+
+// ---------------------------------------------------------------------------
+// Real adapters — the OS-facing implementations `main/index.ts` injects. The
+// pure state machine above is exercised in tests with fakes; these carry the
+// I/O the tests do not.
+// ---------------------------------------------------------------------------
+
+/**
+ * Ask the OS for an unused loopback TCP port by binding to 0 and reading the
+ * assigned port back. Binds on `localhost` (not a pinned `127.0.0.1`) so the
+ * free-port check runs on the SAME address family Slidev/Vite then binds — both
+ * resolve `localhost` verbatim, which puts `::1` first on macOS. Pinning IPv4
+ * here would verify a different family than Slidev uses, so a port free on IPv4
+ * but taken on IPv6 would pass this check and then fail Slidev's bind. A port
+ * freed this way can still race another binder before Slidev claims it, but
+ * Slidev picking a busy port surfaces as `exited-early` or a readiness
+ * `timeout` — the same reaped-and-reported paths as any other bad start, so no
+ * orphan results.
+ */
+export function findFreePort(): Promise<number> {
+ return new Promise<number>((resolvePort, rejectPort) => {
+ const server = createServer();
+ server.once('error', rejectPort);
+ server.listen(0, 'localhost', () => {
+ const addr = server.address();
+ if (addr === null || typeof addr === 'string') {
+ server.close();
+ rejectPort(new Error('could not resolve a free port'));
+ return;
+ }
+ const { port } = addr;
+ server.close(() => resolvePort(port));
+ });
+ });
+}
+
+/** Slidev serves this meta tag in its index HTML; VS Code reads the same tag to
+ * detect and version-gate a running server. Matched loosely (`property=` or
+ * `name=`) so an attribute-order or attribute-name change upstream still
+ * detects a genuine Slidev page. */
+const SLIDEV_VERSION_META_RE = /<meta[^>]*slidev:version/i;
+
+/** Per-probe HTTP timeout — short, because an unreachable port should fail fast
+ * and let the outer poll retry rather than stall a whole poll interval. */
+const PROBE_TIMEOUT_MS = 2_000;
+
+/**
+ * HTTP-probe a spawned Slidev at `localhost:<port>` and classify readiness.
+ * Total by contract: connection refused (server not listening yet), a non-200,
+ * or any fetch error collapses to `reachable: false` so the poll keeps trying
+ * through boot; only a 200 is inspected for the version meta tag.
+ *
+ * The host must stay `localhost` rather than a pinned `127.0.0.1`: Vite — and so
+ * Slidev — listens on whatever `localhost` resolves to, and Node resolves it
+ * verbatim, which on macOS puts `::1` first. A real Slidev therefore binds the
+ * IPv6 loopback ONLY, an IPv4-pinned probe is refused for the entire readiness
+ * window, and a healthy server gets reaped as a `timeout`. `localhost` reaches
+ * either family via happy-eyeballs and still resolves only to loopback, so the
+ * loopback-only guarantee is unchanged. Keep in sync with the window's embed URL.
+ */
+export async function probeSlidevReady(port: number): Promise<ReadinessProbe> {
+ try {
+ const res = await fetch(`http://localhost:${port}/`, {
+ signal: AbortSignal.timeout(PROBE_TIMEOUT_MS),
+ });
+ if (!res.ok) return { reachable: false };
+ const html = await res.text();
+ return { reachable: true, hasVersionMeta: SLIDEV_VERSION_META_RE.test(html) };
+ } catch {
+ // Trust boundary: the server may not be listening yet
+ // (ECONNREFUSED), the socket may reset mid-boot, or the fetch may time out.
+ // None of these mean "not Slidev" — only "not ready" — so retry.
+ return { reachable: false };
+ }
+}
+
+/** How to launch `slidev` for a deck. A project-local install is an executable
+ * path we can spawn directly, so its `projectRoot` is bound non-optional; a
+ * global one lives only on the user's login shell PATH (a GUI Electron process
+ * does not inherit it) and may run in a project-less window, so its
+ * `projectRoot` is optional. Discriminated on `source` so the illegal
+ * `project-local` + absent-root state is unrepresentable — the direct-spawn
+ * path can rely on the root at compile time. */
+export type SlidevSpawnConfig = {
+ /** Absolute path of the deck to serve. */
+ readonly docPath: string;
+ /** The user's login shell, for the global-install launch. */
+ readonly shell: string;
+} & (
+ | { readonly source: 'project-local'; readonly projectRoot: string }
+ | { readonly source: 'global'; readonly projectRoot: string | undefined }
+);
+
+/** A resolved spawn descriptor — either a direct executable launch or a
+ * login-shell command line. Pure output of {@link buildSlidevInvocation} so
+ * the argv/quoting is unit-testable without spawning. */
+export type SlidevInvocation =
+ | { readonly mode: 'direct'; readonly file: string; readonly args: readonly string[] }
+ | { readonly mode: 'login-shell'; readonly file: string; readonly args: readonly string[] }
+ /** Windows: `cmd.exe /c <target> …` — the only way to run a `.cmd` shim, and
+ * how a global install is resolved against PATHEXT. `args` is already a
+ * cmd-quoted command line, so the spawn MUST set `windowsVerbatimArguments`
+ * (see {@link realSpawnSlidev}); letting libuv re-quote it would escape the
+ * inner quotes with backslashes, which cmd does not understand. */
+ | {
+ readonly mode: 'windows-shell';
+ readonly file: string;
+ readonly args: readonly string[];
+ readonly verbatim: true;
+ };
+
+/** POSIX single-quote: wrap in `'…'` and escape embedded quotes as `'\''`. The
+ * canonical injection-safe quoting for a value spliced into a shell command
+ * line (the global-install deck path). */
+function shSingleQuote(value: string): string {
+ return `'${value.replace(/'/g, `'\\''`)}'`;
+}
+
+/** Wrap a token for `cmd.exe`. Double quotes make `& | < > ^` inert; the
+ * two characters quoting cannot neutralize (`"` and `%`) are refused at
+ * admission by `validateSpawnPath`, so there is nothing left to escape. */
+function cmdQuote(value: string): string {
+ return `"${value}"`;
+}
+
+/**
+ * Build the spawn descriptor for `slidev <docPath> --port <port>`. Served at
+ * the root with no `--base`, sidestepping the two open upstream `--base` /
+ * `routerMode` embed regressions.
+ *
+ * A project-local install spawns directly (argv array, no shell) — zero
+ * injection surface. A global install routes through `<shell> -l -i -c` so the
+ * bare `slidev` resolves against the same login-shell PATH the detect step used
+ * ("detected ⇒ launchable"); the deck path is single-quoted against injection.
+ */
+export function buildSlidevInvocation(
+ config: SlidevSpawnConfig,
+ port: number,
+ platform: NodeJS.Platform = process.platform,
+): SlidevInvocation {
+ const portArgs = ['--port', String(port)];
+ if (platform === 'win32') {
+ // Windows has no POSIX login shell — `-l -i -c` are flags `cmd.exe` does
+ // not understand, and the GUI-PATH problem those flags exist to solve is a
+ // macOS/Linux launcher issue (a Windows GUI process inherits the user PATH
+ // from the registry). Both sources therefore route through `cmd.exe /c`:
+ // the project-local shim is a `.cmd`, which `CreateProcess` cannot run
+ // directly, and a global install is resolved by cmd against PATHEXT.
+ //
+ // An argv array is NOT a safety boundary here. Node joins argv into a single
+ // command line quoting only values containing a space, tab, or quote (the
+ // `CommandLineToArgvW` convention libuv follows), and `cmd.exe` then
+ // re-parses that line under its own grammar, where `&` separates commands.
+ // A deck named `a&calc.exe&b.md` contains no space, so it would arrive
+ // unquoted and the second command would run. The two conventions do not
+ // compose, so the command line is built here and handed over verbatim.
+ const target =
+ config.source === 'project-local'
+ ? projectLocalSlidevBin(config.projectRoot, platform)
+ : 'slidev';
+ // `/s` strips exactly the outer quote pair and treats the remainder
+ // literally, so each token can carry its own quotes. `"` and `%` are refused
+ // upstream by `validateSpawnPath` because quoting cannot neutralize them.
+ const cmdline = `"${cmdQuote(target)} ${cmdQuote(config.docPath)} ${portArgs.join(' ')}"`;
+ return {
+ mode: 'windows-shell',
+ file: 'cmd.exe',
+ args: ['/d', '/s', '/c', cmdline],
+ verbatim: true,
+ };
+ }
+ if (config.source === 'project-local') {
+ // The discriminated config guarantees a project root for a project-local
+ // source, so the direct-spawn path can use it without a runtime guard.
+ const bin = projectLocalSlidevBin(config.projectRoot, platform);
+ return { mode: 'direct', file: bin, args: [config.docPath, ...portArgs] };
+ }
+ const cmdline = `exec slidev ${shSingleQuote(config.docPath)} ${portArgs.join(' ')}`;
+ return { mode: 'login-shell', file: config.shell, args: ['-l', '-i', '-c', cmdline] };
+}
+
+/** Best-effort delivery of `sig` to `child` and, on POSIX, its process group —
+ * Slidev forks a Vite dev server, so signalling only the direct child would
+ * orphan it. On Windows there is no process group and SIGTERM carries no
+ * graceful meaning, so a reap is always a direct terminate regardless of the
+ * signal asked for. */
+function signalSlidevChild(child: ChildProcess, sig: 'SIGTERM' | 'SIGKILL'): void {
+ const pid = child.pid;
+ if (pid === undefined) return;
+ if (process.platform === 'win32') {
+ try {
+ child.kill();
+ } catch {
+ // Already gone.
+ }
+ return;
+ }
+ try {
+ process.kill(-pid, sig);
+ } catch {
+ // No such group (already exited) — fall back to the direct child.
+ try {
+ child.kill(sig);
+ } catch {
+ // Already gone.
+ }
+ }
+}
+
+/** True iff `dir` exists and is a directory — the existence gate
+ * `augmentAgentSpawnPath` uses to append only real tool dirs. */
+function isDir(dir: string): boolean {
+ try {
+ return statSync(dir).isDirectory();
+ } catch {
+ return false;
+ }
+}
+
+/**
+ * `process.env` with PATH repaired: a Dock/Finder-launched app inherits
+ * launchd's minimal PATH, under which a project-local `.bin/slidev` shebang
+ * (`#!/usr/bin/env node`) cannot find `node`. Appends the well-known tool +
+ * package-manager global dirs, the same augmentation git and ACP spawns use.
+ */
+function repairedSpawnEnv(): NodeJS.ProcessEnv {
+ const env: NodeJS.ProcessEnv = { ...process.env };
+ env.PATH = augmentAgentSpawnPath(env.PATH, {
+ platform: process.platform,
+ homeDir: homedir(),
+ isDir,
+ delimiter,
+ });
+ return env;
+}
+
+/**
+ * Spawn a real Slidev process and adapt it to {@link SlidevProcess}. POSIX
+ * spawns `detached` for process-group leadership so {@link signalSlidevChild}
+ * can reap the whole tree. `onExit` also fires on the async `'error'` event (an
+ * ENOENT/EACCES that never produces an `'exit'`), so a failed launch settles
+ * the readiness poll immediately instead of stalling to its timeout.
+ */
+export function realSpawnSlidev(config: SlidevSpawnConfig, port: number): SlidevProcess {
+ const invocation = buildSlidevInvocation(config, port);
+ const child = spawn(invocation.file, [...invocation.args], {
+ cwd: config.projectRoot,
+ env: repairedSpawnEnv(),
+ stdio: 'ignore',
+ shell: false,
+ detached: process.platform !== 'win32',
+ windowsHide: true,
+ // The windows-shell arm hands over an already-quoted cmd command line;
+ // letting libuv re-quote it would backslash-escape the inner quotes, which
+ // cmd does not understand.
+ windowsVerbatimArguments: invocation.mode === 'windows-shell',
+ });
+ // Track liveness off the process's own exit/error rather than a pid probe: for
+ // a child we own, a probe would race the OS reaping the exited pid, while the
+ // exit event is authoritative.
+ let alive = true;
+ // Keep the spawn error rather than only its liveness effect: an ENOENT (no
+ // `slidev` on PATH) and an EACCES (present but not executable) are the two
+ // most common "why doesn't this work?" causes, and both otherwise reach the
+ // readiness poll as an indistinguishable `alive === false` and get reported as
+ // `exited-early` — "Slidev couldn't render this document" for what is really
+ // "Slidev could not be launched".
+ let spawnError: NodeJS.ErrnoException | undefined;
+ child.on('exit', () => {
+ alive = false;
+ });
+ child.on('error', (err: NodeJS.ErrnoException) => {
+ alive = false;
+ spawnError = err;
+ console.warn(
+ JSON.stringify({
+ event: 'slides-child-error',
+ code: err?.code ?? null,
+ message: err instanceof Error ? err.message : String(err),
+ }),
+ );
+ });
+ return {
+ onExit: (cb) => {
+ child.on('exit', (code) => cb(code));
+ child.on('error', () => cb(null));
+ },
+ get spawnError() {
+ return spawnError;
+ },
+ signal: (sig) => signalSlidevChild(child, sig),
+ isAlive: () => alive,
+ get pid() {
+ return child.pid;
+ },
+ };
+}
diff --git a/packages/desktop/src/main/window-manager.ts b/packages/desktop/src/main/window-manager.ts
index 73376988d..7bb18ed8b 100644
--- a/packages/desktop/src/main/window-manager.ts
+++ b/packages/desktop/src/main/window-manager.ts
@@ -202,14 +202,16 @@ export interface BrowserWindowLike {
*/
executeJavaScript(code: string): Promise<unknown>;
/**
- * `will-navigate` + `setWindowOpenHandler` used by the asset-click
- * safety net. Narrow structural signature — tests that don't exercise
- * the safety net can leave these as no-ops. Matches Electron's
+ * `will-navigate` / `will-redirect` + `setWindowOpenHandler` used by the
+ * asset-click safety net and the slides-window origin containment.
+ * `will-redirect` shares `will-navigate`'s `(event, url)` shape (its extra
+ * trailing args are unused here). Narrow structural signature — tests that
+ * don't exercise these can leave them as no-ops. Matches Electron's
* `WebContents` at runtime.
*/
setWindowOpenHandler(handler: (details: { url: string }) => { action: 'allow' | 'deny' }): void;
on(
- event: 'will-navigate',
+ event: 'will-navigate' | 'will-redirect',
handler: (event: { preventDefault: () => void }, url: string) => void,
): void;
};
diff --git a/packages/desktop/src/preload/index.ts b/packages/desktop/src/preload/index.ts
index 329e954c5..d7b86eda9 100644
--- a/packages/desktop/src/preload/index.ts
+++ b/packages/desktop/src/preload/index.ts
@@ -69,6 +69,7 @@ import type {
import { createInvoker } from '../shared/ipc-invoke.ts';
import { resolveOkDesktopMode } from '../shared/ok-desktop-mode.ts';
import { isUninstallPreload } from '../shared/uninstall-preload-arg.ts';
+import { createSlidesBridge } from './slides-bridge.ts';
import { createUninstallBridge } from './uninstall.ts';
const invoke = createInvoker(ipcRenderer);
@@ -522,6 +523,8 @@ const bridge: OkDesktopBridge = {
},
},
+ slides: createSlidesBridge(invoke),
+
bugReport: {
// The `kind` discriminant is added here so the renderer surface stays
// per-operation while the wire stays one consolidated channel
diff --git a/packages/desktop/src/preload/slides-bridge.test.ts b/packages/desktop/src/preload/slides-bridge.test.ts
new file mode 100644
index 000000000..aba8d66a9
--- /dev/null
+++ b/packages/desktop/src/preload/slides-bridge.test.ts
@@ -0,0 +1,83 @@
+/**
+ * The slides bridge slice, driven over a fake invoker.
+ *
+ * The seam is carved at the IPC call — the true external boundary — so the
+ * narrowing and the wrong-arm guards below are the SAME code the preload runs
+ * in production. The renderer-side DOM tests fake `window.okDesktop.slides`
+ * wholesale, which sits ABOVE this logic and therefore replaces it rather than
+ * exercising it; before this file the two `expected … result` throws existed
+ * only in source, with nothing running them.
+ *
+ * What a fake invoker cannot prove is left to the Electron tier: that
+ * `contextBridge` actually exposes this slice on `window.okDesktop`, and that
+ * main's handler answers the channel at all.
+ */
+
+import { describe, expect, test, vi } from 'vitest';
+import type { IpcInvoker } from '../shared/ipc-invoke.ts';
+import { createSlidesBridge } from './slides-bridge.ts';
+
+/** A fake invoker that answers `ok:slides:dispatch` with whatever the test
+ * scripts. Typed loosely at the seam only — the production narrowing above it
+ * is what these tests are here to run. */
+function fakeInvoker(reply: (req: { kind: string; docPath?: string }) => unknown): IpcInvoker {
+ return vi.fn((_channel: string, req: unknown) =>
+ Promise.resolve(reply(req as { kind: string; docPath?: string })),
+ ) as unknown as IpcInvoker;
+}
+
+describe('createSlidesBridge — happy path', () => {
+ test('status passes the status arm through', async () => {
+ const bridge = createSlidesBridge(
+ fakeInvoker(() => ({ kind: 'status', available: true, source: 'global' })),
+ );
+ await expect(bridge.status()).resolves.toEqual({
+ kind: 'status',
+ available: true,
+ source: 'global',
+ });
+ });
+
+ test('open sends the doc path and passes the open arm through', async () => {
+ const invoke = fakeInvoker(() => ({ kind: 'open', ok: true }));
+ const bridge = createSlidesBridge(invoke);
+
+ await expect(bridge.open('/proj/decks/talk.md')).resolves.toEqual({ kind: 'open', ok: true });
+ expect(invoke).toHaveBeenCalledWith('ok:slides:dispatch', {
+ kind: 'open',
+ docPath: '/proj/decks/talk.md',
+ });
+ });
+
+ test('a failure arm is a value, not a throw — the renderer renders the reason', async () => {
+ const bridge = createSlidesBridge(
+ fakeInvoker(() => ({ kind: 'open', ok: false, reason: 'timeout' })),
+ );
+ await expect(bridge.open('/proj/deck.md')).resolves.toEqual({
+ kind: 'open',
+ ok: false,
+ reason: 'timeout',
+ });
+ });
+});
+
+describe('createSlidesBridge — wrong-arm guards', () => {
+ // These are the guards that had no coverage at all. A main-process handler
+ // regression that answered the wrong arm would otherwise reach the renderer
+ // as a plausible object of the wrong shape, and fail somewhere further away.
+ test('status throws when main answers with the open arm', async () => {
+ const bridge = createSlidesBridge(fakeInvoker(() => ({ kind: 'open', ok: true })));
+ await expect(bridge.status()).rejects.toThrow('expected status result');
+ });
+
+ test('open throws when main answers with the status arm', async () => {
+ const bridge = createSlidesBridge(fakeInvoker(() => ({ kind: 'status', available: false })));
+ await expect(bridge.open('/proj/deck.md')).rejects.toThrow('expected open result');
+ });
+
+ test('a malformed reply with no arm at all is refused, not passed through', async () => {
+ const bridge = createSlidesBridge(fakeInvoker(() => ({})));
+ await expect(bridge.status()).rejects.toThrow('expected status result');
+ await expect(bridge.open('/proj/deck.md')).rejects.toThrow('expected open result');
+ });
+});
diff --git a/packages/desktop/src/preload/slides-bridge.ts b/packages/desktop/src/preload/slides-bridge.ts
new file mode 100644
index 000000000..4fe6a3b92
--- /dev/null
+++ b/packages/desktop/src/preload/slides-bridge.ts
@@ -0,0 +1,48 @@
+/**
+ * The renderer-facing `slides` bridge slice, extracted from the preload's
+ * `exposeInMainWorld` object so it can run against a fake invoker in tests.
+ *
+ * Why this is its own module: the slice is not a pass-through. Both methods
+ * narrow a discriminated wire union (`ok:slides:dispatch` answers `status | open`)
+ * and THROW when main returns the wrong arm — a real guard against a handler
+ * regression that would otherwise reach the renderer as a plausible-looking
+ * object of the wrong shape. Inline in `preload/index.ts` that logic is
+ * unreachable from tests: the module calls `contextBridge.exposeInMainWorld` at
+ * import time, so a renderer test can only fake the whole slice, which replaces
+ * the narrowing instead of exercising it.
+ *
+ * Taking `IpcInvoker` as a parameter is the shape `ipc-invoke.ts` already
+ * documents for preload helpers. The seam is carved at the true external
+ * boundary — the IPC call — so everything above it (narrowing, guards) is the
+ * real production code in both production and test.
+ */
+
+import type { OkSlidesOpenResult, OkSlidesStatusResult } from '../shared/ipc-channels.ts';
+import type { IpcInvoker } from '../shared/ipc-invoke.ts';
+
+export interface SlidesBridge {
+ status(): Promise<OkSlidesStatusResult>;
+ open(docPath: string): Promise<OkSlidesOpenResult>;
+}
+
+export function createSlidesBridge(invoke: IpcInvoker): SlidesBridge {
+ return {
+ // Single discriminated channel (`ok:slides:dispatch`). The result is a union
+ // (status | open), so each method narrows on `result.kind` and throws if the
+ // wire returns the wrong arm — mirrors the `ok:sharing:dispatch` preload.
+ status: async () => {
+ const result = await invoke('ok:slides:dispatch', { kind: 'status' });
+ if (result.kind !== 'status') {
+ throw new Error('ok:slides:dispatch: expected status result');
+ }
+ return result;
+ },
+ open: async (docPath: string) => {
+ const result = await invoke('ok:slides:dispatch', { kind: 'open', docPath });
+ if (result.kind !== 'open') {
+ throw new Error('ok:slides:dispatch: expected open result');
+ }
+ return result;
+ },
+ };
+}
diff --git a/packages/desktop/src/shared/ipc-channels.ts b/packages/desktop/src/shared/ipc-channels.ts
index fbd15f5fb..93a4ebfde 100644
--- a/packages/desktop/src/shared/ipc-channels.ts
+++ b/packages/desktop/src/shared/ipc-channels.ts
@@ -30,7 +30,7 @@
* existing channels is preferred over net-new hand-rolled channels until
* that migration lands.
*
- * Count is 89 (ratchet cap 89). The 74→75 bump reconciled a merge collision:
+ * Count is 91 (ratchet cap 91). The 74→75 bump reconciled a merge collision:
* the worktree selector (`ok:worktree:dispatch`) and the terminal-controls PR
* (`ok:terminal:cli-installed-map`) each landed in the base tree's single free
* slot concurrently. The 75→76 bump then unioned in the desktop
@@ -69,6 +69,11 @@
* window's Chromium timers to its unsynced work — it could not fold onto the
* sibling `ok:editor:*` snapshots (different cadence, and a fold would rebuild
* the app menu on every keystroke-to-sync edge). The 90→91 bump added the
+ * Slides (Slidev) surface (`ok:slides:dispatch`, a discriminated fold per the
+ * `ok:sharing:dispatch` precedent — `status` and `open` share the one channel;
+ * further verbs widen the payload rather than adding a channel). Full
+ * rationale in the ratchet test header.
+ *
* interface-language push (`ok:locale:set-preference`), which rebuilds the
* native menu bar when the user changes language — it could not fold onto
* `ok:theme:set-source` despite the near-identical contract, because the two
@@ -156,6 +161,38 @@ export type { OkSharingSetModeResult, OkSharingStatusResult };
* recover the per-operation typing despite the consolidated wire channel. */
export type OkSharingResult = OkSharingStatusResult | OkSharingSetModeResult;
+/** Slides (Slidev) — IPC payload types.
+ *
+ * `status` is detect-only: a project's own `node_modules/.bin/slidev` wins over
+ * a globally-installed one (npm-exec semantics let a deck pin its Slidev), and
+ * an unresolved binary reports `available: false` rather than erroring. The
+ * resolved filesystem path is deliberately absent from the wire result — the
+ * renderer only needs whether, and from where, `slidev` resolved, and a raw
+ * path would be an unbounded-cardinality leak across the boundary. */
+export type SlidevSource = 'project-local' | 'global';
+
+export type OkSlidesStatusResult =
+ | { readonly kind: 'status'; readonly available: true; readonly source: SlidevSource }
+ | { readonly kind: 'status'; readonly available: false };
+
+/** Why opening a deck as slides did not yield a live, drivable server.
+ * `not-available` — no runnable `slidev` resolved; `invalid-path` — the deck
+ * path was missing, not absolute, or outside the window's project; the rest are
+ * the start/readiness failure modes (spawn failed, the server died before
+ * serving, readiness timed out, or a 200 lacked the `slidev:version` meta tag).
+ * Bounded literal union — no path or free-form string crosses the boundary. */
+export type SlidevOpenFailureReason =
+ | 'not-available'
+ | 'invalid-path'
+ | 'spawn-error'
+ | 'exited-early'
+ | 'timeout'
+ | 'unsupported-server';
+
+export type OkSlidesOpenResult =
+ | { readonly kind: 'open'; readonly ok: true }
+ | { readonly kind: 'open'; readonly ok: false; readonly reason: SlidevOpenFailureReason };
+
/** Recent-project row as surfaced to the Navigator. */
export interface RecentProject {
path: string;
@@ -785,6 +822,28 @@ export interface RequestChannels {
];
result: OkSharingResult;
};
+ /**
+ * Slides (Slidev) — one discriminated channel (the `ok:sharing:dispatch`
+ * precedent) so the whole slides surface costs a single hand-rolled slot;
+ * later slides operations widen this payload instead of adding channels.
+ * Project scope flows from the sender window's context (main resolves
+ * webContents → ProjectContext), so the renderer cannot target a project its
+ * window does not own; a window with no project still resolves a global
+ * `slidev`.
+ * - `{ kind: 'status' }` → whether a runnable `slidev` resolved for the
+ * window's project and from where (project-local vs global). No download
+ * is ever performed; an unresolved binary yields `available: false`.
+ * Never throws — the status read is total.
+ * - `{ kind: 'open', docPath }` → start a `slidev` server for the deck at
+ * `docPath` (validated absolute + within the window's project) on a free
+ * port and confirm it serves a real Slidev deck before reporting success.
+ * Failure modes are discriminated in `SlidevOpenFailureReason`; a failed
+ * or timed-out start leaves no process running.
+ */
+ 'ok:slides:dispatch': {
+ args: [request: { kind: 'status' } | { kind: 'open'; docPath: string }];
+ result: OkSlidesStatusResult | OkSlidesOpenResult;
+ };
/**
* In-app "Report a bug" — one consolidated discriminated channel (the
* `ok:sharing:dispatch` precedent) so the whole report surface costs a
diff --git a/packages/desktop/tests/integration/ipc-channel-count-ratchet.test.ts b/packages/desktop/tests/integration/ipc-channel-count-ratchet.test.ts
index 3b20b2299..0019a74ec 100644
--- a/packages/desktop/tests/integration/ipc-channel-count-ratchet.test.ts
+++ b/packages/desktop/tests/integration/ipc-channel-count-ratchet.test.ts
@@ -385,6 +385,17 @@ const CHANNELS_SRC = readFileSync(SRC_PATH, 'utf-8');
* unsynced-work transition — a fold would rebuild the menu on every
* keystroke-to-sync edge.
*
+ * Bumped from 90 to 92 (this and the interface-language push below) for the Slides (Slidev) presentation surface
+ * (`ok:slides:dispatch`): one discriminated channel following the
+ * `ok:sharing:dispatch` precedent — `status` detects whether a runnable
+ * `slidev` resolves for the sender window's project, and `open` spawns the
+ * deck; both share this one channel, and further verbs widen the payload
+ * rather than adding a channel. Could not fold into an existing
+ * channel: no channel carries a slidev/deck concept, and while it is
+ * project-scoped like `ok:sharing:dispatch`, its result shape (`available` /
+ * `source`) is unrelated to git-exclude posture — a fold would wear one channel
+ * over two unrelated concerns.
+ *
* Bumped from 90 to 91 for the interface-language push
* (`ok:locale:set-preference`): the renderer forwards the user's unresolved
* language preference so main re-resolves it and rebuilds the native menu bar
@@ -403,7 +414,7 @@ const CHANNELS_SRC = readFileSync(SRC_PATH, 'utf-8');
* The typed-ipc migration remains the committed end state, with the
* `ipc-channels.ts` header updated in lock-step.
*/
-const REQUEST_CHANNEL_CAP = 91;
+const REQUEST_CHANNEL_CAP = 92;
/**
* Extract the body of an interface block by name. Returns the substring