Skip to content

feat: add thinking-process artifact component#17

Merged
juliarvalenti merged 1 commit intomainfrom
review/thinking-process-clean
Feb 12, 2026
Merged

feat: add thinking-process artifact component#17
juliarvalenti merged 1 commit intomainfrom
review/thinking-process-clean

Conversation

@juliarvalenti
Copy link
Collaborator

Summary

Fixes Applied

  • types.ts: Named zod import ({ z }), exported ReasoningStepZod/StepMetricZod/ProcessStepStatusZod with .describe() annotations; removed unnecessary ArtifactTabZod discriminated union; added ReasoningStep/StepMetric type exports
  • action.ts: Added Zod validation for stepsJson/metricsJson parsing; use direct ThinkingProcessArtifact["data"] type instead of Extract<ArtifactTab, ...>; removed unnecessary try/catch
  • index.ts: Added missing THINKING_PROCESS_DESCRIPTION, ReasoningStepZod, StepMetricZod exports
  • Registry: Added entries to artifacts.ts and artifacts.json

Files

hax/artifacts/thinking-process/
├── thinking-process.tsx   # Card with collapsible agent reasoning, step indicators, metrics
├── types.ts               # Zod schemas with .describe() annotations
├── action.ts              # CopilotKit hook with Zod validation
├── description.ts         # AI prompt guidance
├── index.ts               # Barrel exports
└── README.md              # Documentation

Test plan

  • hax add artifact thinking-process installs correctly
  • Component renders with sample step data (completed/in-progress/pending/error)
  • CopilotKit action create_thinking_process works with AI agents
  • Collapsible reasoning section toggles correctly

Fixes applied to original PR #5:
- types.ts: named zod import, exported sub-schemas, .describe() annotations, removed ArtifactTabZod
- action.ts: Zod validation on parsed JSON, direct type reference
- index.ts: added description and sub-schema exports

Signed-off-by: Julia Valenti (julvalen) <julvalen@cisco.com>
@juliarvalenti juliarvalenti force-pushed the review/thinking-process-clean branch from 9f925d7 to ff8769f Compare February 12, 2026 20:21
@juliarvalenti juliarvalenti merged commit e9f19b0 into main Feb 12, 2026
2 checks passed
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.

1 participant