Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the existing readline-based CLI with an Ink/React-driven UI, centralizing message handling and rendering in a React component.
- Integrates Ink and React to render CLI interactions
- Moves message state and rendering into
CLIUIand a newAppcomponent - Removes manual stdin handling and prompt-redraw logic
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/plugins/cli-ui/init.ts | Swaps out readline for Ink, adds message queue, renderUI |
| src/plugins/cli-ui/components/App.tsx | New Ink-based React component for CLI UI |
| package.json | Adds ink, react, @types/react and updates dev script |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
src/plugins/cli-ui/init.ts:83
- You're deregistering the "ui/message-received" event in unload(), but this event isn’t registered in load(). Either remove this call or add a corresponding athena.registerEvent in load().
athena.deregisterEvent("ui/message-received");
src/plugins/cli-ui/init.ts:47
- The plugin emits "ui/message-received" but never registers that event. Consider adding athena.registerEvent("ui/message-received") in load() to formally declare it.
athena.registerTool(
src/plugins/cli-ui/components/App.tsx:1
- This new Ink-based component isn’t covered by any tests. Consider adding unit or integration tests to validate input handling and rendering behavior under different message flows.
import React, { useState } from 'react';
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new UI implementation for the CLI plugin by integrating Ink and React. The changes remove the previous readline-based logic and add a new React component to handle input and rendering, while updating package dependencies and dev scripts accordingly.
- Replace legacy terminal input handling with a React/Ink-based UI.
- Add a new App component for rendering messages and input.
- Update package.json to include Ink and React dependencies and modify the dev script.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/plugins/cli-ui/init.ts | Replaces readline-based behaviors with Ink methods |
| src/plugins/cli-ui/components/App.tsx | New React component to manage CLI UI with Ink |
| package.json | Updates dependencies and dev script for Ink usage |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
No description provided.