Skip to content

fix: fixed an issue with incorrect CSS file names in the remote build artifacts.#262

Merged
zzcr merged 1 commit intodevfrom
zzc/fix-remoter-bug-1213
Dec 23, 2025
Merged

fix: fixed an issue with incorrect CSS file names in the remote build artifacts.#262
zzcr merged 1 commit intodevfrom
zzc/fix-remoter-bug-1213

Conversation

@zzcr
Copy link
Member

@zzcr zzcr commented Dec 23, 2025

fix: 修复remoter构建产物css文件名称错误问题

Summary by CodeRabbit

  • New Features

    • Added browser extension context support for improved chat functionality in extension environments.
  • Bug Fixes

    • Fixed streaming behavior to prevent unintended side effects in multi-turn conversations.
    • Improved transport handling for extension-based operations.
  • Chores

    • Version bumps to beta.4 releases.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

The changes update package versions and introduce browser extension context support to the chat component. A new inBrowserExt flag conditionally gates model-change watchers in the chat composable. The SDK removes transport closure guards for ExtensionClientTransport and filters options from streaming LLM calls. Build configuration is updated to customize asset naming conventions.

Changes

Cohort / File(s) Summary
Version Bumps
packages/next-remoter/package.json, packages/next-sdk/package.json
Updated minor beta versions: next-remoter 0.0.10-beta.3 → 0.0.10-beta.4, next-sdk 0.1.15-beta.3 → 0.1.15-beta.4
Browser Extension Context
packages/next-remoter/src/components/tiny-robot-chat.vue, packages/next-remoter/src/composable/useTinyRobotChat.ts
Added inBrowserExt?: Ref<boolean> option to expose browser extension context. Model-change watcher registration is now conditional on inBrowserExt.value, gating updates to CustomAgentModelProvider when running in extension mode
Build Configuration
packages/next-remoter/vite.config.ts
Added custom asset naming handler: CSS assets output to style.css, non-CSS assets use default pattern assets/[name]-[hash][extname]
SDK Transport & Streaming
packages/next-sdk/agent/AgentModelProvider.ts
Removed guard preventing ExtensionClientTransport closure; now undergoes standard termination. Removed system and onFinish options from streaming LLM calls in ReAct flow to prevent multi-turn side effects

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A carrot-coded dance, extension context flows,
Watchers now conditional where browser extension goes,
Assets renamed neatly, transports now free,
Beta bumps forward to 0.0.10.3! 🚀

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title describes fixing CSS file names in build artifacts, which directly aligns with the vite.config.ts changes that customize asset naming for CSS files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch zzc/fix-remoter-bug-1213

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 088744c and 86925d2.

📒 Files selected for processing (6)
  • packages/next-remoter/package.json
  • packages/next-remoter/src/components/tiny-robot-chat.vue
  • packages/next-remoter/src/composable/useTinyRobotChat.ts
  • packages/next-remoter/vite.config.ts
  • packages/next-sdk/agent/AgentModelProvider.ts
  • packages/next-sdk/package.json
🔇 Additional comments (7)
packages/next-remoter/package.json (1)

3-3: LGTM!

Version bump to 0.0.10-beta.4 aligns with the CSS filename fix in this PR.

packages/next-sdk/package.json (1)

3-3: LGTM!

Version bump to 0.1.15-beta.4 is consistent with the coordinated package updates in this PR.

packages/next-sdk/agent/AgentModelProvider.ts (1)

604-612: LGTM!

Removing system and onFinish from restOptions before each streaming LLM call in ReAct mode is correct:

  • system is already embedded in messagesForModel, so passing it again could cause duplication.
  • onFinish should only trigger once at the end of the full ReAct loop (handled via streamCompleteResolver), not after each intermediate step.
packages/next-remoter/vite.config.ts (1)

59-71: LGTM! This addresses the PR objective.

The assetFileNames configuration correctly fixes CSS file naming in build artifacts:

  • Uses assetInfo.names?.[0] to avoid the deprecated name property.
  • Forces CSS output to style.css for consistent library bundling.

One consideration: if multiple CSS files exist, they would all be named style.css and potentially overwrite each other. This is typically fine for library builds where CSS is bundled into a single file, but worth verifying that's the intended behavior.

packages/next-remoter/src/composable/useTinyRobotChat.ts (2)

430-447: LGTM!

The model-change watcher is correctly gated behind inBrowserExt.value. This ensures that model switching functionality (which relies on browser extension APIs) is only active in the appropriate context.

Note that the check if (inBrowserExt.value) evaluates once at composable setup time, meaning the watcher registration is determined at initialization. This is appropriate since browser extension context doesn't change during the component lifecycle.


18-18: LGTM!

Clean addition of the inBrowserExt option to the interface, following the same pattern as isGenuiEnabled.

packages/next-remoter/src/components/tiny-robot-chat.vue (1)

341-341: LGTM!

Correctly forwards the inBrowserExt prop to the composable using toRef, consistent with the pattern used for other props like sessionId and agentRoot.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zzcr zzcr merged commit 64b9cf5 into dev Dec 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments