From 555061b179b8ec034cb70f9a2dd6c823ced0f637 Mon Sep 17 00:00:00 2001 From: soryu Date: Tue, 23 Dec 2025 14:43:23 +0000 Subject: Add file body and initial tool call system --- makima/frontend/src/routes/files.tsx | 41 +++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'makima/frontend/src/routes') diff --git a/makima/frontend/src/routes/files.tsx b/makima/frontend/src/routes/files.tsx index 86a24b8..00c334d 100644 --- a/makima/frontend/src/routes/files.tsx +++ b/makima/frontend/src/routes/files.tsx @@ -3,8 +3,9 @@ import { useParams, useNavigate } from "react-router"; import { Masthead } from "../components/Masthead"; import { FileList } from "../components/files/FileList"; import { FileDetail } from "../components/files/FileDetail"; +import { CliInput } from "../components/files/CliInput"; import { useFiles } from "../hooks/useFiles"; -import type { FileDetail as FileDetailType } from "../lib/api"; +import type { FileDetail as FileDetailType, BodyElement } from "../lib/api"; export default function FilesPage() { const { id } = useParams<{ id: string }>(); @@ -58,25 +59,45 @@ export default function FilesPage() { [editFile, fetchFile] ); + const handleBodyUpdate = useCallback( + (body: BodyElement[], summary: string | null) => { + if (fileDetail) { + setFileDetail({ + ...fileDetail, + body, + summary, + }); + } + }, + [fileDetail] + ); + return (
-
+
{error && ( -
+
{error}
)} {id && fileDetail ? ( - +
+
+ +
+
+ +
+
) : id && detailLoading ? (
Loading...
-- cgit v1.2.3