Commit graph

42 commits

Author SHA1 Message Date
bal-spec
2fc514c0b2 feat: add connection type selector to Setup Wizard
Step 1 of the wizard now offers a toggle between "Dedicated API"
(default) and "Connection Profile" before configuring the LLM.
Previously, Connection Profile was only available in the Settings
Modal after completing the wizard.

- Source toggle buttons with active/inactive styling
- Profile section: dropdown via CMRS.handleDropdown(), Test Connection
- Step 3 summary adapts to show profile name or provider/model
- Updated getting-started.md with both paths and new screenshot
- Updated CHANGELOG.md with improvements and tooltip fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 22:12:39 -07:00
bal-spec
6cf5e9ee6f fix: stack modal nav vertically on mobile (#8)
Settings and Troubleshooter modals used a side-by-side flex layout
(130px nav + content) that left the content panel too narrow on phone
screens. In phone mode, the nav now renders as horizontal tabs above
the content, giving it the full popup width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 20:39:54 -07:00
bal-spec
dc0eab2638 v2.1.6 — UX redesign, injection viewer, unified editor, token breakdown
Complete rewrite of the UI and significant feature additions since v1.6.1.

UX Redesign (v2.0):
- Single-view dashboard replaces 4-tab sidebar
- Settings, Prompts, Troubleshooter, Memory Manager moved to center-screen modals
- Activity log in slide-out drawer
- Setup Wizard for first-run configuration
- Prompt version tracking with update notifications
- Health indicator in stats bar

Injection Viewer (v1.6–v2.1.6):
- Per-message injection data: see exactly what memories, lorebook entries,
  and extension prompts were injected for any generation
- Context/Prompt Breakdown with per-category token counts (System, Char card,
  Lorebook, Data Bank, Examples, Chat history) via ST Prompt Itemization
- Stacked bar visualization, token hints in headers, Tips popup
- Context overflow and heavy injection warnings

Memory Management:
- Unified block editor across all 5 editing surfaces (Memory Manager,
  Consolidation, Conversion, Reformat, Data Bank browser)
- Find & Replace with highlighting across all editors
- Undo support for all edit operations
- Group chat character picker in Memory Manager

Other features:
- Tablet & phone display modes with touch-friendly controls
- Topic-tagged memory format for better vector retrieval
- Self-closing memory tag handling (GLM-4.7 compatibility)
- Protect recent messages from extraction feedback loop
- 9-point health check system with retrieve chunks and score threshold
- Shared editor factory (editor.js), pure utility library (lib.js)
- Vitest test suite: unit, snapshot, and live LLM tests
- Full documentation suite in docs/

See CHANGELOG.md for detailed per-version notes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:20:14 -08:00
bal-spec
1d95549e31 fix(injection-viewer): fix iPad header clipping, visible health dot, touch diagnostics
- Position drawer below ST top bar dynamically so header/close/health
  dot aren't clipped by browser chrome on tablets
- Replace empty span health dot with FA circle icon for reliable rendering
- Use color property instead of background for drawer health dot
- On touch devices, "Diagnostics" link shows inline health popup in
  the drawer instead of navigating to the hidden extensions panel
- Desktop keeps existing behavior (opens extensions panel, scrolls)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:30:03 -08:00
bal-spec
0150a1ca77 fix(injection-viewer): make diagnostics link functional, health dot visible on all themes
- Diagnostics link now opens the extensions drawer and scrolls to the
  diagnostics section even when the panel isn't already visible
- Drawer health dot uses explicit background colors with ID-scoped
  overrides so it doesn't blend into dark theme headers
- Unknown state uses rgba gray instead of theme border color variable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:10:18 -08:00
bal-spec
cf98fe6b0c fix(injection-viewer): improve iPad layout, health dot visibility, diagnostics access
- Cap drawer width at 40vw so it doesn't obscure chat on tablets
- Enlarge drawer health dot to 10px with border for visibility
- Move timestamp and diagnostics link from footer to toolbar below header
- Add bal-spec git auth reminder to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:07:00 -08:00
bal-spec
d6a28b1a9b fix(injection-viewer): replace backdrop with swipe-to-close for drawer
Backdrop overlay was closing the drawer when clicking the chat textarea.
Replaced with swipe-right-to-close gesture (60px threshold) for touch
devices. Drawer can still be closed via X button or toggle tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:11:56 -08:00
bal-spec
76a6431dfe feat(injection-viewer): add backdrop to close drawer by clicking outside
Adds a semi-transparent backdrop behind the injection drawer that
closes it when clicked/tapped. Works on both desktop and touch devices.
Also increases the close button touch target to 32px minimum for
better iPad usability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:10:56 -08:00
bal-spec
48b9c5b363 fix(injection-viewer): drawer health dot reflects injection state, add stats and diagnostics link
- Drawer health dot stays gray until a generation is captured (no false
  green before injection is verified)
- Drawer dot tooltip shows injection-specific stats: vectorization,
  memory count, duplicates, with instructions to open diagnostics
- Added "Open Diagnostics" link in drawer footer that scrolls to and
  highlights the diagnostics panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:06:14 -08:00
bal-spec
ee4598124b feat(injection-viewer): add injection health score with traffic light indicator
Adds a health scoring system that checks Vector Storage configuration
and surfaces issues at a glance:

- Status bar: colored dot (green/yellow/red) with hover tooltip
- Diagnostics panel: detailed breakdown of each health check
- Per-message: duplicate/missing memory warnings in injection drawer
- Click-to-navigate: status bar dot scrolls to diagnostics

Health checks: vector files enabled, memory file exists, file vectorized,
chunk overlap adequacy, chunk size vs block size, memories injected,
duplicate detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:56:23 -08:00
bal-spec
e69079b524 fix(injection-viewer): ensure drawer icons visible across all themes
The drawer, close button, and toggle button relied on inherited color
which could blend into the background with some themes (e.g. Moonlit
Echoes). Now explicitly sets color via --SmartThemeBodyColor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:07:35 -08:00
bal-spec
3de68b10ff feat(injection-viewer): add toggleable side drawer with collapsible sections
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:37:41 -08:00
bal-spec
659059bf8c feat(injection-viewer): add per-message View Injected button and indicator dot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:25:48 -08:00
bal-spec
5cb444e55e feat: replace inline convert preview with interactive popup dialog
Convert tool now uses the same callGenericPopup pattern as consolidation:
- Side-by-side panes (original file vs editable memory cards)
- Full card editing (add/delete/edit blocks and bullets)
- Re-run with LLM toggle, version stack, and undo
- Output destination controls inside the dialog
- inApiCall guard prevents concurrent dialogs
- dialogClosed flag cancels stale re-run callbacks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:37:32 -08:00
bal-spec
89ac603e40 refactor: restructure tabs into Main|Tools|Settings|Log with pill sub-nav
Replace 5 top-level tabs with 4. Consolidate and Batch move under a
Tools tab with pill-button sub-navigation. Add Convert tool HTML shell
with source dropdown, LLM prompt disclosure, and preview area.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:48:00 -08:00
bal-spec
b36ee17ec0 feat: searchable model picker, group avatars in stats bar, prompt titles
Three UX improvements:
- Model dropdown replaced with searchable text input (filter by typing,
  keyboard navigation, optgroup support for NanoGPT)
- Group chats show character avatar thumbnails in the stats bar with
  tooltip listing per-character memory filenames
- Extraction prompt labels now show "(1:1 chats)" or "(group chats)"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:52:11 -08:00
bal-spec
bcae251cd4 Merge branch 'consolidation-improvements' into beta
# Conflicts:
#	index.js
#	settings.html
2026-02-19 22:49:11 -08:00
bal-spec
10bfe18361 feat: add per-character filename config for group chats
Restructure settings into separate 1:1 Chat and Group Chat sections.
Add dynamic group members list showing each character's resolved memory
filename with editable overrides.

Filename detection cascade: manual override → auto-detect existing
*-memories.md in character's Data Bank → auto-generated {Name}-memories.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:22:25 -08:00
bal-spec
919f18898b fix: improve responsive layout for narrow viewports (iPad landscape)
- Tabs wrap to multiple rows instead of overflowing
- Reduced tab padding for compact fit
- Stats bar items wrap to 2 rows on narrow panels
- Activity log and diagnostics text wraps instead of overflowing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:39:20 -08:00
bal-spec
159661430d feat: make activity log scrollable and resizable
Replace hover/click expand with native resize: vertical.
User can drag the bottom edge to resize between 30px and 400px.
Always scrollable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:22:55 -08:00
bal-spec
bc5c52d228 feat: add Memory Extraction heading, move Select All next to Character Attachments
- Main tab gets "Memory Extraction" header with "Automatic" checkbox
- "Select all" moved inline with "Character Attachments" header
- New charMemory_sectionHeader CSS for label + control on same line

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:22:27 -08:00
bal-spec
ccb5d1230b feat: move diagnostics and activity log to always-visible panel sections
- Activity Log labeled and always visible below tab content
- Diagnostics moved from Main tab to permanent pane at bottom
- Main tab now only has Extract Now and View/Edit buttons
- Click activity log to expand, hover also works

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:16:07 -08:00
bal-spec
00451eed06 fix: force left-align text in View/Edit memory manager popup
Same inherited center-align issue from SillyTavern's popup dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:14:02 -08:00
bal-spec
a4e39033b5 fix: force left-align text in consolidation dialog
SillyTavern's popup dialog centers content by default, causing
bullets and card text to appear centered instead of left-aligned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:13:23 -08:00
bal-spec
6571d9f141 feat: complete UX refinements — migration, cleanup, changelog
Add settings migration from old consolidationPrompt to new
per-preset consolidationPrompts system. Update changelog with
all consolidation UX improvements for v1.3.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:52:21 -08:00
bal-spec
880cd822ce feat: add persistent mini activity log at panel bottom
Shows last 3 log entries always visible below tabs, expandable
on click for more history. Uses max-height transition for smooth
expand/collapse.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:46:46 -08:00
bal-spec
8d92d2961c feat: read-only cards by default with per-block edit toggle and themed headers
Consolidated blocks now display as clean read-only cards with numbered
theme headers. Pencil icon toggles individual blocks into edit mode
with text inputs, delete buttons, and add memory/block controls. Dialog
toolbar includes expandable prompt viewer matching the Consolidate tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:43:51 -08:00
bal-spec
e00631d074 feat: add expandable prompt viewer with per-preset editing
Replace hidden textarea + Custom option with <details> disclosure
showing the editable prompt for each strategy. Restore Default button
appears when a preset has been customized.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:41:24 -08:00
bal-spec
9a4c0052e8 fix: XSS in attribute escaping, remove duplicate counter, disable editor during re-run
- escapeHtml() now escapes quotes for safe use in attribute values
- Remove duplicate countBlocksBullets (identical to existing countMemories)
- Disable editor inputs during re-run LLM call to prevent lost edits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:05:51 -08:00
bal-spec
39d1b43b48 feat: replace textarea editor with card-based editor in consolidation dialog
Each consolidated memory is now an editable card with text inputs instead
of raw text with <memory> tags. Supports add/delete bullets and blocks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 22:47:53 -08:00
bal-spec
972c446c21 feat: complete consolidation UX improvements (v1.3.0)
- Add box-sizing to consolidation editor textarea
- Bump version to 1.3.0
- Update changelog with new consolidation features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 22:15:36 -08:00
bal-spec
8c459cf8fe feat: add interactive consolidation dialog with editable textarea
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 22:04:11 -08:00
bal-spec
4b43b598f3 feat: collapsible verbose log entries with pre-formatted text
Verbose log entries (prompts, responses) now render as collapsible
<details> sections with the first line as summary. Full content is
in a pre-formatted block with scroll, so it doesn't flood the log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:48:36 -08:00
bal-spec
f4388f679c feat: batch extraction tab — extract memories from multiple chats
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 15:39:39 -08:00
bal-spec
3d541afaf2 Improve extraction prompt, add cooldown, tabbed panel, richer stats bar
- Replace default extraction prompt with higher-quality version: AVOID list
  (sexual mechanics, temporary states, dialogue), FOCUS categories, past
  tense rule, consolidation/fact-checking rules, better examples
- Bump default responseLength from 500 to 800
- Add minCooldownMinutes setting (default 10, range 0-30) to prevent
  rapid-fire extractions; manual extractions bypass cooldown
- Combine Activity Log + Diagnostics into single tabbed drawer
- Expand stats bar from 2 to 4 items: file, memory count, extraction
  progress (msgs/interval), cooldown timer with auto-refresh
- Fix stats bar showing stale count after Clear All Memories

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:25:27 -08:00
bal-spec
f3ab5ccfb8 Add activity log and fix extraction not running on chat switch
- Add collapsible Activity Log panel that shows timestamped events:
  chat switches, extraction state, message collection, LLM responses
- Fix bug where lastExtractedIndex advanced even when LLM returned
  NO_NEW_MEMORIES, preventing subsequent manual extraction from
  processing messages on a switched-to chat
- Now only advance lastExtractedIndex when memories are actually saved;
  always reset messagesSinceExtraction to prevent re-trigger loops

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:29:55 -08:00
bal-spec
868ab648dd Add per-message Extract Here, Pin Memory buttons and extraction indicators
- Refactor collectRecentMessages/extractMemories to accept optional endIndex
- Add brain button on character messages to extract memories up to that point
- Add bookmark button on all messages to pin text as memory without LLM
- Show subtle brain indicator on messages already processed by extraction
- Update indicators on chat switch and after extraction completes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:09:40 -08:00
bal-spec
93c6f7e94d Redesign memory format to <memory> tags, add per-bullet manager UX and vectorization diagnostics
Switch from ## Memory N headers to <memory chat="..." date="..."> tag blocks
with individual bullet parsing. Memory manager now shows grouped extraction
cards with per-bullet edit/delete controls. Stats bar simplified to file name
and total bullet count. Diagnostics panel shows vectorization status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 20:03:55 -08:00
bal-spec
2e4ba2c936 Improve UX: rename to Character Memory, add stats bar, flatten layout
- Rename extension header from CharMemory to Character Memory
- Add always-visible stats bar showing active file, memory count, and
  extraction progress
- Flatten Memory Status sub-drawer so controls are immediately visible
- Merge Advanced section into Settings with separator dividers
- Rename buttons: Manage Memories → View / Edit, Reset → Clear All
  Memories (moved to Settings with danger styling)
- Add tooltips, helper text styling, and separator/danger-button CSS
- Call updateStatusDisplay after consolidation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 19:50:34 -08:00
bal-spec
dcda5c593c Add structured memory format, per-memory editing, and consolidation
- Memories now stored as numbered `## Memory N` entries with timestamps
- Auto-migrates existing flat-text memories to structured format
- "Manage Memories" popup with edit/delete per entry (replaces "View Memories")
- "Consolidate" button and `/consolidate-memories` slash command to merge duplicates via LLM
- Extraction now splits LLM output on `---` separators into individual entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:49:31 -08:00
bal-spec
ddec838b39 Fix View Memories popup and add WebLLM extraction source
- Use ST's callGenericPopup (properly imported) instead of broken fallback modal
- Add extraction source dropdown: Main LLM or WebLLM (browser-local)
- Remove unused fallback modal CSS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:33:57 -08:00
bal-spec
072e744471 Initial commit: CharMemory extension for SillyTavern
Automatically extracts structured character memories from chat and stores
them in character-scoped Data Bank files for vector retrieval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:08:27 -08:00