Repository navigation
Description
Parent
OPE-46 — Assistant Tool Parts
What to build
Make ToolPart a structured domain concept on iOS and Android so later tool cards have real data to render, without changing Session Chat visuals yet.
A ToolPart is a named tool call with:
- tool status:
pending|running|completed|error(missing/unrecognized server status →pending) - tool name
- optional running title, error text, and call id
- opaque string-keyed input and metadata maps
- optional string output
Do not store emoji/status strings on ToolPart. Keep a domain-side compact label formatter that builds temporary display labels (⌛ / ⏳ / ✓ / ✕) for Message.text so chat still looks the same until tool cards land.
Omit raw, tool timing, and attachments from the domain ToolPart in this ticket (DTOs may still parse them). Add Android tool-state metadata parity with iOS. Preserve rich metadata now (for example edit filediff); keep compact labels dumb (✓ edit) until file-change cards use that metadata.
Acceptance criteria
- ToolPart no longer treats a preformatted status string as its meaning; tool status is explicit.
- ToolPart carries name, status, optional title/error/call id, opaque input/metadata maps, and optional string output on both platforms.
- Missing or unrecognized server status maps to
pending. - Domain-side formatter produces the existing-style compact emoji labels; those labels are not stored on ToolPart.
-
Message.textstill joins text parts with formatter-built tool labels so Session Chat looks unchanged. - Android tool-state DTO includes metadata parity with iOS; domain omits raw/time/attachments.
- Unit coverage for representative pending/running/completed/error mappings, including completed edit-style metadata preserved while the compact label stays simple.
- Glossary/docs stay aligned (
CONTEXT.md,docs/features/assistant-tool-parts/).
Blocked by
None.
Docs: docs/features/assistant-tool-parts/
Research: docs/research/opencode-assistant-tool-messages.md
Branch: feature/ope-48-structured-tool-parts-in-the-domain
PR: ivanfenenko/opencode-mobile#40
Imported from Linear OPE-48. Linear status: Done. Priority: High. Created 2026-07-15. Completed 2026-07-15.
Parent: OPE-46.
Related: OPE-49.
Activity