Closed Ricbet closed 3 months ago
This PR was not deployed automatically as @Ricbet does not have access to the Railway project.
In order to get automatic PR deploys, please add @Ricbet to the project inside the project settings page.
此次更改涉及对多个文件的调整,主要集中在将字符串常量替换为AISerivceType
枚举类型,以提高代码的一致性和可维护性。此外,还对一些变量名称和参数结构进行了优化,以改善代码的清晰度和可读性。
文件路径 | 更改摘要 |
---|---|
packages/ai-native/src/browser/chat/chat.internal.service.ts |
删除与CancelResponse 、CancellationTokenSource 、ErrorResponse 、IAIBackServiceOption 和ReplyResponse 相关的import,并相应调整import语句。 |
packages/ai-native/src/browser/chat/chat.view.tsx |
更新AIChatView 组件中AISerivceType 常量的使用,移除冗余的msgType 赋值并调整其使用场景。 |
packages/ai-native/src/browser/components/ChatReply.tsx |
更新ChatReply 组件中message 属性为assistantMessage ,影响响应文本的处理和交互成功或失败的报告。 |
packages/ai-native/src/browser/contrib/rename/rename.handler.ts |
修改RenameHandler 类中aiReporter 的start 方法,使用AISerivceType.Rename 常量替代字符串'rename' 。 |
packages/ai-native/src/browser/contrib/terminal/ps1-terminal.service.tsx |
添加AISerivceType 到import列表,并将aiReporter 的start 方法中字符串常量替换为AISerivceType.TerminalAICommand 。 |
packages/ai-native/src/common/index.ts |
将enum ChatCompletionRequestMessageRoleEnum 转换为const enum ,以优化枚举的使用。 |
packages/core-common/src/types/ai-native/reporter.ts |
添加新枚举值TerminalAICommand 到AIServiceType ,引入ChatRT 接口,并扩展ReportInfo 以包括Chat 和Agent 类型及相应接口。 |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 33.33333%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 55.02%. Comparing base (
8437c2e
) to head (22f0de3
). Report is 4 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
...i-native/src/browser/chat/chat.internal.service.ts | 0.00% | 1 Missing :warning: |
...ative/src/browser/contrib/rename/rename.handler.ts | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Types
Background or solution
Changelog
修正 chat 面板的埋点上报
Summary by CodeRabbit
新功能
优化
aiReporter.start
方法调用中的参数结构,使其更加清晰和一致。Bug 修复