Commit graph

3361 commits

Author SHA1 Message Date
Timothy Jaeryang Baek
cd2c315495 refac 2026-03-05 16:13:35 -06:00
Timothy Jaeryang Baek
4b3ed3e802 feat: notebook per-cell execution via open-terminal REST endpoints
- Add notebook API functions (createNotebookSession, executeNotebookCell, stopNotebookSession)
- Create CellEditor component with CodeMirror for cell editing
- Rewrite NotebookView with session-based execution, Run All, Restart, Stop
- Kernel status indicator with tooltips
- Wire baseUrl/apiKey through FilePreview and FileNav
2026-03-05 16:08:11 -06:00
Timothy Jaeryang Baek
aaa49bdd6d refac 2026-03-05 14:52:50 -06:00
Timothy Jaeryang Baek
8da02c669e refac 2026-03-05 14:47:48 -06:00
Timothy Jaeryang Baek
828656b35f feat: auto-refresh FileNav on write_file, replace_file_content, and run_command
Backend emits terminal events for write_file, replace_file_content,
and run_command. Frontend showFileNavDir subscriber uses startsWith
path matching to smartly refresh only when the event is relevant:
- write_file/replace_file_content: refresh if path is in current view
- run_command: always refresh (uses root '/' which matches everything)
- Also adds copy-to-clipboard button and code preview full-height fix
2026-03-05 14:41:18 -06:00
Timothy Jaeryang Baek
3b97c8d89b refac 2026-03-05 13:55:02 -06:00
Timothy Jaeryang Baek
f5ea1ce250 feat: add copy-to-clipboard button next to download in file toolbar 2026-03-05 13:53:19 -06:00
Timothy Jaeryang Baek
a181b4a731 feat: add SQLite database browser in FileNav
- New SqliteView component with table tabs, paginated data view
  (100 rows/page), SQL query editor (Cmd+Enter), NULL/BLOB formatting,
  sticky column headers, and dark mode
- Supports .db, .sqlite, .sqlite3, .db3 extensions
- Uses sql.js WASM served locally from /sql.js/sql-wasm.wasm
- Also fixes display_file handling when another file is already open
2026-03-05 13:34:21 -06:00
Timothy Jaeryang Baek
7ef181bc13 refac 2026-03-04 16:52:01 -06:00
Timothy Jaeryang Baek
49a2e5bf57 feat: show refresh button when viewing files, not just directories
- Move refresh button out of directory-only block in FileNavToolbar
- When viewing a file, refresh reloads that file's content
- When in directory view, refresh reloads the listing (unchanged)
2026-03-04 16:48:01 -06:00
Timothy Jaeryang Baek
b081e33c0a feat: add Jupyter Notebook (.ipynb) preview in FileNav
- New NotebookView component renders markdown cells (marked+DOMPurify),
  code cells (Shiki-highlighted with execution count gutter), and
  outputs (text, HTML tables, base64 images, error tracebacks)
- ANSI escape codes stripped from error output
- Source toggle shows raw JSON
- Dark mode support throughout
2026-03-04 16:14:26 -06:00
Timothy Jaeryang Baek
f4c38e6001 feat: add JSON collapsible tree view, SVG rendered preview, and source toggle
- New JsonTreeView component with recursive collapsible nodes,
  auto-expand depth, and GitHub-themed dark mode colors
- JSON/JSONC/JSON5 files show tree view by default, toggle to
  Shiki-highlighted source
- SVG files show rendered preview (DOMPurify-sanitized) by default,
  toggle to Shiki-highlighted XML source
- SVG removed from IMAGE_EXTS to enable text-based preview
- YAML/TOML already covered by Shiki bundled languages
2026-03-04 16:10:15 -06:00
Timothy Jaeryang Baek
c40f26946f feat: add Shiki syntax highlighting, video, and audio previews in FileNav
- Add Shiki-powered syntax highlighting for code files with dual
  light/dark themes (github-light/github-dark), line numbers, and
  source/preview toggle
- Add native <video> player for mp4, webm, mov, ogv, avi, mkv
- Add native <audio> player for mp3, wav, ogg, flac, m4a, aac, opus
- New utility: src/lib/utils/codeHighlight.ts with extension-to-lang
  mapping using Shiki's bundled language registry
2026-03-04 16:04:47 -06:00
Timothy Jaeryang Baek
f962bae983 feat: improve XLSX preview + add code syntax highlighting
XLSX QoL:
- Custom table renderer (excelToTable.ts) with column letters,
  row numbers, right-aligned numbers, empty cell handling
- Monospace font, sticky headers + row nums, cell cursor
- Sheet tabs moved to bottom bar (like PPTX navigation)
- Unified styles between FileNav and FileItemModal

Code highlighting:
- Shiki-based syntax highlighting for code files in FileNav
- Line numbers, dark/light theme support
- Source/Preview toggle for code files
2026-03-04 15:59:55 -06:00
Timothy Jaeryang Baek
e08341dab3 enh: ot ports 2026-03-04 15:51:03 -06:00
Timothy Jaeryang Baek
890949abe6 feat: add DOCX/XLSX/PPTX file preview
- DOCX: mammoth converts to semantic HTML (prose preview)
- XLSX: xlsx library extended to FileNav with sheet tabs at bottom
- PPTX: custom canvas renderer produces PNG images per slide
  with panzoom zoom/pan and slide navigation

Changes:
- New: src/lib/utils/pptxToHtml.ts (canvas-based PPTX renderer)
- FileNav.svelte: office format detection, blob download, conversion
- FilePreview.svelte: office rendering branches, sheet tabs, slide viewer
- FileItemModal.svelte: DOCX/PPTX preview tabs
- package.json: added mammoth dependency
2026-03-04 15:50:37 -06:00
Shirasawa
7d45459a47
fix: keep save button spinner inline (#22227) 2026-03-04 13:56:49 -06:00
Shirasawa
5af24b3ebe
fix: Implement archive chat handler in Chat page navbar (#22229) 2026-03-04 13:54:21 -06:00
Timothy Jaeryang Baek
ca2aaf0321 fix: ot terminal 2026-03-02 19:09:13 -06:00
Timothy Jaeryang Baek
10baa6e781 chore: format 2026-03-02 17:07:53 -06:00
Timothy Jaeryang Baek
b5c3395f79 refac 2026-03-02 16:41:32 -06:00
Timothy Jaeryang Baek
1a2b360d3d refac 2026-03-02 15:01:10 -06:00
Timothy Jaeryang Baek
4f6cb771f1 enh: open terminal 2026-03-02 14:49:02 -06:00
Timothy Jaeryang Baek
44349fb62b refac 2026-03-02 13:27:37 -06:00
Timothy Jaeryang Baek
933a3bbbd3 refac 2026-03-02 12:49:51 -06:00
Timothy Jaeryang Baek
3909b62ffc enh: file nav html rendering 2026-03-02 12:45:50 -06:00
Timothy Jaeryang Baek
11487d66fc refac 2026-03-02 12:09:49 -06:00
Timothy Jaeryang Baek
395098c6f1 refac 2026-03-02 12:07:55 -06:00
Timothy Jaeryang Baek
72951324df refac 2026-03-02 12:05:19 -06:00
Timothy Jaeryang Baek
0c42cd2c01 enh: ot move 2026-03-02 12:03:23 -06:00
Timothy Jaeryang Baek
c701ebe07b refac 2026-03-02 11:29:29 -06:00
Shirasawa
b338850cc1
Merge pull request #22127 from ShirasawaSama/patch-49
fix: Fix TypeScript syntax compilation errors
2026-03-02 11:26:58 -06:00
Timothy Jaeryang Baek
d7147d6cdd refac 2026-03-02 11:24:15 -06:00
Timothy Jaeryang Baek
832d0181b6 chore: format 2026-03-01 19:13:14 -06:00
Shirasawa
a9e9fe7899
fix: fix memory leaking of ChatControls (#22112) 2026-03-01 19:06:20 -06:00
Algorithm5838
fe837d80e7 fix: pass params when saving a temporary chat
The system prompt and other chat controls overrides were lost after
saving because `params` wasn't included in the `createNewChat` call.
2026-03-02 01:35:59 +03:00
Algorithm5838
6863ca482c perf: use rAF to debounce getContents() during streaming 2026-03-01 23:42:16 +03:00
Timothy Jaeryang Baek
5645d5bccc refac 2026-03-01 14:38:10 -06:00
Timothy Jaeryang Baek
201b93bfcc refac 2026-03-01 14:18:57 -06:00
Shirasawa
9904566513
fix: fix memory leaking in Chat.svelte (#21962)
* fix: fix memory leaking in Chat.svelte

* chore: remove useless chatIdUnsubscriber var

* fix: fix async tick
2026-03-01 15:04:47 -05:00
Classic298
597883a179
perf: use structuredClone and fast-path comparison in UserMessage (#22098)
Same optimization as the merged ResponseMessage PR: replace JSON.parse(JSON.stringify()) with structuredClone and add an O(1) fast-path check on content before falling back to full JSON.stringify comparison.
2026-03-01 14:46:05 -05:00
Timothy Jaeryang Baek
d415edcfcd chore: bump 2026-03-01 13:14:20 -06:00
Algorithm5838
e9011113b4
perf: skip redundant object spread in buildMessages (#22086) 2026-03-01 13:46:11 -05:00
Classic298
1b89bee098
perf: add fast-path comparison in MultiResponseMessages (#22100)
Same optimization as ResponseMessage: add O(1) fast-path check on content and done fields before falling back to full JSON.stringify comparison. Avoids expensive serialization when only content changes during streaming.
2026-03-01 13:44:59 -05:00
Classic298
3569280c0b
perf: replace JSON.parse(JSON.stringify()) with structuredClone in Chat.svelte (#22102)
Replace 7 instances of JSON.parse(JSON.stringify()) deep cloning with the native structuredClone API. All are on cold paths (model selection, file preparation, history saving) but structuredClone is ~2x faster and more readable.
2026-03-01 13:37:20 -05:00
Classic298
a0d6c209c3
perf: fast-path token comparison in CodeBlock (#22101)
During streaming, every token change triggers a full JSON.stringify comparison on the code block token object. Add an O(1) fast-path check on token.text and token.raw — the fields that actually change during streaming — before falling back to the expensive JSON.stringify comparison for infrequent structural changes.
2026-03-01 13:37:10 -05:00
Classic298
73617ec7fa
perf: fast-path length check in StatusHistory comparison (#22103)
Add O(1) array length check before expensive JSON.stringify comparison. During streaming, status history typically only grows via appends, so a length mismatch catches most updates without serialization.
2026-03-01 13:36:42 -05:00
Timothy Jaeryang Baek
ddedceb7ad refac 2026-03-01 12:32:44 -06:00
Timothy Jaeryang Baek
18865a9fef refac 2026-03-01 12:30:03 -06:00
Timothy Jaeryang Baek
769ef856bc chore: format 2026-03-01 03:05:47 -06:00