Skip to content

Update thinking display logic, fix async new tasks - #19

Merged
declan-scale merged 4 commits into
mainfrom
declan-scale/thinking-logic
Oct 29, 2025
Merged

Update thinking display logic, fix async new tasks#19
declan-scale merged 4 commits into
mainfrom
declan-scale/thinking-logic

Conversation

@declan-scale

@declan-scale declan-scale commented Oct 29, 2025

Copy link
Copy Markdown
Collaborator

Changes

  • When sending a task/create also send a event/send to async agents
  • Update the logic to display Thinking...
    • Must be the last user message
    • Must not have any agent messages
    • Must be waiting for messages over stream or rpc
  • Remove some comments
  • Remove unused stream status logic
  • Fix issue with async tasks not being streamed on the first message

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 improves the thinking display logic and fixes async task creation for agents. The changes ensure "Thinking..." appears correctly based on task state and implements proper async agent communication.

  • Updates thinking display logic to check for last user message without agent responses and RPC status
  • Adds RPC status tracking to TaskMessagesData to manage async operations properly
  • Simplifies code by removing unused stream status logic and comments

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
agentex-ui/hooks/use-task-subscription.ts Removes unused stream status hook and adds RPC status management to task message subscription
agentex-ui/hooks/use-task-messages.ts Adds rpcStatus field to TaskMessagesData and exports the type for broader use
agentex-ui/components/agentex/task-messages.tsx Updates thinking display logic to use new shouldShowThinkingForLastPair function
agentex-ui/components/agentex/prompt-input.tsx Removes unused agent dependency and simplifies task creation logic
Comments suppressed due to low confidence (1)

agentex-ui/components/agentex/task-messages.tsx:1

  • The exit animation property was removed but the line remains in the diff. This appears to be an incomplete removal that should be cleaned up.
import { Fragment, memo, useEffect, useMemo, useRef, useState } from 'react';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agentex-ui/hooks/use-task-messages.ts
Comment thread agentex-ui/components/agentex/task-messages.tsx
@declan-scale
declan-scale force-pushed the declan-scale/thinking-logic branch from d48df7d to de298cc Compare October 29, 2025 18:51
@declan-scale
declan-scale merged commit 2df329a into main Oct 29, 2025
3 checks passed
@declan-scale
declan-scale deleted the declan-scale/thinking-logic branch October 29, 2025 21:44
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