Commit graph

55 commits

Author SHA1 Message Date
munimunigamer
92c9b6501f feat(07-01): add runtime variable CRUD and entity value operations
- Add getRuntimeVariables, getRuntimeVariablesByEntityType for definition queries
- Add createRuntimeVariable, updateRuntimeVariable, deleteRuntimeVariable for definition CRUD
- Add getStoriesUsingPack to find all stories sharing a pack
- Add countEntitiesWithRuntimeVar for deletion warning counts
- Add clearRuntimeVarFromEntities to strip values on definition delete
- Add renameRuntimeVarInEntities to update variableName copy on rename
- All entity operations accept packId and work across all stories sharing the pack
- Add mapRuntimeVariable private helper for row-to-type conversion
2026-02-17 23:00:17 -06:00
munimunigamer
81c0cd5dec Run prettier on modified files 2026-02-17 21:00:15 -06:00
munimunigamer
9ba079c880 Fix unchecked JSON.parse in pack variable and story custom variables
Wrap JSON.parse calls in mapPackVariable (enum_options) and
getStoryCustomVariables in try/catch to prevent crashes on
malformed database data.
2026-02-17 20:24:06 -06:00
munimunigamer
95b81f33d1 fix: remove dead variables and fix lint errors
Remove unused isImporting state, unused packId prop from
TemplateGroupList, unused pack param, unused EnumOption import,
and add missing each-block keys.
2026-02-17 00:07:58 -06:00
munimunigamer
eb1078b316 refactor: clean up prompt system — delete dead code, fix pack description rendering
- Delete 3 dead barrel files (prompts/index.ts, packs/index.ts, templates/index.ts)
- Remove all dead individual template exports (only group arrays exported now)
- Gut prompts/templates/index.ts to only export PROMPT_TEMPLATES
- Extract shared hashContent into packs/hash.ts (was duplicated in database.ts and pack-service.ts)
- Rename SUGGESTIONS_TEMPLATES to suggestionsTemplates for consistency
- Strip verbose JSDoc banners and stale phase/migration comments
- Render pack descriptions as markdown/HTML in ImportPreviewDialog
- Add stripToPlainText() for PromptPackCard preview (prevents raw HTML in cards)
2026-02-16 23:20:28 -06:00
munimunigamer
48bf6aa162 feat(05-01): database migration and type/service updates for variable extensions
- Add migration 030: description/sort_order columns on pack_variables, custom_variable_values on stories
- Add description and sortOrder fields to CustomVariable type
- Add description and sortOrder to validation schema
- Update database: mapPackVariable, getPackVariables (ORDER BY sort_order), createPackVariable, updatePackVariable
- Add getStoryCustomVariables and setStoryCustomVariables database methods
- Update PackService.createPack to copy description and sortOrder
- Fix VariableManager to include sortOrder in create/update calls
2026-02-16 02:06:28 -06:00
munimunigamer
124c5c73ec merge: integrate origin/dev into feat/jinja-prompting
Resolves conflicts:
- lib.rs: renumber preset_packs migration to v30 (after dev's v25-29)
- ContextBuilder.ts: keep new ContextPipeline import over legacy promptService
- MemoryService.ts: keep dev's message ID tracking with new ContextBuilder rendering
- lorebookImporter.ts: combine dev's batch structure with ContextBuilder pipeline
2026-02-16 01:09:14 -06:00
Javedz678
70986a488a chore: fix leakage
Fix leakage from parent to child and vice versa
2026-02-14 00:45:16 +05:30
Mohammad Javed
7f08d7c3c7
Db rework (#140) (#141)
* Add phase 0

Feature toggles ("Labs" settings tab) + full backup zip (DB + .avt exports via existing JSZip)

* Add phase 1

Phase 1: State Tracking (Record Deltas)
### 1A. Schema Migration
### 1B. Type Definitions
### 1C. Database Layer
### 1D. Delta Capture in Classification
### 1E. Auto-Snapshot Creation

* Phase 2

Rollback on Delete (Cascade)
### 2A. Rollback Engine
### 2B. Integration into Delete Flow
### 2C. Retry System Integration

* Add phase 3

### 3A. Schema Migration
### 3B. Type Changes
### 3C. Database Layer
### 3D. Branch Creation Rework
### 3E. Copy-on-Write Modification
### 3F. Entity Loading Rework
### 3G. Existing Branch Compatibility
### 3H. Add SQL editor

* Phase 4

Add restore from back up feature.

* Disable delete parent branch if children exists

* Add save and rewind to actions/suggestions

+++ On deleting story entries, rewind to saved actions.
+++ If no actions are saved (Pre feature dev for example) then regenerate options again as fall back

* fix: normalize line endings to LF

* fix: normalize remaining config file line endings to LF

* code conflict

* Fix conflict

* Control debug logs in roll back service with toggle

* chore: bump version to 0.7.0-pre.1

* merge issues

* Fix review comment

---------

Co-authored-by: Failerko <c.dann@seznam.cz>
2026-02-13 17:37:27 +05:30
munimunigamer
39a84bee8e feat(04-01): register runtime variables, extend VaultTab, add DB query, create template groups
- Register 96 runtime variables in variableRegistry for autocomplete/validation
- Extend VaultTab type to include 'prompts' for prompt editor tab
- Add getPackUsageCount() to DatabaseService for pack usage badges
- Create templateGroups.ts with 7 groups covering all 41 templates
- Fix VaultPanel.svelte to import VaultTab type instead of local redeclaration
2026-02-12 23:35:16 -06:00
Pento
d170de077a feat: improve database reliability, story retry logic and image embedding UX
Summary of changes:
- Refactored image embedding to use placeholder system, fixing Markdown rendering conflicts.
- Added 'Orphaned Images' gallery and drag-and-drop linking for unplaced illustrations.
- Optimized drag-and-drop performance with requestAnimationFrame and movement thresholds.
- Improved database branch-awareness in retry and restore operations.
- Added error handling wrapper for world state updates to prevent pipeline crashes.
- Fixed Svelte linting and type errors.
2026-02-10 00:07:10 +01:00
munimunigamer
5eda2ab36b feat(02-02): enable foreign key enforcement in database init
- Add PRAGMA foreign_keys = ON to init() method
- Ensures ON DELETE RESTRICT on stories.pack_id is enforced
- Prevents deletion of packs referenced by stories
2026-02-09 00:36:06 -06:00
munimunigamer
7d0e25938a feat(02-02): add pack CRUD and template operations to DatabaseService
- Add imports for PresetPack, PackTemplate, CustomVariable, EnumOption types
- Add pack CRUD methods: getAllPacks, getPack, getDefaultPack, createPack, updatePack, deletePack
- Add canDeletePack safety check (verifies isDefault and story references)
- Add pack template operations: getPackTemplates, getPackTemplate, setPackTemplateContent, deletePackTemplate
- Add pack variable operations: getPackVariables, getPackVariable, createPackVariable, updatePackVariable, deletePackVariable
- Add story-pack assignment: getStoryPackId, setStoryPack
- Add hashContent utility for SHA-256 content hashing with whitespace normalization
- Add mapper functions: mapPack, mapPackTemplate, mapPackVariable
- Follow established DatabaseService patterns (getDb, select/execute, boolean to int conversion)
2026-02-09 00:35:16 -06:00
Failerko
0a36d8475b fix: retry 2026-02-08 04:21:38 +01:00
Failerko
f080cd82bf feat: gen bg for openings 2026-02-08 03:41:36 +01:00
Failerko
4975e9841e fix: agentic images 2026-02-08 01:32:30 +01:00
Failerko
b3b63d1985 feat: branch and checkpoint aware bg images 2026-02-07 01:40:12 +01:00
Failerko
ba00458f12 feat: bg images 2026-02-07 00:43:44 +01:00
failerko
a4ae3bbf01
fix: prettier, eslint, pipeline (#71)
* fix: prettier, eslint, pipeline

* fix: eslintignore, branch trigger

* fix: eslint missing package

* chore: format

* fix: eslint config

* chore: lint wip

* chore: lint

* chore: lint

* chore: typecheck wip

* fix: typecheck

* fix: typecheck

* fix: pipeline: add build step

* feat: pre-push code quality check
2026-02-06 00:49:36 +01:00
failerko
280aff8479 fix: only delete last story entry on retry by entry id (#73)
* fix: only delete last story entry on retry by entry id

* chore: clear ded code

* chore: clear ded code
2026-02-05 10:34:36 +01:00
munimunigamer
b8eb6cf671 fix: image generation problems 2026-02-04 02:08:22 -06:00
munimunigamer
e10eb725e9 added descriptors, fixed visual descriptions to be structured and used migration method that runs at startup, fixed themes 2026-01-29 23:22:01 -06:00
Pento
7e50877f0f pollinations.ai image gen + retry logic + other improvements 2026-01-27 12:28:23 +01:00
munimunigamer
416e3d35cf added drawers 2026-01-23 22:18:48 -06:00
Kurvaz
ce26c5be01 Fixes to tranlation, portraits 2026-01-21 14:49:10 -07:00
munimunigamer
b1d9839686 added tag filtering 2026-01-20 16:47:00 -06:00
Kurvaz
d69164a12d Fixed traits not being translated 2026-01-20 13:35:07 -07:00
Kurvaz
ea5874d7fa Wizard translations 2026-01-20 13:18:36 -07:00
Kurvaz
0f244456ed Added translation 2026-01-20 13:18:36 -07:00
Kurvaz
a8ad829b74 Cleaned up legacy prompt system from codebase 2026-01-18 08:53:12 -07:00
Kurvaz
c2f6facbcb Removed lorebooks from backups 2026-01-17 17:02:45 -07:00
munimunigamer
160d0003bd massive changes fr 2026-01-17 04:20:41 -06:00
munimunigamer
b3b5db588b enhanced settings view! 2026-01-16 21:31:29 -06:00
munimunigamer
0858322a1a Added Scenario Tab, and general fixes to sanitize characters and update {{user}} tags 2026-01-15 21:07:49 -06:00
munimunigamer
28271736e7 added lorebook editing/saving to the vault 2026-01-15 17:47:43 -06:00
munimunigamer
9e15e4223e new character vault feature! 2026-01-15 17:02:56 -06:00
munimunigamer
660aea4f59 inline image support! 2026-01-14 14:55:32 -06:00
Kurvaz
5a56d8b770 Checkpoint export 2026-01-13 10:10:22 -07:00
Kurvaz
9876a2cff9 Checkpoints 2026-01-13 09:41:28 -07:00
Kurvaz
2287c0e28e Fixed database bug for old stories 2026-01-12 22:00:21 -07:00
Kurvaz
a10ac4e9f0 Performance improvements 2026-01-12 16:42:41 -07:00
Kurvaz
733e7d9196 Add portraits 2026-01-11 16:48:52 -07:00
Kurvaz
54ffa358aa Image gen 1 2026-01-10 09:25:54 -07:00
Kurvaz
3c256cd591 Add time 2026-01-08 07:46:52 -07:00
Kurvaz
865b6d5c34 Made QR codes share style analyses 2026-01-08 05:23:06 -07:00
Kurvaz
ecc273a155 Added persistence to style analyzer 2026-01-07 21:24:00 -07:00
Kurvaz
13e22c1e05 Added persistence to retry 2026-01-07 15:49:37 -07:00
Kurvaz
ff5633ff45 Added ability to change descriptions of elements 2026-01-05 04:19:39 -07:00
Kurvaz
3e9fd2b864 Current 2026-01-03 05:23:35 -07:00
Kurvaz
877e70110c Added retries 2026-01-03 03:52:51 -07:00