Finalize remaining repo updates

This commit is contained in:
Advait Paliwal
2026-03-24 14:30:09 -07:00
parent 771b39cbba
commit 21b8bcd4c4
13 changed files with 369 additions and 87 deletions

View File

@@ -27,8 +27,13 @@ export const FEYNMAN_RESEARCH_TOOLS = [
"preview_file",
];
export function collapseExcessBlankLines(text: string): string {
return text.replace(/\r\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
}
export function formatToolText(result: unknown): string {
return typeof result === "string" ? result : JSON.stringify(result, null, 2);
const text = typeof result === "string" ? result : JSON.stringify(result, null, 2);
return collapseExcessBlankLines(text);
}
export function getFeynmanHome(): string {