+ {/* Header */}
+
+
📎 Doccy
+
+
+ }
+ onClick={() => setShowSettings(true)}
+ />
+
+
+
+ {/* Recent user changes */}
+ {recentChanges.length > 0 && (
+
+
+ Your Recent Changes
+
+ }
+ action={
+
+ }
+ onClick={() => setRecentChanges([])}
+ />
+
+ }
+ />
+
+ {recentChanges.slice(0, 3).map((change, i) => (
+
+ {change.description}
+
+ ))}
+
+
+ )}
+
+ {/* Messages */}
+
+ {messages.length === 0 && (
+
+
📎
+
+ Hi! I'm Doccy!
+
+
+ It looks like you're writing a document. Would you like help with that?
+
+
+ )}
+
+ {messages.map((message) => (
+
+
{message.content || (isLoading && message.role === 'assistant' ? '...' : '')}
+
+ {/* Patches */}
+ {message.patches && message.patches.length > 0 && (
+
+
+
+ Patches ({message.patches.length})
+
+ {message.patches.map((p, i) => (
+
+
+ {p.success ? (
+
+ ) : (
+
+ )}
+
+ {p.patch.op} {p.patch.path}
+
+
+
+ ))}
+
+ )}
+
+ ))}
+
+ {isLoading && (
+
+
+ Doccy is thinking...
+
+ )}
+
+
+ {/* Input */}
+
+
+ {/* Status bar */}
+
+
+ {trackChanges ? 'Tracking changes' : 'Change tracking off'}
+
+
+ {autoApply ? 'Auto-apply on' : 'Manual apply'}
+
+
+
+ );
+};
diff --git a/word-addin/src/taskpane/index.tsx b/word-addin/src/taskpane/index.tsx
new file mode 100644
index 0000000..5f66766
--- /dev/null
+++ b/word-addin/src/taskpane/index.tsx
@@ -0,0 +1,17 @@
+import * as React from 'react';
+import { createRoot } from 'react-dom/client';
+import { FluentProvider, webLightTheme } from '@fluentui/react-components';
+import { App } from './App';
+
+// Wait for Office.js to be ready
+Office.onReady(() => {
+ const container = document.getElementById('root');
+ if (container) {
+ const root = createRoot(container);
+ root.render(
+