Commit graph

5965 commits

Author SHA1 Message Date
Classic298
c73efab192
feat: load banners on navigation to homepage, not only on refresh (#22340) 2026-03-06 14:46:00 -06:00
Classic298
ce54b1df23
perf: guard TTS sentence parsing behind showCallOverlay check (#22195)
The chatCompletionEventHandler runs getMessageContentParts() and
removeAllDetails() on every streaming token to extract sentences
for real-time TTS dispatch via CustomEvent('chat'). These functions
perform multiple O(n) regex passes over the full accumulated message
content, resulting in O(n^2) total work over a streaming response.

The only consumer of these events is CallOverlay.svelte, which is
only mounted when showCallOverlay is true. Without the overlay open,
the parsing runs but the dispatched events have no listeners.

Wrap all three TTS parsing blocks in an if () guard
so the expensive regex work is skipped entirely for the vast majority
of users who are not using the voice call feature.
2026-03-06 14:32:05 -06:00
Classic298
16701befe7
fix: show floating action buttons when chat model is unavailable (#22149) 2026-03-06 14:30:24 -06:00
Timothy Jaeryang Baek
def954134c refac 2026-03-06 14:21:38 -06:00
Algorithm5838
a25ecfa856
perf: skip token parsing when raw content is unchanged (#22183) 2026-03-06 14:08:12 -06:00
Timothy Jaeryang Baek
47b007ef19 refac 2026-03-06 14:07:34 -06:00
Classic298
1850a985b5
perf: replace O(n²) unshift with O(n) push+reverse in buildMessages (#22280)
Array.unshift() is O(n) per call because it shifts all existing
elements. In a loop building an n-element array, this makes the
total cost O(n²). Replace with push() + reverse() which is O(n)
total. Produces the identical message ordering.
2026-03-06 14:02:57 -06:00
Timothy Jaeryang Baek
339ed1d72e refac 2026-03-06 14:02:05 -06:00
Timothy Jaeryang Baek
0820abbc64 refac 2026-03-06 13:54:55 -06:00
Shirasawa
b94e1c9458
fix: Fix memory leaking in Artifacts (#22303) 2026-03-06 13:49:06 -06:00
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
6e43861c0c
feat: prioritize in-group members in sorting (#22211) 2026-03-04 15:03:20 -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
ed9ab65b5e refac 2026-03-02 15:23:01 -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
Tim Baek
860a0b414e
Merge pull request #22111 from Algorithm5838/perf/debounce-get-contents
perf: use rAF to debounce getContents() during streaming
2026-03-02 01:28:15 +04:00
Shirasawa
67893b9a57
fix: fix memory leaking in CodeEditor (#22110) 2026-03-01 15:52:20 -05:00