-
Notifications
You must be signed in to change notification settings - Fork 474
Feat:Add AI assistant to canvas node #1800
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
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7406fcc
feat:画布点击节点实现AI对话修改
lichunn 294a051
feat:添加节点AI助手交互
lichunn a605953
feat:添加AI返回JSON处理
lichunn f919edd
fix:fix review
lichunn 567a3b8
fix:fix review
lichunn 380acb7
fix:fix review
lichunn 393f83b
fix:fix review
lichunn 4b6a9ac
fix:fix review
lichunn acb3ffd
fix:fix review
lichunn 2698bbe
fix:fix review
lichunn 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions
115
packages/canvas/container/src/components/AIConfirmDialog.vue
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,115 @@ | ||
| <template> | ||
| <div class="ai-confirm-dialog"> | ||
| <div class="ai-confirm-header"> | ||
| <div class="header-left"> | ||
| <icon-successful class="icon-successful"></icon-successful> | ||
| <span class="header-title">AI操作已完成,您可选择采纳或放弃</span> | ||
| </div> | ||
| </div> | ||
| <div class="ai-confirm-actions-row"> | ||
| <div class="actions-right"> | ||
| <svg-icon name="refresh" class="refresh-icon" @click="handleRefresh" title="重新生成"></svg-icon> | ||
| <tiny-button class="actions-btn" @click="handleCancel" round>放弃</tiny-button> | ||
| <tiny-button class="actions-btn" @click="handleConfirm" type="primary" round> 采纳</tiny-button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
lichunn marked this conversation as resolved.
|
||
| </template> | ||
|
|
||
| <script> | ||
| import { TinyButton } from '@opentiny/vue' | ||
| import { IconSuccessful } from '@opentiny/vue-icon' | ||
|
|
||
| export default { | ||
| components: { | ||
| IconSuccessful: IconSuccessful(), | ||
| TinyButton | ||
| }, | ||
| emits: ['confirm', 'cancel', 'close', 'refresh'], | ||
|
|
||
| setup(props, { emit }) { | ||
| const handleConfirm = () => { | ||
| emit('confirm') | ||
| } | ||
|
|
||
| const handleCancel = () => { | ||
| emit('cancel') | ||
| } | ||
|
|
||
| const handleRefresh = () => { | ||
| emit('refresh') | ||
| } | ||
|
|
||
| return { | ||
| handleConfirm, | ||
| handleCancel, | ||
| handleRefresh | ||
| } | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| <style lang="less" scoped> | ||
| .ai-confirm-dialog { | ||
| background: white; | ||
| border-radius: 8px; | ||
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); | ||
| overflow: hidden; | ||
| display: flex; | ||
| flex-direction: column; | ||
| padding: 16px 20px; | ||
| } | ||
|
|
||
| /* 第一行:标题行 */ | ||
| .ai-confirm-header { | ||
| display: flex; | ||
| align-items: center; | ||
| margin-bottom: 12px; | ||
|
|
||
| .header-left { | ||
| display: flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .icon-successful { | ||
| font-size: 20px; | ||
| fill: #5cb300; | ||
| margin-right: 8px; | ||
| } | ||
|
|
||
| .header-title { | ||
| font-size: 14px; | ||
| font-weight: 500; | ||
| color: #191919; | ||
| margin-right: 16px; | ||
| } | ||
|
|
||
| .close-icon { | ||
| cursor: pointer; | ||
| font-size: 16px; | ||
| color: #000; | ||
|
lichunn marked this conversation as resolved.
|
||
| } | ||
| } | ||
|
|
||
| /* 第二行:操作行 */ | ||
| .ai-confirm-actions-row { | ||
| display: flex; | ||
| justify-content: right; | ||
| align-items: center; | ||
|
|
||
| .actions-right { | ||
| display: flex; | ||
| gap: 12px; | ||
| align-items: center; | ||
| .refresh-icon { | ||
| cursor: pointer; | ||
| color: #000; | ||
| font-size: 18px; | ||
| } | ||
| .actions-btn { | ||
| min-width: 68px; | ||
| height: 28px; | ||
| } | ||
| } | ||
| } | ||
| </style> | ||
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.
Uh oh!
There was an error while loading. Please reload this page.