Skip to content

feat: add type describe command and fix terminal output issues#11

Merged
github-actions[bot] merged 1 commit intomainfrom
feat/type-describe
Jan 28, 2026
Merged

feat: add type describe command and fix terminal output issues#11
github-actions[bot] merged 1 commit intomainfrom
feat/type-describe

Conversation

@adamhjk
Copy link
Copy Markdown
Contributor

@adamhjk adamhjk commented Jan 28, 2026

Summary

  • Add type describe <type> command that displays model type details including schemas and methods
  • Fix terminal output issues that were causing scrollback destruction and missing trailing newlines

Changes

New type describe command

  • Displays type name, version, input/resource attribute schemas, and method definitions
  • Supports both interactive (colored markdown-style) and JSON output modes
  • Converts Zod schemas to JSON Schema format for display

Terminal output fixes

  • Use ink-testing-library's render to capture output as string instead of writing directly to stdout
  • Print via console.log() to ensure trailing newline (prevents zsh % marker)
  • Avoids Ink's clearTerminal code path which was destroying scrollback history

Test plan

  • deno run dev type describe swamp/echo - displays type info
  • deno run dev type describe swamp/echo --json - outputs JSON
  • deno run dev version - no duplicate output, proper newline
  • All 224 tests pass

🤖 Generated with Claude Code

Add `type describe <type>` command that displays model type details including:
- Type name and version
- Input and resource attribute schemas (as JSON Schema)
- Method definitions with their input schemas

Fix terminal output issues across all interactive output functions:
- Use ink-testing-library's render to capture output to string
- Print via console.log to ensure trailing newline (prevents zsh % marker)
- Avoids Ink's clearTerminal which was destroying scrollback history

Files changed:
- New: src/cli/commands/type_describe.ts - command implementation
- New: src/cli/commands/type_describe_test.ts - command tests
- New: src/presentation/output/type_describe_output.tsx - output component
- New: src/presentation/output/type_describe_output_test.tsx - component tests
- Modified: src/cli/mod.ts - register type command
- Modified: design/models.md - document type describe command
- Modified: All *_output.tsx files - use ink-testing-library for rendering
@github-actions github-actions bot merged commit 81d6431 into main Jan 28, 2026
3 checks passed
@adamhjk adamhjk deleted the feat/type-describe branch January 29, 2026 06:35
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