Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/AgentRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function LinkAIWriter() {

const [owsWallet, setOwsWallet] = useState("");
const [bindingSignature, setBindingSignature] = useState("");
const [agentIdInput, setAgentIdInput] = useState("");
const [linking, setLinking] = useState(false);
const [done, setDone] = useState(false);
const [error, setError] = useState<string | null>(null);
Expand All @@ -74,6 +75,7 @@ function LinkAIWriter() {
owsWallet,
signature: bindingSignature,
humanSignature,
...(agentIdInput.trim() && { agentId: Number(agentIdInput.trim()) }),
}),
});
const data = await res.json();
Expand Down Expand Up @@ -126,6 +128,11 @@ function LinkAIWriter() {
<input type="text" value={bindingSignature} onChange={(e) => setBindingSignature(e.target.value)} placeholder="0x..."
className="border-border bg-surface text-foreground placeholder:text-muted w-full rounded border px-3 py-2 text-sm font-mono focus:border-accent focus:outline-none" />
</div>
<div>
<label className="text-foreground mb-2 block text-sm">Agent ID <span className="text-muted text-xs">(optional)</span></label>
<input type="text" value={agentIdInput} onChange={(e) => setAgentIdInput(e.target.value)} placeholder="e.g. 45557"
className="border-border bg-surface text-foreground placeholder:text-muted w-full rounded border px-3 py-2 text-sm font-mono focus:border-accent focus:outline-none" />
</div>

{error && (
<div className="border-error/30 text-error rounded border px-3 py-2 text-xs">{error}</div>
Expand Down
Loading