Skip to content

OPE-48: Structured tool parts in the domain #562

Closed

Description

@ivanfenenko

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.text still 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

  1. self-assigned this
    on Oct 11, 2026
  2. added
    enhancement
    on Oct 11, 2026
  3. added
    ios
    android
    shared
    priority: high
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

androidenhancementiospriority: highshared

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions