-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat: add chat visibility controls and improve quote reader permissions #6102
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
Conversation
|
⏳ Processing in progress |
Preview mcp_server Image: |
Preview sandbox Image: |
Preview fastgpt Image: |
c121914yu
left a comment
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.
写接口文档,以及接口的单测。
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ChatItem.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/pageComponents/chat/ChatQuoteList/CollectionQuoteReader.tsx
Show resolved
Hide resolved
|
别忘了改字段名 |
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.
Pull request overview
This PR introduces chat visibility controls for the playground environment and refactors permission-related field names for improved clarity. The changes include renaming responseDetail → showQuote, showNodeStatus → showRunningStatus, and showRawSource → canDownloadSource, while adding a new showFullText field. A new playground publish channel is added with dedicated API endpoints for configuration management, along with a database migration script to update existing records.
Key Changes:
- Adds playground publish channel with visibility configuration APIs (get/update endpoints)
- Renames permission fields across the codebase for better semantic clarity
- Implements database migration script for field renaming and adding showFullText to share links
- Updates all frontend components, contexts, and API handlers to use new field names
Reviewed changes
Copilot reviewed 57 out of 59 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
projects/app/test/service/support/permission/auth/chat.test.ts |
Updates test expectations to use renamed permission fields |
projects/app/test/pages/api/support/outLink/playground/update.test.ts |
Adds comprehensive test coverage for playground visibility update API |
projects/app/test/pages/api/support/outLink/playground/config.test.ts |
Adds test coverage for playground visibility config retrieval API |
projects/app/src/web/support/outLink/api.ts |
Adds client API functions for playground visibility config operations |
projects/app/src/web/core/chat/context/chatItemContext.tsx |
Renames context properties to match new field names |
projects/app/src/web/core/app/constants.ts |
Updates default outLink form values with new field names |
projects/app/src/service/support/permission/auth/outLink.ts |
Updates outLink auth to return renamed permission fields |
projects/app/src/service/support/permission/auth/chat.ts |
Updates chat auth with renamed fields and new defaults |
projects/app/src/pages/chat/share.tsx |
Updates share page to use renamed permission props |
projects/app/src/pages/chat/index.tsx |
Adds playground config loading and passes visibility props |
projects/app/src/pages/api/v2/chat/completions.ts |
Updates chat completion API to use renamed fields |
projects/app/src/pages/api/v1/chat/completions.ts |
Updates v1 chat completion API to use renamed fields |
projects/app/src/pages/api/support/outLink/update.ts |
Updates outLink update API with new field names |
projects/app/src/pages/api/support/outLink/playground/update.ts |
Implements playground visibility config update endpoint |
projects/app/src/pages/api/support/outLink/playground/config.ts |
Implements playground visibility config retrieval endpoint |
projects/app/src/pages/api/core/dataset/data/getQuoteData.ts |
Updates to use showQuote instead of responseDetail |
projects/app/src/pages/api/core/dataset/collection/read.ts |
Updates to use canDownloadSource instead of showRawSource |
projects/app/src/pages/api/core/dataset/collection/export.ts |
Updates to use canDownloadSource for export permission |
projects/app/src/pages/api/core/chat/quote/getQuote.ts |
Updates quote retrieval to check showQuote permission |
projects/app/src/pages/api/core/chat/quote/getCollectionQuote.ts |
Updates collection quote to check showFullText permission |
projects/app/src/pages/api/core/chat/getResData.ts |
Updates response data filtering to use showQuote |
projects/app/src/pages/api/core/chat/getRecords_v2.ts |
Updates chat records retrieval with renamed fields |
projects/app/src/pages/api/core/chat/getPaginationRecords.ts |
Updates paginated records with renamed permission checks |
projects/app/src/pages/api/admin/initv4145.ts |
Adds migration script for field renaming and showFullText addition |
projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx |
Updates chat window to use showRunningStatus context |
projects/app/src/pageComponents/chat/ChatWindow/AppChatWindow.tsx |
Updates app chat window with renamed context values |
projects/app/src/pageComponents/chat/ChatQuoteList/CollectionQuoteReader.tsx |
Conditionally renders download button based on canDownloadSource |
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/ChatTest.tsx |
Updates test chat context with new prop names |
projects/app/src/pageComponents/app/detail/SimpleApp/ChatTest.tsx |
Updates simple app test chat with renamed props |
projects/app/src/pageComponents/app/detail/Publish/index.tsx |
Adds Playground publish channel option |
projects/app/src/pageComponents/app/detail/Publish/Wecom/index.tsx |
Updates Wecom publish config with showQuote |
projects/app/src/pageComponents/app/detail/Publish/Playground/index.tsx |
Implements playground visibility configuration UI |
projects/app/src/pageComponents/app/detail/Publish/OffiAccount/index.tsx |
Updates official account config with renamed field |
projects/app/src/pageComponents/app/detail/Publish/Link/index.tsx |
Updates share link UI with all renamed fields and showFullText |
projects/app/src/pageComponents/app/detail/Publish/FeiShu/index.tsx |
Updates FeiShu publish config with showQuote |
projects/app/src/pageComponents/app/detail/Publish/DingTalk/index.tsx |
Updates DingTalk config with renamed field |
projects/app/src/pageComponents/app/detail/MCPTools/ChatTest.tsx |
Updates MCP tools test with new context props |
projects/app/src/pageComponents/app/detail/Logs/DetailLogsModal.tsx |
Updates logs modal with renamed context props |
projects/app/src/pageComponents/app/detail/HTTPTools/ChatTest.tsx |
Updates HTTP tools test with new prop names |
projects/app/src/components/core/chat/components/AIResponseBox.tsx |
Updates AI response rendering with isShowQuote logic |
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ResponseTags.tsx |
Updates response tags to respect isShowQuote permission |
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/QuoteList.tsx |
Updates quote list to use canDownloadSource |
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ChatItem.tsx |
Updates chat item with showRunningStatus and isShowFullText |
packages/web/i18n/zh-Hant/common.json |
Updates Traditional Chinese translations |
packages/web/i18n/zh-Hant/app.json |
Adds Traditional Chinese translations for playground |
packages/web/i18n/zh-CN/common.json |
Updates Simplified Chinese translations |
packages/web/i18n/zh-CN/app.json |
Adds Simplified Chinese translations for playground |
packages/web/i18n/en/common.json |
Updates English translations |
packages/web/i18n/en/app.json |
Adds English translations for playground |
packages/service/support/outLink/schema.ts |
Updates MongoDB schema with renamed fields |
packages/global/support/outLink/type.d.ts |
Updates TypeScript types and adds playground config schemas |
packages/global/support/outLink/constant.ts |
Adds playground enum to PublishChannelEnum |
packages/global/support/outLink/api.d.ts |
Adds playground visibility API types and schemas |
packages/global/openapi/tag.ts |
Adds publishChannel tag |
packages/global/openapi/index.ts |
Includes publishChannel in tag groups |
packages/global/openapi/core/app/publishChannel/playground/index.ts |
Defines OpenAPI spec for playground endpoints |
packages/global/openapi/core/app/publishChannel/playground/api.ts |
Defines playground API schemas for OpenAPI |
packages/global/openapi/core/app/publishChannel/index.ts |
Exports playground path definitions |
packages/global/openapi/core/app/index.ts |
Includes PublishChannelPath in app paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/app/src/pages/api/support/outLink/playground/update.ts
Outdated
Show resolved
Hide resolved
projects/app/src/pageComponents/chat/ChatWindow/AppChatWindow.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/components/core/chat/components/AIResponseBox.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/components/core/chat/components/AIResponseBox.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/pageComponents/app/detail/Publish/Playground/index.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/pageComponents/chat/ChatWindow/AppChatWindow.tsx
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 57 out of 59 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/app/src/pageComponents/chat/ChatWindow/AppChatWindow.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/components/core/chat/components/AIResponseBox.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/components/core/chat/components/AIResponseBox.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ResponseTags.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ResponseTags.tsx
Outdated
Show resolved
Hide resolved
projects/app/src/pageComponents/chat/ChatWindow/HomeChatWindow.tsx
Outdated
Show resolved
Hide resolved
* feat: add chat visibility controls and improve quote reader permissions (#6102) * feat: add chat visibility controls and improve quote reader permissions * fix test * zod * fix * test & openapi * frontend filter * update name * fix * fix * rename variables * fix * test * fix build * fix * fix --------- Co-authored-by: archer <[email protected]> * app update time * recent app * fix * type * fix * context * perf: update app usingtime code * fix: ts * update parent * doc * perf: code per * unauth refresh --------- Co-authored-by: archer <[email protected]>
…ns (#6102) * feat: add chat visibility controls and improve quote reader permissions * fix test * zod * fix * test & openapi * frontend filter * update name * fix * fix * rename variables * fix * test * fix build * fix * fix --------- Co-authored-by: archer <[email protected]>
No description provided.