+ Work Units +
+diff --git a/apps/web/src/components/work-os/conversation-panel.tsx b/apps/web/src/components/work-os/conversation-panel.tsx new file mode 100644 index 0000000..84cd8fb --- /dev/null +++ b/apps/web/src/components/work-os/conversation-panel.tsx @@ -0,0 +1,53 @@ +import { + Conversation, + ConversationContent, +} from "@code/ui/components/ai-elements/conversation"; +import { LoaderCircle, MessagesSquare } from "lucide-react"; + +import { ChatMessage } from "@/components/chat/chat-message"; +import { ChatThinkingResponse } from "@/components/chat/chat-thinking-response"; +import type { ChatAgentState } from "@/lib/chat/types"; + +interface ConversationPanelProps { + readonly agent: ChatAgentState; + readonly title: string; + readonly emptyHint: string; +} + +export const ConversationPanel = ({ + agent, + emptyHint, + title, +}: ConversationPanelProps) => { + if (agent.status === "connecting" && !agent.historyReady) { + return ( +
{title}
++ {emptyHint} +
++ Import a repository to start the Work OS loop. Turn a clear outcome into + a Work Unit that Zopu can start, verify, and review. +
+ +Loading signals…
++ No Signals detected for this project yet. +
+{signal.title}
++ {signal.summary} +
++ {error.message || "Message failed to send"} +
+ ) : null} + +Zopu
++ {selectedProject.name} +
+ ) : ( +No project
+ )} +No Work Units yet
++ Create one above, or describe what you need in the conversation. +
++ No Work Units yet. Create one or chat with Zopu. +
+{os.error}
++ Work Units +
++ Work Unit #{issue.number} +
++ {issue.body} +
+ {canStart ? ( + + ) : null} ++ This work unit needs your input +
++ Resolve the open question or decision to unblock the agent. +
+{detail.latestSummary}
+ + ) : null} + + {/* Signals — no signal-to-issue relation exists yet. Show explicit + unavailable state rather than falsely presenting project Signals. */} + } title="Signals"> ++ No Signals linked to this Work Unit yet. +
++ Linked Signals will appear here once attachment is available. +
+ + + {/* Activity timeline */} + } + title={`Timeline (${detail.stepCount} steps)`} + > + {detail.activity.length > 0 ? ( +{item.label}
++ {item.detail} +
++ {item.time} +
++ No activity recorded yet. +
+ )} + + + {/* Artifacts */} + } + title={`Artifacts (${detail.artifactCount})`} + > + {detail.artifactPaths.length > 0 ? ( ++ No artifacts produced yet. +
+ )} + + + {/* Pull request */} + {detail.hasPullRequest ? ( + } + title="Pull request" + > + {detail.pullRequestUrl ? ( ++ {detail.pullRequestNumber + ? `PR #${detail.pullRequestNumber} ready for review` + : "Pull request ready"} +
+ ++ A pull request was opened but the URL is unavailable. +
+ )} + + ) : null} +