diff --git a/pyproject.toml b/pyproject.toml index 4408913..e66c942 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-dev" -version = "0.0.61" +version = "0.0.62" description = "UiPath Developer Console" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/src/uipath/dev/server/frontend/src/components/agent/AgentChatSidebar.tsx b/src/uipath/dev/server/frontend/src/components/agent/AgentChatSidebar.tsx index 863546b..abe0130 100644 --- a/src/uipath/dev/server/frontend/src/components/agent/AgentChatSidebar.tsx +++ b/src/uipath/dev/server/frontend/src/components/agent/AgentChatSidebar.tsx @@ -86,6 +86,15 @@ export default function AgentChatSidebar() { const isBusy = status === "thinking" || status === "executing" || status === "planning"; + const textareaRef = useRef(null); + + const resetTextareaHeight = () => { + const ta = textareaRef.current; + if (!ta) return; + ta.style.height = "auto"; + ta.style.height = Math.min(ta.scrollHeight, 200) + "px"; + }; + const handleSend = useCallback(() => { const text = input.trim(); if (!text || !selectedModel || isBusy) return; @@ -93,6 +102,11 @@ export default function AgentChatSidebar() { addUserMessage(text); ws.sendAgentMessage(text, selectedModel, sessionId, selectedSkillIds); setInput(""); + // Reset textarea height after send + requestAnimationFrame(() => { + const ta = textareaRef.current; + if (ta) ta.style.height = "auto"; + }); }, [input, selectedModel, isBusy, sessionId, selectedSkillIds, addUserMessage, ws]); const handleStop = useCallback(() => { @@ -164,9 +178,15 @@ export default function AgentChatSidebar() { className="h-full overflow-y-auto px-3 py-2 space-y-0.5" > {messages.length === 0 && ( -

- No messages yet -

+
+ + + +
+

Ask the agent to help you code

+

Create agents, functions, evaluations,
or ask questions about your project.

+
+
)} {messages.map((msg) => ( @@ -196,24 +216,29 @@ export default function AgentChatSidebar() { )} - {/* Input — matches ChatInput from debug view */} + {/* Input */}
- setInput(e.target.value)} + onChange={(e) => { + setInput(e.target.value); + resetTextareaHeight(); + }} onKeyDown={handleKeyDown} disabled={isBusy || !selectedModel} placeholder={isBusy ? "Waiting for response..." : "Message..."} - className="flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)]" - style={{ color: "var(--text-primary)" }} + rows={2} + className="flex-1 bg-transparent text-sm py-1 disabled:opacity-40 placeholder:text-[var(--text-muted)] resize-none" + style={{ color: "var(--text-primary)", maxHeight: 200, overflow: "auto" }} /> + )} + {visibleCalls.map((tc, i) => ( + ))}
diff --git a/src/uipath/dev/server/frontend/src/components/shared/ReloadToast.tsx b/src/uipath/dev/server/frontend/src/components/shared/ReloadToast.tsx index 51a4c34..7cdcd4e 100644 --- a/src/uipath/dev/server/frontend/src/components/shared/ReloadToast.tsx +++ b/src/uipath/dev/server/frontend/src/components/shared/ReloadToast.tsx @@ -26,7 +26,7 @@ export default function ReloadToast() {
- Files changed — reload to apply + Files changed, reload to apply