Skip to content
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

[wip] fix: better chatbot input & bubble #3404

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

Conversation

Light2Dark
Copy link
Contributor

@Light2Dark Light2Dark commented Jan 12, 2025

📝 Summary

Screenshot 2025-01-13 at 1 24 50 AM

Fixes #3401 . Use codemirror as chatbot input, / triggers autocomplete.

🔍 Description of Changes

  • multiline input
  • multiline chat bubble
  • removed an unnecessary extension (codemirror-mentions) and implemented custom one

todo:

  • add tests
  • dataset atom is not finding any tables, hence @ is not working. need to investigate
  • haven't tested large inputs, may want to fix height & add scrollable

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

📜 Reviewers

@akshayka OR @mscolnick

Copy link

vercel bot commented Jan 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 12, 2025 5:44pm

Copy link

vercel bot commented Jan 12, 2025

@Light2Dark is attempting to deploy a commit to the marimo Team on Vercel.

A member of the Team first needs to authorize it.

ref={inputRef}
<PromptInput
className="rounded-sm mr-2"
placeholder="Type your message here, / for prompts"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we change the placeholder of prompts exist or not

@@ -277,8 +283,17 @@ export const PromptInput = ({
}),
);

// Trigger autocompletion for text that begins with @ or
// @ + additional symbols specified
const matchBeforeRegex = additionalCompletions
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do 2 separate mentions plugins? One for "@" data and one for "/" prompts; instead of appending the trigger, replace it.

@mscolnick
Copy link
Contributor

I think the mention changes are good / worth keeping. I plan to add support for MCPs so we could eventually replace this with https://github.com/marimo-team/codemirror-mcp

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.

support multiline for mo.ui.chat input & bubble
2 participants