0ad8e472f7
When the AI updates a category (or any tool result), the transactions page now automatically reloads. ChatPanel triggers a refresh counter in the usePageContext composable when the response includes a tool result, and TransactionsView watches that counter to reload data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
422 B
TypeScript
21 lines
422 B
TypeScript
import { ref } from 'vue'
|
|
|
|
const pageContext = ref('')
|
|
const refreshTrigger = ref(0)
|
|
|
|
export function usePageContext() {
|
|
function setPageContext(context: string) {
|
|
pageContext.value = context
|
|
}
|
|
|
|
function clearPageContext() {
|
|
pageContext.value = ''
|
|
}
|
|
|
|
function triggerRefresh() {
|
|
refreshTrigger.value++
|
|
}
|
|
|
|
return { pageContext, setPageContext, clearPageContext, refreshTrigger, triggerRefresh }
|
|
}
|