Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Oct 30, 2025

Adds optional URL parameter to status_set tool for linking to external resources (e.g., Pull Request URLs).

When URL is provided:

  • Stored with agent status until replaced
  • Displayed in status tooltip
  • Emoji becomes clickable, opens URL in new tab
status_set({
  emoji: "🔗",
  message: "PR #123 submitted",
  url: "https://github.com/owner/repo/pull/123"
});

Generated with cmux

- Add optional url parameter to status_set tool definition
- Update backend to handle and return URL in results
- Store URL in StreamingMessageAggregator with agent status
- Make emoji clickable when URL present, opens in new tab
- Display URL in status tooltip below message
- Add comprehensive tests for URL parameter handling
- URL persists until replaced by new status (no-op if same URL)

Generated with `cmux`
Previously, calling status_set without a URL would clear the stored URL.
Now, the URL persists until explicitly replaced with a different URL.

- Updated StreamingMessageAggregator to preserve previous URL
- Updated test to verify URL persistence behavior
- Clarified tool description
Introduced lastStatusUrl field to track the most recent URL set via
status_set, ensuring it persists even when agentStatus is cleared by
new user messages.

- URL now persists across stream boundaries until explicitly replaced
- Added TDD test to verify URL persistence after status clear
- All 15 status tests passing

This ensures the URL remains available throughout a conversation, even
when status is cleared between user/assistant turns.
Instead of inline type assertion, import and use the StatusSetToolResult
type with Extract utility type to ensure consistency with the actual
tool result type definition.
Moved StatusSetToolResult type definition from services to src/types/tools.ts
to avoid frontend importing from services layer. This maintains proper
architectural boundaries where frontend code (utils/messages, stores) can
import types without importing service implementations.

- Added url field to StatusSetToolArgs and StatusSetToolResult in types
- Updated status_set service to import type from @/types/tools
- Updated StreamingMessageAggregator to import from @/types/tools
- All tests passing, architectural boundaries respected
Added comment explaining why src/utils/** and src/stores/** are not
included in the frontend services import restriction. These directories
have legitimate reasons to import from services (tool registry) or are
safe when using type-only imports (which now come from src/types/).
@ammario ammario merged commit 29bdd8e into main Oct 30, 2025
13 checks passed
@ammario ammario deleted the feat-status-url branch October 30, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants