-
Notifications
You must be signed in to change notification settings - Fork 342
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
fix: better chatbot input & bubble #3404
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Light2Dark is attempting to deploy a commit to the marimo Team on Vercel. A member of the Team first needs to authorize it. |
@@ -277,8 +283,17 @@ export const PromptInput = ({ | |||
}), | |||
); | |||
|
|||
// Trigger autocompletion for text that begins with @ or | |||
// @ + additional symbols specified | |||
const matchBeforeRegex = additionalCompletions |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean if there are additionalCompletions
, we only use the "/" regex?
it's also possible to accept multiple regexes, if we want to make it extensible
export function mentions(
matchBeforeRegexes: RegExp[],
data: Completion[] = [],
): Extension {
return autocompletion({
override: [
(context: CompletionContext) => {
const word = matchBeforeRegexes
.map((regex) => context.matchBefore(regex))
.find(Boolean);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from the code, it looks like @
would trigger autocomplete for prompts, and I was thinking that @
only trigger autocomplete for datasets, while /
triggers for prompts. you could maybe do this in a single mentions
plugin, but doing two (one for datasets and one for prompts) might be easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, you can't do 2 autocompletion extensions, since they will overwrite and cause a conflict from codemirror. Seems a solution will be tricky if we want to have 2 mentions plugin.
return [
mentions(/@(\w+)?/, completions),
mentions(/\/(\w+)?/, additionalCompletions?.completions),
...
]
error: Config merge conflict for field override
but anyways, @
will indeed trigger autocomplete, but there are no matching prompts beginning with @
, so nothing is found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha. i see, that makes sense.
then what you have is good to me.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome stuff!
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.10.13-dev4 |
📝 Summary
Fixes #3401 . Use codemirror as chatbot input,
/
triggers autocomplete.🔍 Description of Changes
note: dataset atom is not finding any tables, hence
@
is not working.📋 Checklist
📜 Reviewers
@akshayka OR @mscolnick