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
This commit is contained in:
munimunigamer 2026-02-12 23:35:16 -06:00
parent 887c0f55ef
commit 39a84bee8e
5 changed files with 263 additions and 3 deletions

View file

@ -2644,6 +2644,15 @@ class DatabaseService {
return results[0].count === 0
}
async getPackUsageCount(packId: string): Promise<number> {
const db = await this.getDb()
const results = await db.select<any[]>(
'SELECT COUNT(*) as count FROM stories WHERE pack_id = ?',
[packId],
)
return results[0].count
}
// ===== Pack Template Operations =====
async getPackTemplates(packId: string): Promise<PackTemplate[]> {