continue scaffolding and refine the basic foundation

This commit is contained in:
Zoe
2026-01-13 19:56:24 +00:00
parent 0877cc10bd
commit 8c28946703
37 changed files with 1431 additions and 509 deletions
+4 -6
View File
@@ -3,18 +3,16 @@ import type { Agent } from '~~/types'
export const useAgents = async () => {
const { addTask, completeTask } = useTasks()
const appState = useAppState()
const fetchingAgents = ref(false);
const agents: Ref<Agent[] | null> = useState('agents', () => null);
const activeAgent = computed(() => {
if (agents.value === null) return;
if (!appState.activeAgentId.value) return;
const routeId = useRoute().params.id;
if (routeId === undefined) return;
const agent = agents.value.find(agent => agent.id === routeId);
if (agent === undefined) return;
const agent = agents.value.find(agent => agent.id === appState.activeAgentId.value);
return agent;
});