chore: ai, public course and other ui improvements

This commit is contained in:
Rotimi Best
2026-05-09 06:05:03 +01:00
parent 5717dd8004
commit c31ad63955
318 changed files with 20668 additions and 4788 deletions
@@ -12,12 +12,18 @@ export interface AgentToolPart {
};
}
export function isAgentToolPart(part: Record<string, unknown>): part is AgentToolPart {
if (part.type === 'tool-invocation') {
export function isAgentToolPart(part: unknown): part is AgentToolPart {
if (!part || typeof part !== 'object') {
return false;
}
const record = part as Record<string, unknown>;
if (record.type === 'tool-invocation') {
return true;
}
return typeof part.type === 'string' && part.type.startsWith('tool-');
return typeof record.type === 'string' && record.type.startsWith('tool-');
}
export function getAgentToolName(part: AgentToolPart): string | null {