Skip to content

feat: add experimental Chat UI #17650

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

Merged
merged 1 commit into from
May 13, 2025
Merged

feat: add experimental Chat UI #17650

merged 1 commit into from
May 13, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented May 1, 2025

Builds on #17570

Frontend portion of https://github.com/coder/coder/tree/chat originally authored by @kylecarbs

Additional changes:

  • Addresses linter complaints
  • Brings ChatToolInvocation argument definitions in line with those defined in codersdk/toolsdk
  • Ensures chat-related features are not shown unless ExperimentAgenticChat is enabled.

@johnstcn johnstcn self-assigned this May 1, 2025
@johnstcn johnstcn changed the title Cj/rebase/chat UI wip: rebase chat UI May 1, 2025
@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch 2 times, most recently from 9cc72d3 to e7559c3 Compare May 2, 2025 12:02
@johnstcn johnstcn force-pushed the cj/rebase/chat branch 2 times, most recently from a7d6a2f to 54a20db Compare May 2, 2025 13:47
@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch 2 times, most recently from 6a805f9 to ae9fbc0 Compare May 2, 2025 16:12
@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch from ae9fbc0 to 9a3fcc9 Compare May 2, 2025 16:14
Base automatically changed from cj/rebase/chat to main May 2, 2025 16:29
@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch from 9a3fcc9 to 942741e Compare May 2, 2025 16:32
@johnstcn johnstcn changed the title wip: rebase chat UI feat(site): add chat UI May 2, 2025
@johnstcn johnstcn requested a review from kylecarbs May 2, 2025 17:31
@johnstcn johnstcn marked this pull request as ready for review May 2, 2025 17:31
@johnstcn johnstcn changed the title feat(site): add chat UI feat: add experimental Chat UI May 2, 2025
Comment on lines 49 to 50
args: unknown;
result?: unknown;
Copy link
Member Author

Choose a reason for hiding this comment

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

review: changed to unknown to avoid any

@@ -717,11 +708,12 @@ const FilePreview: FC<{ files: Record<string, string>; prefix?: string }> =
);
});

// TODO: generate these from codersdk/toolsdk.go.
Copy link
Member Author

Choose a reason for hiding this comment

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

review: ideally these would be autogenerated, but deferring this for now

Comment on lines +27 to +32
export interface ChatContext {
selectedModel: string;
modelConfig: LanguageModelConfig;

setSelectedModel: (model: string) => void;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

review: Ideally I'd like to move this into useAgenticChat but ran out of time.

@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch 2 times, most recently from cb80800 to e29b101 Compare May 12, 2025 12:02
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

Overall, it is ok and I didn't find anything that could cause major bugs or bad user experiences. However, we are not following some FE agreements we did like using the new shadcn components, TailwindCSS for styles, or Lucide icons.

I also think the design is not the best when dealing with error handling and loading states. We probably could make a better use of design work here to be honest, but I'm not sure how urgent this release is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would move this file to sites/src/modules/chat/useAgenticChat.ts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Even though it's imported in modules/dashboard/NavBar/NavbarView?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeap! I think it makes more sense. But no strong thoughts, you can leave as it is if it makes more sense to you.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to leave it where it is for now; I think there's more scope to refactor here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this should be included in the scope of this PR, but all the new pages and components are made using shadcn/ui components, TailwindCSS styles, and Lucide icons as part of our redesign effort.

@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch 2 times, most recently from 5fb99bd to 5f2536f Compare May 13, 2025 15:59
Builds on #17570

Frontend portion of https://github.com/coder/coder/tree/chat originally
authored by @kylecarbs

Additional changes:
- Addresses linter complaints
- Brings `ChatToolInvocation` argument definitions in line with those
defined in `codersdk/toolsdk`
- Ensures chat-related features are not shown unless
`ExperimentAgenticChat` is enabled.

Co-authored-by: Kyle Carberry <[email protected]>
@johnstcn johnstcn force-pushed the cj/rebase/chat-ui branch from 5f2536f to 8b48872 Compare May 13, 2025 16:07
@johnstcn johnstcn merged commit a1c03b6 into main May 13, 2025
28 of 29 checks passed
@johnstcn johnstcn deleted the cj/rebase/chat-ui branch May 13, 2025 16:24
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants