+
+
AI Code Assistant
Please select a project folder to start the Story-Driven Spec
Workflow.
@@ -66,31 +71,8 @@ function App() {
) : (
-
-
-
- Active Project: {projectPath}
-
-
-
-
-
+
+
)}
diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx
index f4f2abd..f2b3f99 100644
--- a/src/components/Chat.tsx
+++ b/src/components/Chat.tsx
@@ -4,7 +4,12 @@ import { listen } from "@tauri-apps/api/event";
import Markdown from "react-markdown";
import { Message, ProviderConfig } from "../types";
-export function Chat() {
+interface ChatProps {
+ projectPath: string;
+ onCloseProject: () => void;
+}
+
+export function Chat({ projectPath, onCloseProject }: ChatProps) {
const [messages, setMessages] = useState
([]);
const [input, setInput] = useState("");
const [loading, setLoading] = useState(false);
@@ -86,56 +91,136 @@ export function Chat() {
display: "flex",
flexDirection: "column",
height: "100%",
- maxWidth: "800px",
- margin: "0 auto",
+ backgroundColor: "#171717",
+ color: "#ececec",
}}
>
- {/* Settings Bar */}
+ {/* Sticky Header */}
-
- {availableModels.length > 0 ? (
-
- ) : (
-
setModel(e.target.value)}
- placeholder="e.g. llama3, mistral"
- style={{ padding: "5px" }}
- />
- )}
-
+
+ {projectPath}
+
+
+
+
+ {/* Model Controls */}
+
+ {availableModels.length > 0 ? (
+
+ ) : (
+ setModel(e.target.value)}
+ placeholder="Model"
+ style={{
+ padding: "6px 12px",
+ borderRadius: "99px",
+ border: "none",
+ fontSize: "0.9em",
+ background: "#2f2f2f",
+ color: "#ececec",
+ outline: "none",
+ }}
+ />
+ )}
+
+
{/* Messages Area */}
@@ -143,109 +228,190 @@ export function Chat() {
style={{
flex: 1,
overflowY: "auto",
- padding: "20px",
+ padding: "20px 0",
display: "flex",
flexDirection: "column",
- gap: "15px",
+ gap: "24px",
}}
>
- {messages.map((msg, idx) => (
-
-
- {msg.role === "user"
- ? "You"
- : msg.role === "tool"
- ? "Tool Output"
- : "Agent"}
-
- {msg.role === "tool" ? (
-
- {msg.content}
-
- ) : (
-
{msg.content}
- )}
-
- {/* Show Tool Calls if present */}
- {msg.tool_calls && (
+
+ {messages.map((msg, idx) => (
+
- {msg.tool_calls.map((tc, i) => (
+ {msg.role === "user" ? (
+ msg.content
+ ) : msg.role === "tool" ? (
+
+
+ Tool Output
+
+
+ {msg.content}
+
+
+ ) : (
+
+ {/* Assuming global CSS handles standard markdown styling now */}
+ {msg.content}
+
+ )}
+
+ {/* Show Tool Calls if present */}
+ {msg.tool_calls && (
- 🛠{" "}
-
- {tc.function.name}({tc.function.arguments})
-
+ {msg.tool_calls.map((tc, i) => (
+
+ Running:
+
+ {tc.function.name}
+
+
+ ))}
- ))}
+ )}
- )}
-
- ))}
- {loading && (
-
- Thinking...
-
- )}
-
+
+ ))}
+ {loading && (
+
+ Thinking...
+
+ )}
+
+
{/* Input Area */}
-
setInput(e.target.value)}
- onKeyDown={(e) => e.key === "Enter" && sendMessage()}
- placeholder="Ask the agent to do something..."
+
-
+
setInput(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && sendMessage()}
+ placeholder="Send a message..."
+ style={{
+ width: "100%",
+ padding: "14px 20px",
+ paddingRight: "50px", // space for button
+ borderRadius: "24px",
+ border: "1px solid #333",
+ outline: "none",
+ fontSize: "1rem",
+ fontWeight: "500",
+ background: "#2f2f2f",
+ color: "#ececec",
+ boxShadow: "0 2px 6px rgba(0,0,0,0.02)",
+ }}
+ />
+
+
);