@open-slide/core 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-8lRsgsO4.js → build-D7GwYl8d.js} +1 -1
- package/dist/cli/bin.js +4 -4
- package/dist/{config-CDrYgaEj.d.ts → config-CfhtJxQH.d.ts} +1 -1
- package/dist/{config-D2Mq1vSW.js → config-D4uPk_tM.js} +383 -138
- package/dist/{dev-BvefEp1Q.js → dev-DyCDMbHB.js} +10 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -1
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/{preview-D8ognobz.js → preview-DjIFvt0K.js} +1 -1
- package/dist/{types-DFK02XVv.d.ts → types-ZfArJF0d.d.ts} +21 -13
- package/dist/{update-BivdNgL3.js → update-BKhRM7o4.js} +30 -3
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/dist/{zh-tw-B1pkKQsc.js → zh-tw-D7LfGVmA.js} +220 -65
- package/package.json +5 -6
- package/src/agent/provider.ts +8 -1
- package/src/agent/types.ts +17 -2
- package/src/app/app.tsx +2 -0
- package/src/app/components/agent/agent-markdown.tsx +3 -6
- package/src/app/components/agent/agent-panel.tsx +36 -258
- package/src/app/components/agent/agent-presence.tsx +1 -1
- package/src/app/components/agent/composer.tsx +52 -24
- package/src/app/components/agent/effort-slider.tsx +172 -0
- package/src/app/components/agent/model-menu.tsx +170 -0
- package/src/app/components/agent/permission-menu.tsx +88 -0
- package/src/app/components/agent/transcript.tsx +23 -31
- package/src/app/components/command/home-command-menu.tsx +4 -1
- package/src/app/components/command/slide-command-menu.tsx +4 -1
- package/src/app/components/export-progress-toast.tsx +3 -1
- package/src/app/components/inspector/asset-picker-dialog.tsx +1 -1
- package/src/app/components/inspector/comment-layer.tsx +3 -3
- package/src/app/components/inspector/inline-text-editor.tsx +1 -12
- package/src/app/components/inspector/inspect-overlay.tsx +9 -1
- package/src/app/components/inspector/inspector-panel.tsx +8 -35
- package/src/app/components/inspector/inspector-provider.tsx +177 -36
- package/src/app/components/inspector/page-panel.tsx +270 -0
- package/src/app/components/language-toggle.tsx +13 -11
- package/src/app/components/note-markdown.test.tsx +12 -6
- package/src/app/components/note-markdown.tsx +16 -21
- package/src/app/components/overview-grid.tsx +3 -3
- package/src/app/components/panel/editor-sidebar.tsx +43 -8
- package/src/app/components/panel/panel-shell.tsx +9 -5
- package/src/app/components/panel/save-card.tsx +1 -1
- package/src/app/components/player.tsx +105 -23
- package/src/app/components/present/curtain.tsx +52 -0
- package/src/app/components/present/last-slide-hint.tsx +36 -0
- package/src/app/components/sidebar/folder-item.tsx +4 -1
- package/src/app/components/sidebar/sidebar.tsx +11 -8
- package/src/app/components/slide-canvas.tsx +1 -1
- package/src/app/components/style-panel/design-provider.tsx +48 -11
- package/src/app/components/style-panel/use-design.ts +6 -1
- package/src/app/components/theme-toggle.tsx +16 -22
- package/src/app/components/thumbnail-rail.tsx +69 -50
- package/src/app/components/ui/context-menu.tsx +9 -10
- package/src/app/components/ui/dialog.tsx +2 -4
- package/src/app/components/ui/dropdown-menu.tsx +9 -10
- package/src/app/components/ui/popover.tsx +1 -1
- package/src/app/components/ui/select.tsx +2 -2
- package/src/app/components/ui/sonner.tsx +2 -2
- package/src/app/index.html +7 -0
- package/src/app/lib/agent/use-agent.ts +131 -37
- package/src/app/lib/desktop-host.ts +31 -0
- package/src/app/lib/desktop-routes.test.ts +54 -0
- package/src/app/lib/desktop-routes.ts +22 -0
- package/src/app/lib/desktop.ts +106 -0
- package/src/app/lib/export-pdf.ts +15 -7
- package/src/app/lib/inspector/color.ts +51 -0
- package/src/app/lib/inspector/fiber.ts +6 -0
- package/src/app/lib/inspector/use-editor.ts +2 -1
- package/src/app/lib/inspector/use-notes.test.ts +209 -0
- package/src/app/lib/inspector/use-notes.ts +331 -57
- package/src/app/lib/inspector/use-visual-editor.ts +9 -1
- package/src/app/lib/locale-store.ts +14 -2
- package/src/app/lib/note-markdown.test.ts +69 -5
- package/src/app/lib/note-markdown.ts +97 -22
- package/src/app/lib/transition.test.ts +84 -1
- package/src/app/lib/transition.ts +43 -0
- package/src/app/lib/unsaved.test.ts +253 -0
- package/src/app/lib/unsaved.ts +155 -0
- package/src/app/routes/home.tsx +14 -6
- package/src/app/routes/slide.tsx +184 -130
- package/src/app/styles.css +421 -1
- package/src/locale/en.ts +41 -15
- package/src/locale/es.ts +41 -17
- package/src/locale/ja.ts +41 -15
- package/src/locale/types.ts +20 -14
- package/src/locale/zh-cn.ts +41 -14
- package/src/locale/zh-tw.ts +41 -14
|
@@ -94,10 +94,6 @@ const en = {
|
|
|
94
94
|
resizeSidePanel: "Resize side panel",
|
|
95
95
|
home: "Home",
|
|
96
96
|
backToHome: "Back to home",
|
|
97
|
-
agentConnected: "Agent connected",
|
|
98
|
-
agentConnectedTooltip: "The current slide and inspector selection are synced to your agent in real time.",
|
|
99
|
-
agentDisconnected: "Agent disconnected",
|
|
100
|
-
agentDisconnectedTooltip: "Lost connection to the dev server, so your agent can no longer see the current slide or inspector selection. Restart the dev server to restore the connection.",
|
|
101
97
|
download: "Download",
|
|
102
98
|
copyLink: "Copy link",
|
|
103
99
|
moreActions: "More actions",
|
|
@@ -168,6 +164,7 @@ const en = {
|
|
|
168
164
|
helpAria: "Keyboard shortcuts (?)",
|
|
169
165
|
exitAria: "Exit (Esc)",
|
|
170
166
|
elapsedTime: "Elapsed time",
|
|
167
|
+
lastSlideHint: "Last slide · Press Esc to exit",
|
|
171
168
|
helpEyebrow: "Present mode",
|
|
172
169
|
helpTitle: "Keyboard shortcuts",
|
|
173
170
|
shortcutNext: "Next slide",
|
|
@@ -192,7 +189,6 @@ const en = {
|
|
|
192
189
|
previewMode: "Preview",
|
|
193
190
|
closeFormatPanel: "Close Format panel",
|
|
194
191
|
editText: "Edit on slide",
|
|
195
|
-
emptySelectionTitle: "Select an object",
|
|
196
192
|
emptySelectionHint: "Click an object to format it. Double-click text to edit.",
|
|
197
193
|
textSelectionHint: "Formatting applies to the selected text.",
|
|
198
194
|
elementText: "Text",
|
|
@@ -202,6 +198,27 @@ const en = {
|
|
|
202
198
|
rotateHandle: "Rotate element",
|
|
203
199
|
resizeHandle: "Resize {handle}",
|
|
204
200
|
arrangeSection: "Arrange",
|
|
201
|
+
pageLabel: "Page {page} of {total}",
|
|
202
|
+
pageBackground: "Background",
|
|
203
|
+
pageBackgroundTheme: "From theme",
|
|
204
|
+
pageBackgroundShared: "Shared across pages",
|
|
205
|
+
pageBackgroundComplex: "Gradient or image",
|
|
206
|
+
pageTransition: "Transition",
|
|
207
|
+
pageTransitionInherited: "Deck default",
|
|
208
|
+
pageSteps: "Steps",
|
|
209
|
+
pageStepsCount: {
|
|
210
|
+
one: "1 step",
|
|
211
|
+
other: "{count} steps"
|
|
212
|
+
},
|
|
213
|
+
pageNone: "None",
|
|
214
|
+
transitionKinds: {
|
|
215
|
+
fade: "Fade",
|
|
216
|
+
slide: "Slide",
|
|
217
|
+
zoom: "Zoom",
|
|
218
|
+
wipe: "Wipe",
|
|
219
|
+
morph: "Morph",
|
|
220
|
+
custom: "Custom"
|
|
221
|
+
},
|
|
205
222
|
selectionCount: "{count} elements selected",
|
|
206
223
|
positionLabel: "Position",
|
|
207
224
|
positionX: "Horizontal position",
|
|
@@ -442,6 +459,7 @@ const en = {
|
|
|
442
459
|
title: "Exporting PDF",
|
|
443
460
|
processing: "Processing page {current} of {total}",
|
|
444
461
|
printing: "Opening print dialog…",
|
|
462
|
+
saving: "Saving PDF…",
|
|
445
463
|
done: "Done"
|
|
446
464
|
},
|
|
447
465
|
pptxToast: {
|
|
@@ -520,9 +538,6 @@ const en = {
|
|
|
520
538
|
},
|
|
521
539
|
agent: {
|
|
522
540
|
title: "Agent",
|
|
523
|
-
beta: "Beta",
|
|
524
|
-
betaTitle: "Early preview",
|
|
525
|
-
betaHint: "Replies, edits and tool calls can occasionally fail or do something unexpected.",
|
|
526
541
|
open: "Agent",
|
|
527
542
|
openTitle: "Open the agent panel",
|
|
528
543
|
close: "Close agent panel",
|
|
@@ -567,11 +582,25 @@ const en = {
|
|
|
567
582
|
deny: "Deny",
|
|
568
583
|
allowed: "Allowed",
|
|
569
584
|
denied: "Denied",
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
585
|
+
permissionMode: "Permissions",
|
|
586
|
+
permissionModes: {
|
|
587
|
+
supervised: "Supervised",
|
|
588
|
+
acceptEdits: "Auto-accept edits",
|
|
589
|
+
auto: "Auto",
|
|
590
|
+
fullAccess: "Full access"
|
|
591
|
+
},
|
|
592
|
+
permissionHints: {
|
|
593
|
+
supervised: "Asks before commands and file changes.",
|
|
594
|
+
acceptEdits: "Edits files freely; asks before other actions.",
|
|
595
|
+
auto: "Approves routine actions; asks about the rest.",
|
|
596
|
+
fullAccess: "Runs commands and edits without asking."
|
|
597
|
+
},
|
|
598
|
+
permissionHintsCodex: {
|
|
599
|
+
supervised: "Codex can't ask mid-turn, so it only reads and suggests changes.",
|
|
600
|
+
acceptEdits: "Edits and runs commands inside the workspace sandbox.",
|
|
601
|
+
auto: "Edits and runs commands inside the workspace sandbox.",
|
|
602
|
+
fullAccess: "Runs commands and edits with no sandbox."
|
|
603
|
+
},
|
|
575
604
|
errorEyebrow: "Error",
|
|
576
605
|
statusLoading: "Checking agents",
|
|
577
606
|
disabled: "The agent panel is disabled in open-slide.config.ts.",
|
|
@@ -612,6 +641,8 @@ const en = {
|
|
|
612
641
|
modelDefault: "Default",
|
|
613
642
|
reasoning: "Reasoning",
|
|
614
643
|
effortAuto: "Auto",
|
|
644
|
+
effortFaster: "Faster",
|
|
645
|
+
effortSmarter: "Smarter",
|
|
615
646
|
efforts: {
|
|
616
647
|
minimal: "Minimal",
|
|
617
648
|
low: "Low",
|
|
@@ -722,10 +753,6 @@ const es = {
|
|
|
722
753
|
resizeSidePanel: "Redimensionar panel lateral",
|
|
723
754
|
home: "Inicio",
|
|
724
755
|
backToHome: "Volver al inicio",
|
|
725
|
-
agentConnected: "Agente conectado",
|
|
726
|
-
agentConnectedTooltip: "La diapositiva actual y la selección del inspector se sincronizan con tu agente en tiempo real.",
|
|
727
|
-
agentDisconnected: "Agente desconectado",
|
|
728
|
-
agentDisconnectedTooltip: "Se perdió la conexión con el servidor de desarrollo, así que tu agente ya no ve la diapositiva actual ni la selección del inspector. Reinicia el servidor de desarrollo para restablecerla.",
|
|
729
756
|
download: "Descargar",
|
|
730
757
|
copyLink: "Copiar enlace",
|
|
731
758
|
moreActions: "Más acciones",
|
|
@@ -796,6 +823,7 @@ const es = {
|
|
|
796
823
|
helpAria: "Atajos de teclado (?)",
|
|
797
824
|
exitAria: "Salir (Esc)",
|
|
798
825
|
elapsedTime: "Tiempo transcurrido",
|
|
826
|
+
lastSlideHint: "Última diapositiva · Pulsa Esc para salir",
|
|
799
827
|
helpEyebrow: "Modo presentación",
|
|
800
828
|
helpTitle: "Atajos de teclado",
|
|
801
829
|
shortcutNext: "Diapositiva siguiente",
|
|
@@ -820,7 +848,6 @@ const es = {
|
|
|
820
848
|
previewMode: "Vista previa",
|
|
821
849
|
closeFormatPanel: "Cerrar panel de formato",
|
|
822
850
|
editText: "Editar en la diapositiva",
|
|
823
|
-
emptySelectionTitle: "Selecciona un objeto",
|
|
824
851
|
emptySelectionHint: "Haz clic en un objeto para darle formato. Doble clic en un texto para editarlo.",
|
|
825
852
|
textSelectionHint: "El formato se aplica al texto seleccionado.",
|
|
826
853
|
elementText: "Texto",
|
|
@@ -830,6 +857,27 @@ const es = {
|
|
|
830
857
|
rotateHandle: "Rotar elemento",
|
|
831
858
|
resizeHandle: "Redimensionar {handle}",
|
|
832
859
|
arrangeSection: "Organizar",
|
|
860
|
+
pageLabel: "Página {page} de {total}",
|
|
861
|
+
pageBackground: "Fondo",
|
|
862
|
+
pageBackgroundTheme: "Del tema",
|
|
863
|
+
pageBackgroundShared: "Compartido entre páginas",
|
|
864
|
+
pageBackgroundComplex: "Degradado o imagen",
|
|
865
|
+
pageTransition: "Transición",
|
|
866
|
+
pageTransitionInherited: "Predeterminada de la presentación",
|
|
867
|
+
pageSteps: "Pasos",
|
|
868
|
+
pageStepsCount: {
|
|
869
|
+
one: "1 paso",
|
|
870
|
+
other: "{count} pasos"
|
|
871
|
+
},
|
|
872
|
+
pageNone: "Ninguna",
|
|
873
|
+
transitionKinds: {
|
|
874
|
+
fade: "Fundido",
|
|
875
|
+
slide: "Desplazar",
|
|
876
|
+
zoom: "Zoom",
|
|
877
|
+
wipe: "Barrido",
|
|
878
|
+
morph: "Morph",
|
|
879
|
+
custom: "Personalizada"
|
|
880
|
+
},
|
|
833
881
|
selectionCount: "{count} elementos seleccionados",
|
|
834
882
|
positionLabel: "Posición",
|
|
835
883
|
positionX: "Posición horizontal",
|
|
@@ -1070,6 +1118,7 @@ const es = {
|
|
|
1070
1118
|
title: "Exportando PDF",
|
|
1071
1119
|
processing: "Procesando página {current} de {total}",
|
|
1072
1120
|
printing: "Abriendo diálogo de impresión…",
|
|
1121
|
+
saving: "Guardando PDF…",
|
|
1073
1122
|
done: "Hecho"
|
|
1074
1123
|
},
|
|
1075
1124
|
pptxToast: {
|
|
@@ -1148,9 +1197,6 @@ const es = {
|
|
|
1148
1197
|
},
|
|
1149
1198
|
agent: {
|
|
1150
1199
|
title: "Agente",
|
|
1151
|
-
beta: "Beta",
|
|
1152
|
-
betaTitle: "Versión preliminar",
|
|
1153
|
-
betaHint: "Las respuestas, ediciones y acciones pueden fallar o hacer algo inesperado de vez en cuando.",
|
|
1154
1200
|
open: "Agente",
|
|
1155
1201
|
openTitle: "Abrir el panel del agente",
|
|
1156
1202
|
close: "Cerrar el panel del agente",
|
|
@@ -1195,11 +1241,25 @@ const es = {
|
|
|
1195
1241
|
deny: "Denegar",
|
|
1196
1242
|
allowed: "Permitido",
|
|
1197
1243
|
denied: "Denegado",
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1244
|
+
permissionMode: "Permisos",
|
|
1245
|
+
permissionModes: {
|
|
1246
|
+
supervised: "Supervisado",
|
|
1247
|
+
acceptEdits: "Aceptar ediciones",
|
|
1248
|
+
auto: "Automático",
|
|
1249
|
+
fullAccess: "Acceso total"
|
|
1250
|
+
},
|
|
1251
|
+
permissionHints: {
|
|
1252
|
+
supervised: "Pregunta antes de ejecutar comandos y cambiar archivos.",
|
|
1253
|
+
acceptEdits: "Aprueba las ediciones automáticamente; otras acciones pueden preguntar.",
|
|
1254
|
+
auto: "Una revisión automática aprueba las acciones habituales y pregunta por el resto.",
|
|
1255
|
+
fullAccess: "Ejecuta comandos y ediciones sin preguntar."
|
|
1256
|
+
},
|
|
1257
|
+
permissionHintsCodex: {
|
|
1258
|
+
supervised: "Codex no puede preguntar durante un turno, así que solo lee y sugiere cambios.",
|
|
1259
|
+
acceptEdits: "Edita y ejecuta comandos dentro del sandbox del espacio de trabajo.",
|
|
1260
|
+
auto: "Edita y ejecuta comandos dentro del sandbox del espacio de trabajo.",
|
|
1261
|
+
fullAccess: "Ejecuta comandos y ediciones sin sandbox."
|
|
1262
|
+
},
|
|
1203
1263
|
errorEyebrow: "Error",
|
|
1204
1264
|
statusLoading: "Comprobando agentes",
|
|
1205
1265
|
disabled: "El panel del agente está desactivado en open-slide.config.ts.",
|
|
@@ -1240,6 +1300,8 @@ const es = {
|
|
|
1240
1300
|
modelDefault: "Predeterminado",
|
|
1241
1301
|
reasoning: "Razonamiento",
|
|
1242
1302
|
effortAuto: "Auto",
|
|
1303
|
+
effortFaster: "Más rápido",
|
|
1304
|
+
effortSmarter: "Más listo",
|
|
1243
1305
|
efforts: {
|
|
1244
1306
|
minimal: "Mínimo",
|
|
1245
1307
|
low: "Bajo",
|
|
@@ -1348,10 +1410,6 @@ const ja = {
|
|
|
1348
1410
|
},
|
|
1349
1411
|
slide: {
|
|
1350
1412
|
resizeSidePanel: "サイドパネルの幅を調整",
|
|
1351
|
-
agentConnected: "エージェント接続中",
|
|
1352
|
-
agentConnectedTooltip: "現在のスライドと Inspector の選択はエージェントにリアルタイムで同期されています。",
|
|
1353
|
-
agentDisconnected: "エージェント切断",
|
|
1354
|
-
agentDisconnectedTooltip: "dev server との接続が切れたため、現在のスライドや Inspector の選択がエージェントに届かなくなっています。dev server を再起動して接続を復旧してください。",
|
|
1355
1413
|
home: "ホーム",
|
|
1356
1414
|
backToHome: "ホームへ戻る",
|
|
1357
1415
|
download: "ダウンロード",
|
|
@@ -1424,6 +1482,7 @@ const ja = {
|
|
|
1424
1482
|
helpAria: "キーボードショートカット (?)",
|
|
1425
1483
|
exitAria: "終了 (Esc)",
|
|
1426
1484
|
elapsedTime: "経過時間",
|
|
1485
|
+
lastSlideHint: "最後のスライドです · Esc で終了",
|
|
1427
1486
|
helpEyebrow: "発表モード",
|
|
1428
1487
|
helpTitle: "キーボードショートカット",
|
|
1429
1488
|
shortcutNext: "次のスライド",
|
|
@@ -1448,7 +1507,6 @@ const ja = {
|
|
|
1448
1507
|
previewMode: "プレビュー",
|
|
1449
1508
|
closeFormatPanel: "フォーマットパネルを閉じる",
|
|
1450
1509
|
editText: "スライドで編集",
|
|
1451
|
-
emptySelectionTitle: "オブジェクトを選択",
|
|
1452
1510
|
emptySelectionHint: "オブジェクトをクリックして書式を設定します。テキストをダブルクリックして編集します。",
|
|
1453
1511
|
textSelectionHint: "選択したテキストに書式を適用します。",
|
|
1454
1512
|
elementText: "テキスト",
|
|
@@ -1458,6 +1516,27 @@ const ja = {
|
|
|
1458
1516
|
rotateHandle: "要素を回転",
|
|
1459
1517
|
resizeHandle: "サイズ変更({handle})",
|
|
1460
1518
|
arrangeSection: "配置",
|
|
1519
|
+
pageLabel: "{page} / {total} ページ",
|
|
1520
|
+
pageBackground: "背景",
|
|
1521
|
+
pageBackgroundTheme: "テーマに従う",
|
|
1522
|
+
pageBackgroundShared: "複数ページで共有",
|
|
1523
|
+
pageBackgroundComplex: "グラデーションまたは画像",
|
|
1524
|
+
pageTransition: "トランジション",
|
|
1525
|
+
pageTransitionInherited: "デッキの既定",
|
|
1526
|
+
pageSteps: "ステップ",
|
|
1527
|
+
pageStepsCount: {
|
|
1528
|
+
one: "1 ステップ",
|
|
1529
|
+
other: "{count} ステップ"
|
|
1530
|
+
},
|
|
1531
|
+
pageNone: "なし",
|
|
1532
|
+
transitionKinds: {
|
|
1533
|
+
fade: "フェード",
|
|
1534
|
+
slide: "スライド",
|
|
1535
|
+
zoom: "ズーム",
|
|
1536
|
+
wipe: "ワイプ",
|
|
1537
|
+
morph: "モーフ",
|
|
1538
|
+
custom: "カスタム"
|
|
1539
|
+
},
|
|
1461
1540
|
selectionCount: "{count} 個の要素を選択中",
|
|
1462
1541
|
positionLabel: "位置",
|
|
1463
1542
|
positionX: "水平位置",
|
|
@@ -1698,6 +1777,7 @@ const ja = {
|
|
|
1698
1777
|
title: "PDF を書き出し中",
|
|
1699
1778
|
processing: "ページ {current} / {total} を処理中",
|
|
1700
1779
|
printing: "印刷ダイアログを開いています…",
|
|
1780
|
+
saving: "PDF を保存しています…",
|
|
1701
1781
|
done: "完了"
|
|
1702
1782
|
},
|
|
1703
1783
|
pptxToast: {
|
|
@@ -1776,9 +1856,6 @@ const ja = {
|
|
|
1776
1856
|
},
|
|
1777
1857
|
agent: {
|
|
1778
1858
|
title: "エージェント",
|
|
1779
|
-
beta: "Beta",
|
|
1780
|
-
betaTitle: "プレビュー版",
|
|
1781
|
-
betaHint: "返答・編集・ツール実行が失敗したり、思わぬ動作をしたりすることがあります。",
|
|
1782
1859
|
open: "エージェント",
|
|
1783
1860
|
openTitle: "エージェントパネルを開く",
|
|
1784
1861
|
close: "エージェントパネルを閉じる",
|
|
@@ -1823,11 +1900,25 @@ const ja = {
|
|
|
1823
1900
|
deny: "拒否",
|
|
1824
1901
|
allowed: "許可済み",
|
|
1825
1902
|
denied: "拒否済み",
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1903
|
+
permissionMode: "権限",
|
|
1904
|
+
permissionModes: {
|
|
1905
|
+
supervised: "監督",
|
|
1906
|
+
acceptEdits: "編集を自動承認",
|
|
1907
|
+
auto: "自動",
|
|
1908
|
+
fullAccess: "フルアクセス"
|
|
1909
|
+
},
|
|
1910
|
+
permissionHints: {
|
|
1911
|
+
supervised: "コマンドの実行やファイルの変更の前に確認します。",
|
|
1912
|
+
acceptEdits: "ファイル編集は自動で承認し、その他の操作は確認することがあります。",
|
|
1913
|
+
auto: "自動レビューが通常の操作を承認し、それ以外は確認します。",
|
|
1914
|
+
fullAccess: "確認なしでコマンドと編集を実行します。"
|
|
1915
|
+
},
|
|
1916
|
+
permissionHintsCodex: {
|
|
1917
|
+
supervised: "Codex は実行中に確認できないため、読み取りと変更の提案のみ行います。",
|
|
1918
|
+
acceptEdits: "ワークスペースのサンドボックス内で編集とコマンドを実行します。",
|
|
1919
|
+
auto: "ワークスペースのサンドボックス内で編集とコマンドを実行します。",
|
|
1920
|
+
fullAccess: "サンドボックスなしでコマンドと編集を実行します。"
|
|
1921
|
+
},
|
|
1831
1922
|
errorEyebrow: "エラー",
|
|
1832
1923
|
statusLoading: "エージェントを確認中",
|
|
1833
1924
|
disabled: "エージェントパネルは open-slide.config.ts で無効化されています。",
|
|
@@ -1868,6 +1959,8 @@ const ja = {
|
|
|
1868
1959
|
modelDefault: "デフォルト",
|
|
1869
1960
|
reasoning: "推論",
|
|
1870
1961
|
effortAuto: "自動",
|
|
1962
|
+
effortFaster: "速さ重視",
|
|
1963
|
+
effortSmarter: "賢さ重視",
|
|
1871
1964
|
efforts: {
|
|
1872
1965
|
minimal: "最小",
|
|
1873
1966
|
low: "低",
|
|
@@ -1976,10 +2069,6 @@ const zhCN = {
|
|
|
1976
2069
|
},
|
|
1977
2070
|
slide: {
|
|
1978
2071
|
resizeSidePanel: "调整侧栏宽度",
|
|
1979
|
-
agentConnected: "Agent 已连接",
|
|
1980
|
-
agentConnectedTooltip: "目前的 slide 与 Inspector 选择会即时同步给 agent。",
|
|
1981
|
-
agentDisconnected: "Agent 已断开",
|
|
1982
|
-
agentDisconnectedTooltip: "已和 dev server 断开连接,agent 没办法再看到你目前的 slide 或 Inspector 选择。请重新启动 dev server 来恢复连接。",
|
|
1983
2072
|
home: "首页",
|
|
1984
2073
|
backToHome: "返回首页",
|
|
1985
2074
|
download: "下载",
|
|
@@ -2052,6 +2141,7 @@ const zhCN = {
|
|
|
2052
2141
|
helpAria: "键盘快捷键 (?)",
|
|
2053
2142
|
exitAria: "退出 (Esc)",
|
|
2054
2143
|
elapsedTime: "已用时",
|
|
2144
|
+
lastSlideHint: "已是最后一页 · 按 Esc 退出放映",
|
|
2055
2145
|
helpEyebrow: "演示模式",
|
|
2056
2146
|
helpTitle: "键盘快捷键",
|
|
2057
2147
|
shortcutNext: "下一张",
|
|
@@ -2076,7 +2166,6 @@ const zhCN = {
|
|
|
2076
2166
|
previewMode: "预览",
|
|
2077
2167
|
closeFormatPanel: "关闭格式面板",
|
|
2078
2168
|
editText: "在幻灯片上编辑",
|
|
2079
|
-
emptySelectionTitle: "选择一个对象",
|
|
2080
2169
|
emptySelectionHint: "单击对象即可调整格式。双击文字即可编辑。",
|
|
2081
2170
|
textSelectionHint: "格式将应用于选中的文字。",
|
|
2082
2171
|
elementText: "文字",
|
|
@@ -2086,6 +2175,27 @@ const zhCN = {
|
|
|
2086
2175
|
rotateHandle: "旋转元素",
|
|
2087
2176
|
resizeHandle: "调整尺寸({handle})",
|
|
2088
2177
|
arrangeSection: "排列",
|
|
2178
|
+
pageLabel: "第 {page} 页,共 {total} 页",
|
|
2179
|
+
pageBackground: "背景",
|
|
2180
|
+
pageBackgroundTheme: "跟随主题",
|
|
2181
|
+
pageBackgroundShared: "多页共用",
|
|
2182
|
+
pageBackgroundComplex: "渐变或图片",
|
|
2183
|
+
pageTransition: "转场",
|
|
2184
|
+
pageTransitionInherited: "沿用演示默认",
|
|
2185
|
+
pageSteps: "逐步动画",
|
|
2186
|
+
pageStepsCount: {
|
|
2187
|
+
one: "1 步",
|
|
2188
|
+
other: "{count} 步"
|
|
2189
|
+
},
|
|
2190
|
+
pageNone: "无",
|
|
2191
|
+
transitionKinds: {
|
|
2192
|
+
fade: "淡入淡出",
|
|
2193
|
+
slide: "推移",
|
|
2194
|
+
zoom: "缩放",
|
|
2195
|
+
wipe: "擦除",
|
|
2196
|
+
morph: "Morph",
|
|
2197
|
+
custom: "自定义"
|
|
2198
|
+
},
|
|
2089
2199
|
selectionCount: "已选择 {count} 个元素",
|
|
2090
2200
|
positionLabel: "位置",
|
|
2091
2201
|
positionX: "水平位置",
|
|
@@ -2326,6 +2436,7 @@ const zhCN = {
|
|
|
2326
2436
|
title: "导出 PDF",
|
|
2327
2437
|
processing: "正在处理第 {current} / {total} 页",
|
|
2328
2438
|
printing: "正在打开打印对话框…",
|
|
2439
|
+
saving: "正在保存 PDF…",
|
|
2329
2440
|
done: "完成"
|
|
2330
2441
|
},
|
|
2331
2442
|
pptxToast: {
|
|
@@ -2404,9 +2515,6 @@ const zhCN = {
|
|
|
2404
2515
|
},
|
|
2405
2516
|
agent: {
|
|
2406
2517
|
title: "Agent",
|
|
2407
|
-
beta: "Beta",
|
|
2408
|
-
betaTitle: "抢先体验版",
|
|
2409
|
-
betaHint: "回复、编辑或工具调用偶尔可能失败,或出现预期之外的结果。",
|
|
2410
2518
|
open: "Agent",
|
|
2411
2519
|
openTitle: "打开 agent 面板",
|
|
2412
2520
|
close: "关闭 agent 面板",
|
|
@@ -2451,11 +2559,25 @@ const zhCN = {
|
|
|
2451
2559
|
deny: "拒绝",
|
|
2452
2560
|
allowed: "已允许",
|
|
2453
2561
|
denied: "已拒绝",
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2562
|
+
permissionMode: "权限",
|
|
2563
|
+
permissionModes: {
|
|
2564
|
+
supervised: "监督",
|
|
2565
|
+
acceptEdits: "自动接受编辑",
|
|
2566
|
+
auto: "自动",
|
|
2567
|
+
fullAccess: "完全访问"
|
|
2568
|
+
},
|
|
2569
|
+
permissionHints: {
|
|
2570
|
+
supervised: "执行命令和修改文件前都会询问。",
|
|
2571
|
+
acceptEdits: "自动批准文件编辑,其他操作仍可能询问。",
|
|
2572
|
+
auto: "自动审查会批准例行操作,其余的再询问你。",
|
|
2573
|
+
fullAccess: "不经询问直接执行命令和编辑。"
|
|
2574
|
+
},
|
|
2575
|
+
permissionHintsCodex: {
|
|
2576
|
+
supervised: "Codex 无法在运行中询问,因此只会读取并提出修改建议。",
|
|
2577
|
+
acceptEdits: "在工作区沙箱内编辑和执行命令。",
|
|
2578
|
+
auto: "在工作区沙箱内编辑和执行命令。",
|
|
2579
|
+
fullAccess: "不受沙箱限制地执行命令和编辑。"
|
|
2580
|
+
},
|
|
2459
2581
|
errorEyebrow: "错误",
|
|
2460
2582
|
statusLoading: "正在检查 agent",
|
|
2461
2583
|
disabled: "agent 面板已在 open-slide.config.ts 中禁用。",
|
|
@@ -2496,6 +2618,8 @@ const zhCN = {
|
|
|
2496
2618
|
modelDefault: "默认",
|
|
2497
2619
|
reasoning: "推理强度",
|
|
2498
2620
|
effortAuto: "自动",
|
|
2621
|
+
effortFaster: "更快",
|
|
2622
|
+
effortSmarter: "更聪明",
|
|
2499
2623
|
efforts: {
|
|
2500
2624
|
minimal: "最低",
|
|
2501
2625
|
low: "低",
|
|
@@ -2604,10 +2728,6 @@ const zhTW = {
|
|
|
2604
2728
|
},
|
|
2605
2729
|
slide: {
|
|
2606
2730
|
resizeSidePanel: "調整側欄寬度",
|
|
2607
|
-
agentConnected: "Agent 已連線",
|
|
2608
|
-
agentConnectedTooltip: "目前的 slide 與 Inspector 選擇會即時同步給 agent。",
|
|
2609
|
-
agentDisconnected: "Agent 已斷線",
|
|
2610
|
-
agentDisconnectedTooltip: "已和 dev server 斷線,agent 沒辦法再看到你目前的 slide 或 Inspector 選擇。請重新啟動 dev server 來恢復連線。",
|
|
2611
2731
|
home: "首頁",
|
|
2612
2732
|
backToHome: "返回首頁",
|
|
2613
2733
|
download: "下載",
|
|
@@ -2680,6 +2800,7 @@ const zhTW = {
|
|
|
2680
2800
|
helpAria: "鍵盤快速鍵 (?)",
|
|
2681
2801
|
exitAria: "離開 (Esc)",
|
|
2682
2802
|
elapsedTime: "已耗時",
|
|
2803
|
+
lastSlideHint: "已是最後一頁 · 按 Esc 結束播放",
|
|
2683
2804
|
helpEyebrow: "簡報模式",
|
|
2684
2805
|
helpTitle: "鍵盤快速鍵",
|
|
2685
2806
|
shortcutNext: "下一張",
|
|
@@ -2704,7 +2825,6 @@ const zhTW = {
|
|
|
2704
2825
|
previewMode: "預覽",
|
|
2705
2826
|
closeFormatPanel: "關閉格式面板",
|
|
2706
2827
|
editText: "在投影片上編輯",
|
|
2707
|
-
emptySelectionTitle: "選取一個物件",
|
|
2708
2828
|
emptySelectionHint: "按一下物件即可調整格式。按兩下文字即可編輯。",
|
|
2709
2829
|
textSelectionHint: "格式將套用至選取的文字。",
|
|
2710
2830
|
elementText: "文字",
|
|
@@ -2714,6 +2834,27 @@ const zhTW = {
|
|
|
2714
2834
|
rotateHandle: "旋轉元素",
|
|
2715
2835
|
resizeHandle: "調整尺寸({handle})",
|
|
2716
2836
|
arrangeSection: "排列",
|
|
2837
|
+
pageLabel: "第 {page} 頁,共 {total} 頁",
|
|
2838
|
+
pageBackground: "背景",
|
|
2839
|
+
pageBackgroundTheme: "跟隨主題",
|
|
2840
|
+
pageBackgroundShared: "多頁共用",
|
|
2841
|
+
pageBackgroundComplex: "漸層或圖片",
|
|
2842
|
+
pageTransition: "轉場",
|
|
2843
|
+
pageTransitionInherited: "沿用簡報預設",
|
|
2844
|
+
pageSteps: "逐步動畫",
|
|
2845
|
+
pageStepsCount: {
|
|
2846
|
+
one: "1 步",
|
|
2847
|
+
other: "{count} 步"
|
|
2848
|
+
},
|
|
2849
|
+
pageNone: "無",
|
|
2850
|
+
transitionKinds: {
|
|
2851
|
+
fade: "淡入淡出",
|
|
2852
|
+
slide: "推移",
|
|
2853
|
+
zoom: "縮放",
|
|
2854
|
+
wipe: "擦除",
|
|
2855
|
+
morph: "Morph",
|
|
2856
|
+
custom: "自訂"
|
|
2857
|
+
},
|
|
2717
2858
|
selectionCount: "已選取 {count} 個元素",
|
|
2718
2859
|
positionLabel: "位置",
|
|
2719
2860
|
positionX: "水平位置",
|
|
@@ -2954,6 +3095,7 @@ const zhTW = {
|
|
|
2954
3095
|
title: "匯出 PDF",
|
|
2955
3096
|
processing: "處理第 {current} / {total} 頁",
|
|
2956
3097
|
printing: "正在開啟列印對話框…",
|
|
3098
|
+
saving: "正在儲存 PDF…",
|
|
2957
3099
|
done: "完成"
|
|
2958
3100
|
},
|
|
2959
3101
|
pptxToast: {
|
|
@@ -3032,9 +3174,6 @@ const zhTW = {
|
|
|
3032
3174
|
},
|
|
3033
3175
|
agent: {
|
|
3034
3176
|
title: "Agent",
|
|
3035
|
-
beta: "Beta",
|
|
3036
|
-
betaTitle: "搶先體驗版",
|
|
3037
|
-
betaHint: "回覆、編輯或工具呼叫偶爾可能失敗,或出現預期之外的結果。",
|
|
3038
3177
|
open: "Agent",
|
|
3039
3178
|
openTitle: "開啟 agent 面板",
|
|
3040
3179
|
close: "關閉 agent 面板",
|
|
@@ -3079,11 +3218,25 @@ const zhTW = {
|
|
|
3079
3218
|
deny: "拒絕",
|
|
3080
3219
|
allowed: "已允許",
|
|
3081
3220
|
denied: "已拒絕",
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3221
|
+
permissionMode: "權限",
|
|
3222
|
+
permissionModes: {
|
|
3223
|
+
supervised: "監督",
|
|
3224
|
+
acceptEdits: "自動接受編輯",
|
|
3225
|
+
auto: "自動",
|
|
3226
|
+
fullAccess: "完整存取"
|
|
3227
|
+
},
|
|
3228
|
+
permissionHints: {
|
|
3229
|
+
supervised: "執行指令和修改檔案前都會詢問。",
|
|
3230
|
+
acceptEdits: "自動核准檔案編輯,其他動作仍可能詢問。",
|
|
3231
|
+
auto: "自動審查會核准例行動作,其餘的再詢問你。",
|
|
3232
|
+
fullAccess: "不經詢問直接執行指令和編輯。"
|
|
3233
|
+
},
|
|
3234
|
+
permissionHintsCodex: {
|
|
3235
|
+
supervised: "Codex 無法在執行中詢問,因此只會讀取並提出修改建議。",
|
|
3236
|
+
acceptEdits: "在工作區沙盒內編輯和執行指令。",
|
|
3237
|
+
auto: "在工作區沙盒內編輯和執行指令。",
|
|
3238
|
+
fullAccess: "不受沙盒限制地執行指令和編輯。"
|
|
3239
|
+
},
|
|
3087
3240
|
errorEyebrow: "錯誤",
|
|
3088
3241
|
statusLoading: "正在檢查 agent",
|
|
3089
3242
|
disabled: "agent 面板已在 open-slide.config.ts 中停用。",
|
|
@@ -3124,6 +3277,8 @@ const zhTW = {
|
|
|
3124
3277
|
modelDefault: "預設",
|
|
3125
3278
|
reasoning: "推理強度",
|
|
3126
3279
|
effortAuto: "自動",
|
|
3280
|
+
effortFaster: "更快",
|
|
3281
|
+
effortSmarter: "更聰明",
|
|
3127
3282
|
efforts: {
|
|
3128
3283
|
minimal: "最低",
|
|
3129
3284
|
low: "低",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-slide/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Runtime and CLI for open-slide — write slides in slides/, we handle the rest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@babel/parser": "^7.29.2",
|
|
69
69
|
"@babel/types": "^7.29.0",
|
|
70
|
-
"@base-ui/react": "1.
|
|
70
|
+
"@base-ui/react": "1.9.0",
|
|
71
71
|
"@dnd-kit/core": "^6.3.1",
|
|
72
72
|
"@dnd-kit/sortable": "^10.0.0",
|
|
73
73
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"clsx": "^2.1.1",
|
|
80
80
|
"cmdk": "^1.1.1",
|
|
81
81
|
"commander": "^15.0.0",
|
|
82
|
-
"emoji-picker-react": "^
|
|
82
|
+
"emoji-picker-react": "^5.1.4",
|
|
83
83
|
"fast-glob": "^3.3.2",
|
|
84
84
|
"fflate": "^0.8.3",
|
|
85
85
|
"html-to-image": "^1.11.13",
|
|
@@ -89,17 +89,16 @@
|
|
|
89
89
|
"react-dom": "^19.2.8",
|
|
90
90
|
"react-image-crop": "^11.0.10",
|
|
91
91
|
"react-router-dom": "^7.18.4",
|
|
92
|
-
"shadcn": "^4.21.4",
|
|
93
92
|
"sonner": "^2.0.7",
|
|
94
93
|
"tailwind-merge": "^3.5.0",
|
|
95
94
|
"tailwindcss": "^4.3.3",
|
|
96
95
|
"tw-animate-css": "^1.4.0",
|
|
97
96
|
"use-sync-external-store": "^1.7.0",
|
|
98
|
-
"vite": "^8.3.
|
|
97
|
+
"vite": "^8.3.7"
|
|
99
98
|
},
|
|
100
99
|
"devDependencies": {
|
|
101
100
|
"@playwright/test": "~1.63.0",
|
|
102
|
-
"@types/node": "^26.6.
|
|
101
|
+
"@types/node": "^26.6.6",
|
|
103
102
|
"@types/react": "^19.2.18",
|
|
104
103
|
"@types/react-dom": "^19.2.5",
|
|
105
104
|
"tsdown": "^0.22.14",
|
package/src/agent/provider.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
AgentEffort,
|
|
4
|
+
AgentModelOption,
|
|
5
|
+
AgentPermissionMode,
|
|
6
|
+
AgentProviderId,
|
|
7
|
+
AgentQuestion,
|
|
8
|
+
} from './types.ts';
|
|
3
9
|
|
|
4
10
|
export type ProviderEvent =
|
|
5
11
|
| { type: 'session-id'; id: string }
|
|
@@ -29,6 +35,7 @@ export type ProviderRunOptions = {
|
|
|
29
35
|
resumeAt: string | null;
|
|
30
36
|
model: string | null;
|
|
31
37
|
effort: AgentEffort | null;
|
|
38
|
+
permissionMode: AgentPermissionMode;
|
|
32
39
|
signal: AbortSignal;
|
|
33
40
|
emit: (event: ProviderEvent) => void;
|
|
34
41
|
askUser: (questions: AgentQuestion[]) => Promise<Record<string, string> | null>;
|
package/src/agent/types.ts
CHANGED
|
@@ -6,6 +6,14 @@ export const AGENT_EFFORTS = ['minimal', 'low', 'medium', 'high', 'xhigh', 'max'
|
|
|
6
6
|
|
|
7
7
|
export type AgentEffort = (typeof AGENT_EFFORTS)[number];
|
|
8
8
|
|
|
9
|
+
export const AGENT_PERMISSION_MODES = ['supervised', 'acceptEdits', 'auto', 'fullAccess'] as const;
|
|
10
|
+
|
|
11
|
+
export type AgentPermissionMode = (typeof AGENT_PERMISSION_MODES)[number];
|
|
12
|
+
|
|
13
|
+
export function isAgentPermissionMode(value: unknown): value is AgentPermissionMode {
|
|
14
|
+
return typeof value === 'string' && (AGENT_PERMISSION_MODES as readonly string[]).includes(value);
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
export function isAgentProviderId(value: unknown): value is AgentProviderId {
|
|
10
18
|
return typeof value === 'string' && (AGENT_PROVIDER_IDS as readonly string[]).includes(value);
|
|
11
19
|
}
|
|
@@ -131,13 +139,20 @@ export type RespondPayload =
|
|
|
131
139
|
| { allow: boolean }
|
|
132
140
|
| { cancel: true };
|
|
133
141
|
|
|
134
|
-
export
|
|
142
|
+
export const AGENT_EVENT = 'open-slide:agent';
|
|
143
|
+
|
|
144
|
+
// `rev` numbers store events; a snapshot carries the rev it was taken at, so a
|
|
145
|
+
// client can tell which events it already includes.
|
|
146
|
+
export type AgentStreamEvent = (
|
|
135
147
|
| { type: 'session'; session: AgentSessionSummary }
|
|
136
148
|
| { type: 'session-removed'; sessionId: string }
|
|
137
149
|
| { type: 'item'; sessionId: string; item: AgentItem }
|
|
138
150
|
| { type: 'delta'; sessionId: string; itemId: string; text: string }
|
|
139
151
|
| { type: 'truncate'; sessionId: string; itemId: string }
|
|
140
|
-
| { type: 'slide-renamed'; from: string; to: string }
|
|
152
|
+
| { type: 'slide-renamed'; from: string; to: string }
|
|
153
|
+
) & { rev?: number };
|
|
154
|
+
|
|
155
|
+
export type AgentSnapshot<T> = T & { rev: number };
|
|
141
156
|
|
|
142
157
|
export function sessionSummary(session: AgentSession): AgentSessionSummary {
|
|
143
158
|
const {
|
package/src/app/app.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import config from 'virtual:open-slide/config';
|
|
|
2
2
|
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
3
3
|
import { Toaster } from './components/ui/sonner';
|
|
4
4
|
import { TooltipProvider } from './components/ui/tooltip';
|
|
5
|
+
import { DesktopBridge } from './lib/desktop';
|
|
5
6
|
import { useLocale } from './lib/use-locale';
|
|
6
7
|
import { AssetsPage } from './routes/assets';
|
|
7
8
|
import { Home } from './routes/home';
|
|
@@ -33,6 +34,7 @@ export function App() {
|
|
|
33
34
|
</Routes>
|
|
34
35
|
</TooltipProvider>
|
|
35
36
|
<Toaster />
|
|
37
|
+
<DesktopBridge />
|
|
36
38
|
</BrowserRouter>
|
|
37
39
|
);
|
|
38
40
|
}
|