Merged
Conversation
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
reviewed
Jun 9, 2025
nekomeowww
requested changes
Jun 9, 2025
Member
nekomeowww
left a comment
There was a problem hiding this comment.
Mostly styling issues. Generally LGTM.
kwaa
reviewed
Jun 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds first-class Vue support to @xsai-use/vue, including a dedicated TypeScript configuration, core utilities, a useChat Vue composable, and a complete example app to demonstrate usage.
- Introduces
tsconfig.vue.jsontailored for Vue projects. - Implements
deepToRawutility anduseChatcomposable in the Vue package. - Provides an example Vue application (
examples/vue) with Vite setup and UI components.
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.vue.json | Vue-specific TypeScript config extending @vue/tsconfig |
| packages/vue/src/utils/deep-to-raw.ts | Add deepToRaw utility to unwrap Vue reactivity |
| packages/vue/src/use-chat.ts | Implement useChat composable for streaming chat in Vue |
| packages/vue/src/index.ts | Export useChat and re-export shared types |
| packages/vue/package.json | Bump Vue peer/dev dependency to ^3.5.13 |
| package.json | Add Vue plugin and TS config to root dev dependencies |
| eslint.config.ts | Enable Vue linting |
| examples/vue/vite.config.ts | Vite config with Vue and Tailwind plugins |
| examples/vue/src/* | Complete Vue demo app, components, and styling |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (5)
packages/vue/src/use-chat.ts:38
- [nitpick] The suffix 'R' in
initialUIMessagesRis ambiguous. Consider renaming toinitialUIMessagesReforcomputedInitialMessagesfor clarity.
const initialUIMessagesR = computed(() => initialUIMessages)
packages/vue/src/use-chat.ts:13
- Consider adding a JSDoc comment for
useChat, describing its options, returned reactive state and methods to improve developer experience.
export function useChat(options: UseChatOptions) {
packages/vue/src/utils/deep-to-raw.ts:11
- Add unit tests for
deepToRawcovering arrays, nested objects, refs/reactive proxies, and primitive values to ensure correctness across cases.
export function deepToRaw<T>(input: T): T {
packages/vue/src/index.ts:2
- The syntax 'export type * from ...' is not supported by TypeScript. Use 'export * from "@xsai-use/shared"' to re-export all exports, or explicitly list types with 'export type { X, Y } from ...'.
export type * from '@xsai-use/shared'
packages/vue/src/use-chat.ts:73
structuredClonemay not be available in all environments. Verify compatibility targets or include a polyfill/deep-clone fallback for broader support.
const clonedMessage = structuredClone(message)
kwaa
approved these changes
Jun 13, 2025
Member
|
Rebase is required. |
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
… handling in use-chat.ts
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#6