15cbe714e0
Deploy / deploy (push) Successful in 6m32s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbMbJPadPzVwvt9rU9GBNo
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
// Client-safe: the tree definition (no database imports).
|
|
/** Your tree of content. Add nodes here; each node pulls its numbers from the areas / taxonomy nodes it lists. */
|
|
export interface ContentNode {
|
|
id: string;
|
|
title: string;
|
|
blurb: string;
|
|
areas: string[]; // work-type areas (areas.id)
|
|
taxonomy: string[]; // taxonomy node ids
|
|
children: ContentNode[];
|
|
}
|
|
|
|
export const CONTENT_TREE: ContentNode = {
|
|
id: 'root',
|
|
title: 'Contents',
|
|
blurb: 'The structure of the survey write-up.',
|
|
areas: [],
|
|
taxonomy: [],
|
|
children: [
|
|
{
|
|
id: 'tools-of-agents',
|
|
title: 'Tools of agents',
|
|
blurb: 'How agents call tools: function calling, MCP, API use and tool-integrated reasoning.',
|
|
areas: ['tool-use'],
|
|
taxonomy: ['agents/tools'],
|
|
children: [],
|
|
},
|
|
],
|
|
};
|
|
|
|
export function findNode(id: string, n: ContentNode = CONTENT_TREE): ContentNode | null {
|
|
if (n.id === id) return n;
|
|
for (const c of n.children) { const f = findNode(id, c); if (f) return f; }
|
|
return null;
|
|
}
|