From c386a1acfab0db99af57a9a18a49c72b89184f15 Mon Sep 17 00:00:00 2001
From: Clawd
';
- return html;
-}
-
-function renderMarkdown(md: string): string {
- // First, handle tables (before other transformations)
- const lines = md.split("\n");
- const processedLines: string[] = [];
- let tableBuffer: string[] = [];
- let inTable = false;
-
- for (const line of lines) {
- const isTableLine = /^\|.*\|$/.test(line.trim());
-
- if (isTableLine) {
- inTable = true;
- tableBuffer.push(line);
- } else {
- if (inTable && tableBuffer.length > 0) {
- processedLines.push(renderTable(tableBuffer));
- tableBuffer = [];
- inTable = false;
- }
- processedLines.push(line);
- }
- }
-
- // Handle table at end of content
- if (tableBuffer.length > 0) {
- processedLines.push(renderTable(tableBuffer));
- }
-
- let result = processedLines.join("\n");
-
- return (
- result
- // Headers
- .replace(/^### (.*$)/gm, "';
- headerCells.forEach((cell) => {
- html += ` ';
-
- bodyRows.forEach((row) => {
- if (row.trim()) {
- html += '${cell} `;
- });
- html += '';
- parseRow(row).forEach((cell) => {
- html += ` ';
- }
- });
-
- html += '${cell} `;
- });
- html += '$1
")
- .replace(/^## (.*$)/gm, "$1
")
- .replace(/^# (.*$)/gm, "$1
")
- // Bold/italic
- .replace(/\*\*([^*]+)\*\*/g, "$1")
- .replace(/\*([^*]+)\*/g, "$1")
- // Code blocks
- .replace(
- /```(\w*)\n([\s\S]*?)```/g,
- '
'
- )
- .replace(/`([^`]+)`/g, "$2$1")
- // Lists
- .replace(/^- \[x\] (.*$)/gm, '
") - .replace(/^(.+)$/gm, "
$1
") - // Clean up - .replace(/<\/p>/g, "") - .replace(/
( ( ( (
- A structured workflow for AI-assisted coding: Research → Plan → Implement.
+ A structured workflow for AI-assisted coding:{" "}
+ Research → Plan → Implement.
Export your Anthropic API key: Get one at platform.claude.com
+ Get one at{" "}
+
+ platform.claude.com
+
+ Research: Claude analyzes your codebase and writes findings to Plan: Claude drafts an implementation plan in Implement: Claude executes the plan, marking tasks complete as it goes.
+ Research: Claude analyzes your codebase and writes
+ findings to
+ Plan: Claude drafts an implementation plan in{" "}
+
+ Implement: Claude executes the plan, marking tasks
+ complete as it goes.
+ Iterate on research and plan docs as long as you want. Click Submit when happy to move to the next phase.
+ Iterate on research and plan docs as long as you want. Click{" "}
+ Submit when happy to move to the next phase.
+
+ Document will appear here after Claude generates it...
+ )/g, "$1")
- .replace(/(<\/pre>)<\/p>/g, "$1")
- .replace(/
)/g, "$1")
- .replace(/(<\/table>)<\/p>/g, "$1")
- );
-}
-
export function DocumentPane({
content,
onChange,
@@ -119,7 +19,6 @@ export function DocumentPane({
showOnboarding,
}: DocumentPaneProps) {
const [isEditing, setIsEditing] = useState(false);
- const renderedHtml = useMemo(() => renderMarkdown(content), [content]);
if (showOnboarding) {
return (
@@ -130,27 +29,61 @@ export function DocumentPane({
Claude Flow
Setup
- export ANTHROPIC_API_KEY=your-key-here
+
+ export ANTHROPIC_API_KEY=your-key-here
+ Getting Started
-
Workflow
- research.md. Add notes like // REVIEW: check this — click Review when done.plan.md with code snippets and a TODO list. Iterate the same way.research.md. Add notes like{" "}
+ // REVIEW: check this — click Review{" "}
+ when done.
+ plan.md with code snippets and a TODO list. Iterate the
+ same way.
+