-
Notifications
You must be signed in to change notification settings - Fork 59
Add support for inserting multi-modal documents via the helper pane #893
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
kanushka
merged 49 commits into
wso2:main
from
dan-niles:document-support-in-expression-helper
Nov 20, 2025
Merged
Changes from 46 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
3c35b23
Add icons for AI document types
dan-niles cc155c0
Fix border bars in helper pane in dark mode
dan-niles eb0e87d
Add support for adding documents through helper pane
dan-niles bd89661
Add support for adding documents using hardcoded URLs through helper …
dan-niles 2f33cf6
Update `shouldShowNavigationArrow` in helper pane to show arrow only …
dan-niles a82b758
Display record types in documents view in helper pane
dan-niles 0c0d329
Update document insert in helper pane to wrap AI document type variab…
dan-niles 22cefb8
Add document chip support to expression editor
dan-niles 5e4739c
Update helper pane to conditionally display the Documents section bas…
dan-niles 4830015
Update raw template expression editor to display chips properly
dan-niles 439e548
Refactor token metadata handling to unify document and variable token…
dan-niles a556ff5
Fix the issue where record types are automatically added when selecti…
dan-niles 92edcc8
Enhance token management to handle merged tokens in expression model,…
dan-niles 91f211b
Fix AutoExpandingEditableDiv height in expanded mode
dan-niles 1822148
Remove old chip editor files
dan-niles ac533c4
Add rawExpression prop to editor components
dan-niles 4594b56
Refactor ContextAwareRawExpressionEditor to include template configur…
dan-niles af404d5
Remove redundant value checks in getSanitizedExp and getRawExp functions
dan-niles 135e88b
Add support for rendering document tokens in chip expression editor
dan-niles 1885a2d
Add support to switch between template mode and expression mode for t…
dan-niles b567f12
Revert "Remove redundant value checks in getSanitizedExp and getRawEx…
dan-niles 0d36e30
Pass input mode as a prop to helper pane
dan-niles 54b34c5
Remove inputMode prop from HelperPaneNewEl component
dan-niles 421a1b4
Add template mode to expanded editor with markdown preview support
dan-niles 2f9545d
Remove unused helper pane toggle and console log from MarkdownToolbar…
dan-niles 4f9cf3c
Fix chip expression editor height in expanded mode
dan-niles c658409
Display error diagnostics in expanded editor for expression and templ…
dan-niles fb20726
Add option to disable auto-opening of helper pane in ChipExpressionEd…
dan-niles 1844d60
Add Markdown preview styling and integrate with ReactMarkdown component
dan-niles 518aa0b
Update template mode styles
dan-niles c2cf9b1
Fix bug where document token created from hardcoded URL gets inserted…
dan-niles f21d364
Update chip styles
dan-niles 5928bcf
Refactor ChipComponent to use TokenType enum and update MarkdownPrevi…
dan-niles 95e3e6e
Update ErrorBanner component to accept custom styles and apply max he…
dan-niles 15cf507
Wrap variables in interpolations when adding through helper pane in t…
dan-niles 7aca0ad
Refactor document type handling to use AIDocumentType in helper pane
dan-niles e11876e
Refactor getCurrentNavigationPath to use getCurrentPath in useHelperP…
dan-niles 6e81502
Refactor ChipComponent styles to use styled components
dan-niles 851676c
Remove disableAutoOpenHelperPane prop from ChipExpressionEditor
dan-niles 3fe5315
Refactor chip styling in chip expression editor
dan-niles f794550
Refactor template mode markdown toolbar
dan-niles 31ff8ae
Refactor MarkdownToolbar and CodeUtils for improved token processing
dan-niles 33982b5
Refactor token processing in transformToMarkdown and CodeUtils for im…
dan-niles 58938a6
Add support for inserting functions with interpolations in template mode
dan-niles 49a6cb1
Address PR comments
dan-niles 458b5b3
Set template mode as default for new template based form fields
dan-niles e080371
Fix condition to wrap value with template config in ContextAwareRawEx…
dan-niles 78c8ce0
Swap priority values for token patterns in TOKEN_PATTERNS to correct …
dan-niles af669a2
Add a null check before passing start line to getExpressionTokens API
dan-niles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
workspaces/ballerina/ballerina-extension/grammar/ballerina-grammar
Submodule ballerina-grammar
updated
5 files
| +1 −1 | build-monarch.js | |
| +1 −1 | build-tm.js | |
| +1 −1 | extract-keywords.js | |
| +54 −9 | package-lock.json | |
| +1 −1 | package.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ina/ballerina-side-panel/src/components/editors/ExpandedEditor/controls/ChipComponent.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /** | ||
| * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. | ||
| * | ||
| * WSO2 LLC. licenses this file to you under the Apache License, | ||
| * Version 2.0 (the "License"); you may not use this file except | ||
| * in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import React from "react"; | ||
|
|
||
| import { DocumentType, TokenType } from "../../MultiModeExpressionEditor/ChipExpressionEditor/types"; | ||
| import { | ||
| getChipDisplayContent, | ||
| StandardChip, | ||
| ChipText, | ||
| getTokenIconClass, | ||
| StandardIcon | ||
| } from "../../MultiModeExpressionEditor/ChipExpressionEditor/chipStyles"; | ||
|
|
||
| export interface ChipComponentProps { | ||
| type: TokenType; | ||
| content: string; | ||
| documentType?: DocumentType; | ||
| } | ||
|
|
||
| export const ChipComponent: React.FC<ChipComponentProps> = ({ type, content, documentType }) => { | ||
| let iconClass = getTokenIconClass(type, documentType); | ||
| return ( | ||
| <StandardChip chipType={type}> | ||
| <StandardIcon chipType={type} className={iconClass} /> | ||
| <ChipText>{getChipDisplayContent(type, content)}</ChipText> | ||
| </StandardChip> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@dan-niles did you change this or is it from a merge commit?
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.
I think it came from rebasing. Previously I sent the PR to
bi-1.5.xbranch and switched it tomain.