diff --git a/examples/sites/demos/pc/menus.js b/examples/sites/demos/pc/menus.js index 1f95d26254..66d4c44f7c 100644 --- a/examples/sites/demos/pc/menus.js +++ b/examples/sites/demos/pc/menus.js @@ -42,6 +42,11 @@ const docMenusChildren = [ 'titleEn': 'theme-dark', 'key': 'theme-dark' }, + { + 'title': '智能化', + 'titleEn': 'mcp', + 'key': 'mcp' + }, { 'title': '表单校验配置', 'titleEn': 'formValid', 'key': 'form-valid' }, { 'title': '常见问题', 'titleEn': 'faq', 'key': 'faq' }, { diff --git a/examples/sites/demos/pc/webdoc/changelog.md b/examples/sites/demos/pc/webdoc/changelog.md index 02bd0460f7..17ed6762a0 100644 --- a/examples/sites/demos/pc/webdoc/changelog.md +++ b/examples/sites/demos/pc/webdoc/changelog.md @@ -4,6 +4,58 @@ Tiny Vue 团队在正常情况下使用 每月 发布策略。 在此页面上,您只能看到我们的 更新日志 最新三个迭代的日志记录,如您要查看完整记录可以查看:[Release](https://github.com/opentiny/tiny-vue/releases) +## v3.24.0/v2.24.0 + +`2025/06/12` + +## What's Changed + +### Exciting New Features 🎉 + +- feat(pager): reconstruct the multi-terminal template of the pager component from the vue template by @zzcr in +- feat(steps): Add style functionality for multi terminal custom step blocks by @chenxi-20 in +- feat(dialog-select): add support for clear and delete events, update related documents and sample codes by @zzcr in +- feat(qr-code): Add the necessary attributes to the responsive by @zzcr in +- feat(common): add support for MCP configuration in component setup by @zzcr in +- feat(site): add the tiny-robot drawer to the official website. by @shenjunjian in +- feat(dialog-select): [dialog-select] add attribute lock-scroll by @James-9696 in +- feat(popeditor): [popeditor] add attribute lock-scroll by @James-9696 in +- feat(grid): optimize mcp configuration usage and sample code by @zzcr in + +### Bug Fixes 🐛 + +- fix(file-upload): Fix bug in file-upload component where multiple selections are merge-service and uploaded by @chenxi-20 in +- fix(steps): Modify the multi terminal rendering logic and style of steps by @chenxi-20 in +- fix(drowdown): add tiny-\* className to drowdown-menu's wrapper dom by @shenjunjian in +- fix(select): fix can not set grid rowId in select by @gimmyhehe in +- fix(tree-menu): change the color of the dark mode icon by @wuyiping0628 in +- fix(tiny-split):The panel split animation is not displayed properly by @discreted66 in +- fix(search): Fix the margin issue of multi terminal mode dropdown type by @chenxi-20 in +- fix(icon):Fixed the icon color issue in dark mode by @discreted66 in +- fix(autocomplete): autocomplete component defaults to 100% of the width by @shenjunjian in +- fix(tag): theme saas warning token value refresh, tag component style specification refresh by @wuyiping0628 in +- fix(form): fix the textarea style issue under the form by @wuyiping0628 in +- fix(select): fix the malfunction of the select component when automatically pulling down focus by @shenjunjian in +- fix(robot): add the role message markdown and upgrade the tiny-robot version by @shenjunjian in +- fix(basic-usage): update SSE URL to use HTTPS for secure connection by @zzcr in +- fix(date-picker):fix the init panel width and month name by @discreted66 in +- fix: the issue of modifying line breaks for display by @James-9696 in +- fix(grid): increase the length of drag and drop lines in the grid and remove empty values when filtering by @wuyiping0628 in +- fix(robot): add examples of Perfecting AI Agents by @shenjunjian in +- fix(dialog):fix dialog title line-height by @discreted66 in +- fix(icon):delete the iconPushPinSolid default color by @discreted66 in +- fix(calendar-view):fix the E2E test by @discreted66 in +- fix(robot): optimized the example and added sessions and UI adjustment. by @shenjunjian in +- fix(robot): add the API tab of the MCP and adjust the display control of the robot. by @shenjunjian in +- fix(package): update @opentiny/tiny-vue-mcp version to 0.0.1-alpha.1 by @zzcr in +- fix(robot): message processing of the robot is optimized. by @shenjunjian in +- fix(select): modify the DOM structure of all options in the select to be consistent with that of the regular options to solve the text alignment issue by @shenjunjian in +- fix(grid): add a border to the last row of the grid under the saas theme by @wuyiping0628 in + +## New Contributors + +- @afkdsghk211331 made their first contribution in + ## v2.23.0/v3.23.0 `2025/05/21` @@ -390,122 +442,3 @@ Tiny Vue 团队在正常情况下使用 每月 发布策略。 - @lcy0620 made their first contribution in - @tsinghua-lau made their first contribution in - @hu-qi made their first contribution in - -## v2.21.0/v3.21.0 - -`2025/01/15` - -## What's Changed - -### Exciting New Features 🎉 - -- feat(tiny-vue-nuxt): [tiny-vue-nuxt] add tiny-vue-nuxt module and add… by @18003228289 in -- feat(tiny-vue-nuxt): [tiny-vue-nuxt] finish importing all components to nuxt module by @18003228289 in -- fix(random): [random] use Math.random() instead to support SSR by @18003228289 in -- feat: add nuxt dev environment by @zzcr in -- feat: add mobile dependence by @zzcr in -- feat: sync 3.20.0 to dev by @zzcr in -- feat: support nuxt by @zzcr in -- feat(dropdown): [dropdown] add right side expansion function for dropdown by @MomoPoppy in -- feat: support nuxt by @kagol in -- feat: add @opentiny/utils package by @zzcr in -- feat(fluent-editor): add before-editor-init props by @kagol in -- feat: [grid,alert,form]use catalog to globally upgrade vite and vitest; and add mobile build config by @zzcr in -- feat(site): Optimize site documentation typesetting by @dufu1991 in -- feat(site): optimize the performance of the official website, use lazy loading for document examples by @zzcr in -- feat(nav-menu): [nav-menu] Add custom selected mode by @wuyiping0628 in -- feat(nav-menu): [nav-menu] Simplify the demo data by @wuyiping0628 in -- feat: add utils packages type module by @zzcr in -- feat: update version to 3.21.0 by @zzcr in -- feat: remove chart e2e-test cases by @zzcr in -- feat(alert): [alert] display title when size is large by @wuyiping0628 in -- feat: enhance the divider dialogbox treemenu function by @zzcr in -- feat: update playground versions by @zzcr in -- feat(alert): [alert] display title when size is large in mobile-first by @wuyiping0628 in - -### Bug Fixes 🐛 - -- fix(crypto): [crypto] use nanoid instead to support SSR by @18003228289 in -- fix(ssr): [ssr] fix ssr problems by @18003228289 in -- fix(nuxt): update vue version to fix button slot error by @zzcr in -- fix(plugin): [plugin] fix nuxt plugin by @18003228289 in -- fix(plugin): [plugin] fix nuxt plugin by @18003228289 in -- fix(chart): huiCharts 打包替换为 Chart by @Davont in -- fix: fix slider compilation error in vue2 by @zzcr in -- fix(tabbar): modify mobile tabbar problem by @James-9696 in -- fix(dropdown-menu): fix mobile problem by @James-9696 in -- fix(form): modify mobile form problem by @James-9696 in -- fix(container): modify mobile problem by @James-9696 in -- fix(dialog-box): modify mobile dialog-box problem by @James-9696 in -- fix(select): [select] fix the vertical centering of the suffix icon by @MomoPoppy in -- fix(tree-select): solve the problem of tree attributes not being passed through by @kagol in -- fix(label): modify mobile bug by @James-9696 in -- fix(input): modify mobile problem by @James-9696 in -- fix(slider): modify mobile problem by @James-9696 in -- fix(tree): default-expanded-keys description is wrong by @shenjunjian in -- fix(checkbox): modify mobile problem by @James-9696 in -- fix(form): modify mobile problem by @James-9696 in -- fix(popover): remove aria-hidden by @shenjunjian in -- fix(progress): modify mobile problem by @James-9696 in -- fix(button): modify mobile problem by @James-9696 in -- fix(auto-import-plugin): support functional components by @mengqiuleo in -- fix: fix warning in cascader component by @zzcr in -- fix(nuxt): fix the error when starting the nuxt project by @zzcr in -- fix(unplugin-tiny-vue): fix error TinyVueResolver name by @shenjunjian in -- fix(action-sheet): modify mobile problem by @James-9696 in -- fix(pull-refresh): modify mobile bug by @James-9696 in -- fix(exception): modify mobile problem by @James-9696 in -- fix(file-upload): [file-upload] Optimized the usage of the customized upload example. by @chenxi-20 in -- fix(vue-renderless): [action-menu, alert] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix: fix change theme error when open playground by @zzcr in -- fix(vue-renderless): [autocomplete,base-select,amount,anchor,area] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix(mobile): fix mobile components build error by @zzcr in -- fix(site): fix error when build saas site by @zzcr in -- fix(mini-picker): the demo on the mobile client is modified. by @James-9696 in -- fix(modal): modify the display and error issues of the mobile demo by @James-9696 in -- fix(user-head): the problem and type of the demo on the mobile client are modified by @James-9696 in -- fix(vue-renderless): [breadcrumb, bulletin-board, button, button-group,calendar, calendar-view, card, carousel, cascader, cascader-panel, chart,checkbox, collapse, color-picker, color-select-panel,company,config-provider,container,crop,currency,date-picker,dept,dialog-box,dialog-select,directives,divider,drawer,drop-roles,drop-times,dropdown,espace,fall-menu,file-upload,filter-panel,float-button,floatbar,flowchart,fluent-editor,form,fullscreen] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix(tabs): modify the issue of the mobile demo not displaying and reporting errors by @James-9696 in -- fix(vue-renderless): [grid] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix(grid): [grid] fix the initial position on the left when dragging … by @gimmyhehe in -- fix(statistic): [statistic] synchronize the statistic component of the release-3.18 version to the dev branch by @James-9696 in -- fix(file-upload): modify the error reported by the upload component on the mobile client and add the demo by @James-9696 in -- fix(input): [input] cancel bacground style of input count in textarea by @wNing50 in -- fix(modal): [modal] repeatedly dispatch the close event by @betavs in -- fix(vue-renderless): [grid-select,guide,hrapprover,hrapprover,icon,icon-multicolor,image,infinite-scroll,input,ip-address,layout,link,link-menu,loading,locales,logon-user,logout,milestone,mind-map,modal,nav-menu,notify,numeric,pager,pop-upload,popconfirm,popeditor,popover,progress,qr-code,query-builder] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix(modal): [modal] modifying the modal component and clicking the confirm button accidentally triggered the close event by @James-9696 in -- fix(vue-renderless): [radio,rate,rich-text-editor,roles,scroll-text,search,select,skeleton,slider,split,statistic,steps,sticky,switch,tabs,tag,tag-group,text-popup,time-line,time-line-new,time-picker,time-select,toggle-menu,tooltip,transfer,tree,tree-menu,tree-select] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix(vite-import): fix the issue of escaping comment code in on-demand packaging plugin by @zzcr in -- fix(vue-renderless): [user,user-account,user-contact,user-head,user-link,virtual-scroll-box,virtual-tree,watermark,wizard] fix site: Optimize site documentation typesetting by @dufu1991 in -- fix: supplement mistakenly deleted files by @James-9696 in -- fix(e2e): [tooltip,select] fix the security that causes e2e test failures. by @shenjunjian in -- fix(e2e): [file-upload] Fix the error reported in the E2E test case of the upload component. by @chenxi-20 in -- fix(e2e): [cascader,color-picker,crop] fix cascader color-picker crop components e2e-test error by @zzcr in -- fix(demos/checkbox): [checkbox] fix checkbox e2e-test error by @zzcr in -- fix(modal): [modal] modify e2e test case error by @James-9696 in -- fix(date-picker): [date-picker] fix date-picker e2e test error by @zzcr in -- fix(time-select): [time-select] Fix and optimize issues with invalid … by @Youyou-smiles in -- fix(popeditor): the default width of the label in popeditor is added by @shenjunjian in -- fix(modal): [modal] the style does not take effect by @James-9696 in -- fix(carousel): [carousel] modify the vertical arrow display issue of the carousel component by @James-9696 in -- fix(grid): [grid] fix can not select first option when value is empty by @gimmyhehe in -- fix(dialog-box): [dialog-box] modify the style of the dialog box by @James-9696 in -- fix(loading): [loading] v-loading's lifecycle name replace by inserted by @shenjunjian in -- fix(grid): [grid] fix checkbox border become smaller when config show… by @gimmyhehe in -- fix: fix huichart build error by @zzcr in -- fix(renderless): fix renderless package publish error by @zzcr in -- fix(divider): [divider] modify e2e test cases for the divider component by @James-9696 in - -### Other Changes - -- docs: hide the search input on the left menu at open source sites by @kagol in -- ci: auto deploy site by @kagol in -- docs: add dufu1991 as a contributor for doc by @allcontributors in -- docs(select): add the description of the filterMethod prop for Select by @shenjunjian in -- docs: fix back to top does not work and the document tab title does n… by @gimmyhehe in -- test(grid): [grid] fix unit test error by @gimmyhehe in - -## New Contributors - -- @18003228289 made their first contribution in -- @dufu1991 made their first contribution in diff --git a/examples/sites/demos/pc/webdoc/mcp-en.md b/examples/sites/demos/pc/webdoc/mcp-en.md new file mode 100644 index 0000000000..8d51fb76a8 --- /dev/null +++ b/examples/sites/demos/pc/webdoc/mcp-en.md @@ -0,0 +1,101 @@ +# TinyVue Intelligent Component Access Guide + +TinyVue's intelligent components provide a complete intelligent solution, allowing your application to have AI conversation, voice interaction, and other capabilities. This guide will walk you through how to integrate TinyVue's intelligent components into your project. + +## Install dependencies + +First, you need to install the following core dependency packages: + +```bash +npm install @opentiny/tiny-vue-mcp @opentiny/next-vue @opentiny/vue-common @opentiny/vue +``` + +## Access steps + +### 1. Initialize MCP Configuration + +Initialize MCP configuration in the application entry file (e.g., `main.js`): + +```js +import { registerMcpConfig } from '@opentiny/vue-common' +import { createMcpTools, getTinyVueMcpConfig } from '@opentiny/tiny-vue-mcp' + +// Register TinyVue component MCP configuration +registerMcpConfig(getTinyVueMcpConfig(), createMcpTools) +``` + +### 2. Create NextClient Proxy Client + +Create a NextClient proxy client in `App.vue` to establish real-time communication: + +```html + + + +``` + +### 3. MCP Component Configuration + +When using + +```html + + + +``` + +## Notes + +1. Ensure that the server supports SSE (Server-Sent Events) connections +2. It is recommended to use HTTPS in production environments +3. CORS needs to be correctly configured to support cross-origin requests + +## Common issues + +1. Session connection failed + + - Check if the SSE service address is correct + - Confirm that the network connection is normal + - Verify that the authentication information is valid + +2. AI conversation response is not available + - Check if the session is established normally + - Confirm that the prompt item configuration is correct + - Check if there are errors in the network request diff --git a/examples/sites/demos/pc/webdoc/mcp.md b/examples/sites/demos/pc/webdoc/mcp.md new file mode 100644 index 0000000000..f7c83b4cc6 --- /dev/null +++ b/examples/sites/demos/pc/webdoc/mcp.md @@ -0,0 +1,101 @@ +# TinyVue 智能化组件接入指南 + +TinyVue 的智能化组件提供了一套完整的智能化解决方案,让您的应用具备 AI 对话、语音交互等能力。本文将指导您如何在项目中接入 TinyVue 的智能化组件。 + +## 安装依赖 + +首先需要安装以下核心依赖包: + +```bash +npm install @opentiny/tiny-vue-mcp @opentiny/next-vue @opentiny/vue-common @opentiny/vue +``` + +## 接入步骤 + +### 1. 初始化 MCP 配置 + +在应用入口文件(如 `main.js`)中初始化 MCP 配置: + +```js +import { registerMcpConfig } from '@opentiny/vue-common' +import { createMcpTools, getTinyVueMcpConfig } from '@opentiny/tiny-vue-mcp' + +// 注册 TinyVue 组件 MCP 配置 +registerMcpConfig(getTinyVueMcpConfig(), createMcpTools) +``` + +### 2. 创建 NextClient 代理客户端 + +在 `App.vue` 中创建 NextClient 代理客户端,用于建立实时通信: + +```html + + + +``` + +### 3. MCP 组件配置 + +在子页面中使用 Grid 等支持 MCP 的组件时,添加 MCP 配置: + +```html + + + +``` + +## 注意事项 + +1. 确保服务端支持 SSE(Server-Sent Events)连接 +2. 建议在生产环境使用 HTTPS 协议 +3. 需要正确配置 CORS 以支持跨域请求 + +## 常见问题 + +1. 会话连接失败 + + - 检查 SSE 服务地址是否正确 + - 确认网络连接是否正常 + - 验证认证信息是否有效 + +2. AI 对话无响应 + - 检查会话是否正常建立 + - 确认提示项配置是否正确 + - 查看网络请求是否有错误 diff --git a/examples/sites/package.json b/examples/sites/package.json index bd3c7575c8..b7908c130d 100644 --- a/examples/sites/package.json +++ b/examples/sites/package.json @@ -1,7 +1,7 @@ { "name": "@opentiny/vue-docs", "type": "module", - "version": "3.24.0", + "version": "3.24.4", "license": "MIT", "scripts": { "start": "vite", @@ -27,12 +27,11 @@ "@docsearch/css": "^3.8.0", "@docsearch/js": "^3.8.0", "@docsearch/react": "npm:@docsearch/css", - "@opentiny/next": "0.1.2", - "@opentiny/next-vue": "0.0.1-alpha.1", + "@opentiny/next-vue": "^0.0.1", "@opentiny/tiny-robot": "0.2.1", "@opentiny/tiny-robot-kit": "0.2.1", "@opentiny/tiny-robot-svgs": "0.2.1", - "@opentiny/tiny-vue-mcp": "0.0.1-alpha.3", + "@opentiny/tiny-vue-mcp": "^0.0.1", "@opentiny/utils": "workspace:~", "@opentiny/vue": "workspace:~", "@opentiny/vue-common": "workspace:~", @@ -58,6 +57,7 @@ "@vue/shared": "^3.4.31", "@vueuse/core": "^12.7.0", "@vueuse/head": "0.7.13", + "crypto-js": "^4.2.0", "github-markdown-css": "~5.1.0", "highlight.js": "^11.5.1", "marked": "^4.3.0", diff --git a/examples/sites/src/App.vue b/examples/sites/src/App.vue index 96f7face8d..ac64fc584c 100644 --- a/examples/sites/src/App.vue +++ b/examples/sites/src/App.vue @@ -17,7 +17,7 @@ import { iconClose } from '@opentiny/vue-icon' import { appData } from './tools' import useTheme from './tools/useTheme' import { useNextClient } from '@opentiny/next-vue' -import { globalConversation } from './views/components-doc/composition/utils' +import { globalConversation, $session } from './composable/utils' export default defineComponent({ name: 'AppVue', @@ -33,13 +33,14 @@ export default defineComponent({ const { sessionId } = useNextClient({ clientInfo: { name: 'tiny-vue-website', version: '1.0.0' }, - proxyOptions: { url: 'https://39.108.160.245/sse', token: '' } + proxyOptions: { url: 'https://agent.icjs.ink/sse', token: '', sessionId: $session.sessionId } }) watch( () => sessionId.value, (newVal) => { if (newVal) { + $session.sessionId = newVal globalConversation.sessionId = newVal } } diff --git a/examples/sites/src/components/MessageCard.vue b/examples/sites/src/components/MessageCard.vue new file mode 100644 index 0000000000..503704abff --- /dev/null +++ b/examples/sites/src/components/MessageCard.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/examples/sites/src/views/components-doc/components/anchor.vue b/examples/sites/src/components/anchor.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/anchor.vue rename to examples/sites/src/components/anchor.vue diff --git a/examples/sites/src/views/components-doc/components/api-docs.vue b/examples/sites/src/components/api-docs.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/api-docs.vue rename to examples/sites/src/components/api-docs.vue diff --git a/examples/sites/src/views/components-doc/components/async-highlight.vue b/examples/sites/src/components/async-highlight.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/async-highlight.vue rename to examples/sites/src/components/async-highlight.vue diff --git a/examples/sites/src/views/components-doc/components/contributor.vue b/examples/sites/src/components/contributor.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/contributor.vue rename to examples/sites/src/components/contributor.vue diff --git a/examples/sites/src/views/components-doc/components/demo.vue b/examples/sites/src/components/demo.vue similarity index 99% rename from examples/sites/src/views/components-doc/components/demo.vue rename to examples/sites/src/components/demo.vue index 71a57c2663..ce4c8e3fe1 100644 --- a/examples/sites/src/views/components-doc/components/demo.vue +++ b/examples/sites/src/components/demo.vue @@ -75,7 +75,7 @@ import { i18nByKey, getWord } from '@/i18n' import { $split, fetchDemosFile } from '@/tools' import { Tabs as TinyTabs, TabItem as TinyTabItem, Button as TinyButton } from '@opentiny/vue' import { AutoTip as vAutoTip } from '@opentiny/vue-directive' -import { languageMap, vueComponents, getWebdocPath, staticDemoPath } from '../cmp-config' +import { languageMap, vueComponents, getWebdocPath, staticDemoPath } from '../views/components-doc/cmp-config' import { router } from '@/router.js' import demoConfig from '@demos/config.js' import { useApiMode, useTemplateMode } from '@/tools' diff --git a/examples/sites/src/views/components-doc/components/float-settings.vue b/examples/sites/src/components/float-settings.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/float-settings.vue rename to examples/sites/src/components/float-settings.vue diff --git a/examples/sites/src/views/components-doc/components/header.vue b/examples/sites/src/components/header.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/header.vue rename to examples/sites/src/components/header.vue diff --git a/examples/sites/src/views/components-doc/components/mcp-docs.vue b/examples/sites/src/components/mcp-docs.vue similarity index 100% rename from examples/sites/src/views/components-doc/components/mcp-docs.vue rename to examples/sites/src/components/mcp-docs.vue diff --git a/examples/sites/src/views/components-doc/tiny-robot-chat.vue b/examples/sites/src/components/tiny-robot-chat.vue similarity index 80% rename from examples/sites/src/views/components-doc/tiny-robot-chat.vue rename to examples/sites/src/components/tiny-robot-chat.vue index 6ef89550b6..92ea9e692f 100644 --- a/examples/sites/src/views/components-doc/tiny-robot-chat.vue +++ b/examples/sites/src/components/tiny-robot-chat.vue @@ -2,13 +2,13 @@
- +