feat: memory v2, prompt styles, Dream/GAZE integration, Wyoming TTS fix
SQLite + sqlite-vec replaces JSON memory files with semantic search, follow-up injection, privacy levels, and lifecycle management. Six prompt styles (quick/standard/creative/roleplayer/game-master/storyteller) with per-style Claude model tiering (Haiku/Sonnet/Opus), temperature control, and section stripping. Characters can set default style and per-style overrides. Dream character import and GAZE character linking in the dashboard editor with auto-populated fields, cover image resolution, and preset assignment. Bridge: session isolation (conversation_id / 12h satellite buckets), model routing refactor, PUT/DELETE support, memory REST endpoints. Dashboard: mobile-responsive sidebar, retry button, style picker in chat, follow-up banner, memory lifecycle/privacy UI, cloud model options in editor. Wyoming TTS: upgraded to v1.8.0 for HA 1.7.2 compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
34
homeai-dashboard/src/hooks/usePromptStyle.js
Normal file
34
homeai-dashboard/src/hooks/usePromptStyle.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import { useState, useEffect, useCallback } from 'react'
|
||||
import { getPromptStyles, getActiveStyle, setActiveStyle } from '../lib/api'
|
||||
|
||||
export function usePromptStyle() {
|
||||
const [styles, setStyles] = useState([])
|
||||
const [activeStyle, setActive] = useState('standard')
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false
|
||||
Promise.all([getPromptStyles(), getActiveStyle()])
|
||||
.then(([allStyles, active]) => {
|
||||
if (cancelled) return
|
||||
setStyles(allStyles)
|
||||
setActive(active.style || 'standard')
|
||||
setIsLoading(false)
|
||||
})
|
||||
.catch(() => {
|
||||
if (!cancelled) setIsLoading(false)
|
||||
})
|
||||
return () => { cancelled = true }
|
||||
}, [])
|
||||
|
||||
const selectStyle = useCallback(async (styleId) => {
|
||||
setActive(styleId)
|
||||
try {
|
||||
await setActiveStyle(styleId)
|
||||
} catch (err) {
|
||||
console.error('Failed to set prompt style:', err)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return { styles, activeStyle, selectStyle, isLoading }
|
||||
}
|
||||
Reference in New Issue
Block a user