Skip to content

feat: use ink#19

Merged
yvbbrjdr merged 8 commits into
masterfrom
ink
May 19, 2025
Merged

feat: use ink#19
yvbbrjdr merged 8 commits into
masterfrom
ink

Conversation

@himself65

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 19, 2025 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CLIUI and a new App component
  • 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';

Comment thread src/plugins/cli-ui/init.ts Outdated
Comment thread src/plugins/cli-ui/components/App.tsx Outdated
Comment thread src/plugins/cli-ui/components/App.tsx Outdated
himself65 and others added 2 commits May 19, 2025 12:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread package.json Outdated
@himself65 himself65 requested review from Copilot and yvbbrjdr May 19, 2025 19:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/plugins/cli-ui/components/App.tsx
Comment thread package.json
@yvbbrjdr yvbbrjdr merged commit 9da5f8c into master May 19, 2025
2 checks passed
@yvbbrjdr yvbbrjdr deleted the ink branch May 19, 2025 21:00
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.

3 participants