Skip to content

refactor(chat): update agentic context UI #7908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented May 12, 2025

CLOSE https://linear.app/sourcegraph/issue/CODY-5794/update-agentic-context-ui

Highlights

  • Updates the ToolStatusCallback interface to provide more control over step updates.
  • Adds a Step process type to better represent high-level process statuses in the UI.
  • Enhances the ProcessManager to handle process updates and completion more effectively, including error reporting and context item association.
  • Refactors the AgenticContextCell component to provide a cleaner and more informative display of agentic chat processes, including status indicators and tool information.
  • Improves the DeepCodyAgent to streamline context retrieval and reflection, providing more granular control over the context optimization process.
  • Adds storybook stories for different agentic context states.

Test plan

Check storybook, or ask Cody a question connected to S2 and verified the new UI is showing up:

image

abeatrix added 2 commits May 12, 2025 13:32
Highlights

- Updates the `ToolStatusCallback` interface to provide more control over step updates.
- Adds a `Step` process type to better represent high-level process statuses in the UI.
- Enhances the `ProcessManager` to handle process updates and completion more effectively, including error reporting and context item association.
- Refactors the `AgenticContextCell` component to provide a cleaner and more informative display of agentic chat processes, including status indicators and tool information.
- Improves the `DeepCodyAgent` to streamline context retrieval and reflection, providing more granular control over the context optimization process.
- Adds storybook stories for different agentic context states.
- Displaying a clear "Retrieving context" message while context is loading.
- Showing the title of the last "deep-cody" process, if available, to provide more context on the current action.
- Adding a "FAILED" indicator when any process step has an error.
- Displaying the number of selected context items for tool steps.
- Removing the bottom border from the last action row for a cleaner look.
- Adding several new storybook stories to showcase different states of the component.
@abeatrix abeatrix requested review from alexromano and a team May 12, 2025 20:44
abeatrix added 5 commits May 13, 2025 13:40
This commit introduces the display of context items within the agentic context cell in the chat interface. It also enhances the visual representation of the context retrieval process by providing more informative titles and icons based on the state of the retrieval (success, error, loading, or none).

The changes include:

- Displaying context items (files) in the AgenticContextCell.
- Updating the AgenticContextCell to display more informative titles based on the context retrieval status.
- Adding icons to the action rows to indicate the status of each action (success or error).
- Updating the AgenticContextCell stories to reflect the new UI and states.
This commit updates the chat transcript to hide the context cell when in agentic mode and no context items are available. This prevents an empty context cell from being displayed, improving the user experience.
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