mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-05-01 05:10:15 +00:00
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:
parent
887c0f55ef
commit
39a84bee8e
5 changed files with 263 additions and 3 deletions
|
|
@ -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[]> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue