mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-10 19:42:21 +00:00
fix(native): render plan proposals inline
Render ExitPlanMode and exit_plan_mode Markdown from input.plan in iOS and Android conversations. Preserve approvals, raw source and diagnostics while hiding empty output placeholders and prewarming plan documents. Add generated protocol fixtures and native regression coverage for long plans, live updates, recycling, themes and typography.
This commit is contained in:
@@ -4,7 +4,7 @@ import HapiUI
|
||||
import SwiftUI
|
||||
|
||||
/// A bounded activity summary. Ordinary tools open the shared inspector;
|
||||
/// sidechains open their own transcript. Questions and approvals stay inline.
|
||||
/// sidechains open their own transcript. Questions, plans and approvals stay inline.
|
||||
struct ToolCallBlockView: View {
|
||||
let block: ToolCallBlock
|
||||
let basePath: String?
|
||||
@@ -27,6 +27,11 @@ struct ToolCallBlockView: View {
|
||||
let presentation = toolSummaryPresentation(block.tool, basePath: basePath)
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
headerRow(presentation)
|
||||
if let plan = planProposalMarkdown(block.tool) {
|
||||
PlanProposalContent(markdown: plan)
|
||||
.padding(12)
|
||||
.accessibilityIdentifier("plan-proposal-\(block.id)")
|
||||
}
|
||||
if let permission = block.tool.permission {
|
||||
if permission.status == .pending, let interactions {
|
||||
pendingApprovalSection(permission: permission, interactions: interactions)
|
||||
|
||||
Reference in New Issue
Block a user