Commit graph

523 commits

Author SHA1 Message Date
munimunigamer
ca504fad8e implemented final sdk migrations 2026-02-01 17:57:21 -06:00
munimunigamer
9723dff31b fixed loading states 2026-02-01 16:52:59 -06:00
munimunigamer
1418226061 removed actioninputorchestrator (kinda too muhc splitting) 2026-02-01 16:04:06 -06:00
munimunigamer
fe1b32095a feat: [US-012] - Final cleanup and verification
- Reduce ActionInput.svelte from 1521 to 689 lines (55% reduction)
- Create ActionInputOrchestrator.ts for reusable helpers (suggestions, translation)
- Remove unused imports and consolidate builder functions
- All extracted services properly export types from index.ts
- Typecheck passes (only pre-existing errors remain)
- ActionInput is now pure UI code with business logic in services
2026-02-01 12:56:37 -06:00
munimunigamer
8b6b9426ec feat: [US-011] - Wire up PipelineEventHandler in ActionInput 2026-02-01 12:42:11 -06:00
munimunigamer
c28dcca343 feat: [US-010] - Create PipelineEventHandler for UI event mapping 2026-02-01 12:33:15 -06:00
munimunigamer
3b1d53de26 feat: [US-009] - Wire up SuggestionsRefreshService in ActionInput 2026-02-01 12:29:22 -06:00
munimunigamer
94eafb4896 feat: [US-008] - Create SuggestionsRefreshService for manual suggestion refresh 2026-02-01 12:26:31 -06:00
munimunigamer
388d20b28f feat: [US-007] - Wire up WorldStateTranslationService in ActionInput
- Import WorldStateTranslationService from generation module
- Add buildWorldStateTranslationDependencies() helper
- Add buildWorldStateTranslationCallbacks() helper
- Replace inline translateWorldStateElements() call with service
- Remove 65-line translateWorldStateElements() function
- Remove unused hasDescriptors/descriptorsToString imports
- Net reduction: 30 lines
2026-02-01 12:21:36 -06:00
munimunigamer
5501afdec2 feat: [US-006] - Create WorldStateTranslationService for entity translation
- Create src/lib/services/generation/WorldStateTranslationService.ts (127 lines)
- Extract translateWorldStateElements() logic from ActionInput.svelte
- Service accepts WorldStateTranslationDependencies interface (AI translate method)
- WorldStateTranslationCallbacks interface for DB update callbacks
- translateEntities() method handles characters, locations, items, storyBeats
- Export from src/lib/services/generation/index.ts
2026-02-01 12:18:05 -06:00
munimunigamer
d94cab4777 feat: [US-005] - Wire up BackgroundTaskCoordinator in ActionInput
- Import BackgroundTaskCoordinator and related types
- Add buildBackgroundTaskDependencies() helper function
- Add buildBackgroundTaskInput() helper function to build coordinator input
- Replace inline checkAutoSummarize() and checkStyleReview() calls with coordinator.runBackgroundTasks()
- Remove checkAutoSummarize(), runLoreManagement(), checkStyleReview() functions from ActionInput
- Remove unused Chapter type import
- Update ChapterServiceDependencies to use proper StoryMode/POV/Tense types
- ActionInput reduced by 132 lines (1734 -> 1602 lines)
2026-02-01 12:13:04 -06:00
munimunigamer
2330804236 feat: [US-004] - Create BackgroundTaskCoordinator for post-response task orchestration 2026-02-01 12:06:40 -06:00
munimunigamer
45b9cbc3be feat: [US-003] - Create StyleReviewScheduler for style review timing 2026-02-01 12:04:13 -06:00
munimunigamer
3d6719de9a feat: [US-002] - Create LoreManagementCoordinator for lore management orchestration 2026-02-01 12:00:46 -06:00
munimunigamer
fff965a34b feat: [US-001] - Create ChapterService for chapter creation logic
- Create src/lib/services/generation/ChapterService.ts (141 lines)
- Extract checkAutoSummarize() logic from ActionInput.svelte
- Add checkAndCreateChapter() method returning ChapterCreationResult
- ChapterServiceDependencies interface for injected AI/DB methods
- Service does NOT import Svelte stores - uses injected dependencies
- Export from src/lib/services/generation/index.ts
2026-02-01 11:57:42 -06:00
munimunigamer
5b697903e5 fix: image inline generation cleaned up 2026-02-01 10:56:32 -06:00
munimunigamer
c00db31e24 fix: Set currentStory in createStoryFromWizard and add missing imageAnalysis preset assignment 2026-02-01 01:37:09 -06:00
munimunigamer
14145f1a8e added ignore ralph 2026-02-01 01:20:48 -06:00
munimunigamer
2cb73e16af Merge branch 'vercel-ai-sdk' of github-aventura:unkarelian/Aventura into vercel-ai-sdk 2026-02-01 01:19:33 -06:00
munimunigamer
c1b674da53 feat: [US-016] - Extract ExportCoordinationService
Extract export data gathering logic from Header.svelte into a dedicated
coordination service. The service gathers all story data in parallel:
entries, characters, locations, items, story beats, lorebook entries,
embedded images, checkpoints, branches, and chapters.

ExportCoordinationService is 81 lines. Header.svelte now delegates to
gatherStoryData() instead of inline Promise.all calls.
2026-02-01 00:56:31 -06:00
munimunigamer
373938bac9 feat: [US-015] - Extract ImageEmbeddingService
Extract image embedding/processing logic from StoryEntry.svelte into
a dedicated service. Provides four functions for processing narrative
content with embedded images:

- processContentWithImages: Standard regex-based marker system
- processVisualProseWithImages: HTML sanitization with image injection
- processContentWithInlineImages: <pic> tag replacement
- processVisualProseWithInlineImages: Combined Visual Prose + inline
2026-02-01 00:51:11 -06:00
munimunigamer
decf23facb feat: [US-014] - Extract LorebookImportService 2026-02-01 00:45:18 -06:00
munimunigamer
9d30a03b49 feat: [US-013] - Extract RetryService from ActionInput
- Created RetryService.ts (236 lines) for retry/stop/restore operations
- Service handles full state restore (in-memory backup with snapshots)
- Service handles persistent restore (ID-based cleanup for cross-session retry)
- Uses callback pattern to avoid direct store imports
- ActionInput.svelte delegates to retryService.handleStopGeneration()
  and retryService.handleRetryLastMessage()
- ActionInput.svelte reduced from 1765 to 1702 lines (63 lines less)
2026-02-01 00:39:34 -06:00
munimunigamer
9b718bb09b feat: [US-012] - Update ActionInput.svelte to use GenerationPipeline
- Refactored ActionInput.svelte to delegate generation orchestration to GenerationPipeline
- Replaced inline retrieval/narrative/classification/translation/image/post phases with pipeline
- Added buildPipelineDependencies() helper to wire AIService methods to pipeline
- Added handlePipelineEvent() for processing pipeline events and updating UI state
- Extracted translateWorldStateElements() as a helper function
- Fixed PostGenerationPhase to use activeThreads: StoryBeat[] instead of pendingQuests: string[]
- Fixed WorldState.currentLocation type to be Location | undefined
- Made lorebookEntries optional in restoreFromRetryBackup parameter

Note: ActionInput.svelte is now 1765 lines (down from ~2288). Further reduction requires
extracting RetryService (US-013) and potentially other services.
2026-02-01 00:34:20 -06:00
munimunigamer
27300419ba feat: [US-011] - Create GenerationPipeline orchestrator
Thin orchestrator that coordinates all generation phases in order:
pre → retrieval → narrative → classification → translation → image → post

- Aggregates all phase dependencies into PipelineDependencies interface
- Runs phases sequentially, yielding all events for UI updates
- Handles abort signals and fatal errors
- Returns comprehensive PipelineResult with all phase results
2026-02-01 00:23:26 -06:00
munimunigamer
4836723254 feat: [US-010] - Create PostGenerationPhase service 2026-02-01 00:18:23 -06:00
Kurvaz
d0397a9be9 Migrate translation service to vercel sdk 2026-01-31 23:16:02 -07:00
munimunigamer
6cd58bd7ce feat: [US-009] - Create ImagePhase service
Add ImagePhase service for coordinating image generation in the pipeline:
- Check if image generation is enabled and auto-generate is on
- Call aiService.generateImagesForNarrative() for both inline and analyzed modes
- Support skip reasons: disabled, auto_generate_off, not_configured, aborted
- Handle errors gracefully (non-fatal)
2026-02-01 00:13:29 -06:00
munimunigamer
3ba9867e8a feat: [US-008] - Create TranslationPhase service
Adds TranslationPhase service for handling narration translation.
- Checks if translation is enabled via TranslationService.shouldTranslateNarration()
- Gracefully handles translation stub errors (non-fatal)
- Yields phase_start and phase_complete events
- Returns TranslationResult2 with translated content or null on skip/error
2026-02-01 00:09:11 -06:00
munimunigamer
140459a85e feat: [US-007] - Create ClassificationPhase service
Extract world state classification logic into a dedicated phase service
that coordinates entity updates (characters, locations, items, story
beats) via dependency injection.
2026-02-01 00:05:41 -06:00
munimunigamer
f1dc4a47be feat: [US-006] - Create NarrativePhase service 2026-02-01 00:02:47 -06:00
munimunigamer
038b38d19d feat: [US-005] - Create RetrievalPhase service
Extract memory and lorebook retrieval logic into dedicated phase service.
Coordinates timeline fill or agentic retrieval based on settings, and
runs lorebook entry retrieval (tiered injection) in parallel.
2026-01-31 23:59:24 -06:00
munimunigamer
1238920937 feat: [US-004] - Create PreGenerationPhase service
Add PreGenerationPhase service to handle pre-generation setup:
- Prepare retry state backup data for restore capability
- Capture time tracking context in backup
- Yield phase_start and phase_complete events

Files added:
- src/lib/services/generation/phases/PreGenerationPhase.ts (113 lines)
- src/lib/services/generation/phases/index.ts

The phase prepares RetryBackupData that the caller applies via
ui.createRetryBackup(), maintaining separation from UI store.
2026-01-31 23:54:52 -06:00
munimunigamer
63801f91d4 feat: [US-003] - Create generation service types and directory structure 2026-01-31 23:51:13 -06:00
munimunigamer
801e0a1af4 feat: [US-002] - Add scenario schema to index
Export scenario schema from the central schema registry to ensure
all schema files are properly accessible.
2026-01-31 23:47:42 -06:00
munimunigamer
1b8b99eb0b feat: [US-001] - Remove provider-specific routing code
Remove OpenRouter-specific provider routing code. Users can now use
the manual body JSON feature for any provider-specific options like
{ "provider": { "order": ["openai"] } }.

Changes:
- Delete providers.ts (DEFAULT_PROVIDERS list)
- Delete ProviderOnlySelector.svelte component
- Remove providerOnly from GenerationPreset and related types
- Remove providerOnly from apiSettings and all service settings
- Remove provider routing code from generate.ts
- Remove providerOnly handling from requestOverrides.ts
- Update all components to remove providerOptions prop chain
- Update prompt export/import to exclude providerOnly
2026-01-31 23:45:39 -06:00
munimunigamer
faff7495b6 using OpenAICompatible 2026-01-31 21:42:36 -06:00
munimunigamer
769de2995b tier 3 done 2026-01-31 21:14:45 -06:00
munimunigamer
1881cf0ba1 implemented agentic retrieval with sdk 2026-01-31 20:57:06 -06:00
Tony Frazier
e1cd501664 Merge remote-tracking branch 'upstream/vercel-ai-sdk' into vercel-ai-sdk-scenario-service 2026-01-31 21:07:38 -05:00
Tony Frazier
6203502f94 Complete ScenarioService implementation 2026-01-31 21:07:20 -05:00
munimunigamer
12758333c8 completed vercel AI SDK image generation 2026-01-31 19:26:56 -06:00
munimunigamer
b810d9a33b lorebookmanagementservice complete 2026-01-31 19:17:50 -06:00
munimunigamer
57c9517d76 completed style reviewer 2026-01-31 19:09:40 -06:00
munimunigamer
257afd7a93
Merge pull request #60 from Pento95/vercel-ai-sdk
API Profiles UX Improvements (with models fetching)
2026-01-30 21:50:44 -06:00
Kurvaz
e718961a6b Migrate agentic functions 2026-01-30 20:43:17 -07:00
Tony Frazier
99768ab4d4 Merge remote-tracking branch 'upstream/vercel-ai-sdk' into vercel-ai-sdk-scenario-service 2026-01-30 22:10:55 -05:00
Pento
d626a2e0ac Chutes joins the party 2026-01-31 03:55:09 +01:00
Pento
a48d2d719a follow the Gem 2026-01-31 03:38:04 +01:00
Pento
3aa4988591 merge with 'implemented image generation service' Commit e1b2450 2026-01-31 03:27:00 +01:00