A personal agent with a browser, terminal, files, and work that keeps going built with CopilotKit and AG-UI.
TypeScript
import MarkdownIt from "markdown-it";
export const assistantMarkdown = new MarkdownIt({
html: false,
linkify: true,
breaks: true,
typographer: false,
});
export function isSafeAssistantUrl(value: string): boolean {
try {
const url = new URL(value);
return (url.protocol === "http:" || url.protocol === "https:") && !!url.hostname;
} catch {
return false;
}
}