-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
🐛 fix: fix connection checker #2672
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👍 @arvinxx Thank you for raising your pull request and contributing to our Community |
Warning Rate Limit Exceeded@arvinxx has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 25 minutes and 27 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThis update refactors the codebase to replace references to Changes
Assessment against linked issues
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2672 +/- ##
==========================================
- Coverage 93.73% 93.72% -0.02%
==========================================
Files 352 353 +1
Lines 20407 20403 -4
Branches 2430 2426 -4
==========================================
- Hits 19128 19122 -6
- Misses 1279 1281 +2 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 22
Outside diff range and nitpick comments (8)
src/app/(main)/settings/llm/components/ProviderModelList/Option.tsx (1)
Line range hint
45-45
: Avoid using non-null assertions as they can lead to runtime errors if the object is null or undefined. Consider adding proper null checks.- <ModelInfoTags directionReverse placement={'top'} {...model!} /> + {model && <ModelInfoTags directionReverse placement={'top'} {...model} />}src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx (1)
Line range hint
35-35
: The use ofany
type should be avoided as it bypasses TypeScript's type checking. Specify a more appropriate type for better type safety.Also applies to: 36-36
src/app/(main)/settings/llm/components/ProviderModelList/index.tsx (1)
Line range hint
96-96
: Avoid usingany
type for theoptions
parameter in theonChange
handler to ensure type safety.- onChange={(value, options) => { + onChange<(value: string[], options: OptionType[]) => {src/app/(main)/settings/llm/components/ProviderConfig/index.tsx (1)
Line range hint
115-115
: Avoid usingany
type for translation function parameters to ensure type safety.- placeholder={modelT(`${provider}.token.placeholder` as any)} + placeholder={modelT(`${provider}.token.placeholder` as keyof typeof modelT)} - desc: modelT(`${provider}.token.desc` as any), + desc: modelT(`${provider}.token.desc` as keyof typeof modelT), - label: modelT(`${provider}.token.title` as any), + label: modelT(`${provider}.token.title` as keyof typeof modelT),Also applies to: 118-118, 119-119
src/services/config.ts (2)
Line range hint
66-68
: Ensure that the fall-through in the switch-case is intentional and documented to avoid potential bugs.Consider adding a comment right above the fall-through to explicitly state that it is intentional, for clarity and maintainability.
Line range hint
7-11
: These imports are only used as types. Consider using TypeScript'simport type
to make this explicit and potentially optimize bundling.- import { ConfigFile } from '@/types/exportConfig'; - import { ChatMessage } from '@/types/message'; - import { LobeSessions, SessionGroupItem } from '@/types/session'; - import { ChatTopic } from '@/types/topic'; + import type { ConfigFile } from '@/types/exportConfig'; + import type { ChatMessage } from '@/types/message'; + import type { LobeSessions, SessionGroupItem } from '@/types/session'; + import type { ChatTopic } from '@/types/topic';src/store/user/slices/modelList/action.ts (2)
Line range hint
119-119
: The use ofany
type inisProviderEnabled
method call. Specifying a more explicit type would enhance type safety.Consider replacing
any
with a specific type that accurately represents the expected input.
Line range hint
1-2
: These imports are only used as types. Consider using TypeScript'simport type
to make this explicit and potentially optimize bundling.- import { produce } from 'immer'; - import useSWR, { SWRResponse } from 'swr'; - import { DEFAULT_MODEL_PROVIDER_LIST } from '@/config/modelProviders'; - import { ModelProvider } from '@/libs/agent-runtime'; - import { UserStore } from '@/store/user'; + import type { produce } from 'immer'; + import type { SWRResponse } from 'swr'; + import type { DEFAULT_MODEL_PROVIDER_LIST } from '@/config/modelProviders'; + import type { ModelProvider } from '@/libs/agent-runtime'; + import type { UserStore } from '@/store/user';Also applies to: 6-8
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (51)
- src/app/(main)/settings/llm/Bedrock/index.tsx (1 hunks)
- src/app/(main)/settings/llm/components/Checker.tsx (2 hunks)
- src/app/(main)/settings/llm/components/ProviderConfig/index.tsx (1 hunks)
- src/app/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx (1 hunks)
- src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx (1 hunks)
- src/app/(main)/settings/llm/components/ProviderModelList/Option.tsx (1 hunks)
- src/app/(main)/settings/llm/components/ProviderModelList/index.tsx (1 hunks)
- src/const/settings/agent.ts (2 hunks)
- src/const/settings/common.ts (1 hunks)
- src/const/settings/index.ts (2 hunks)
- src/const/settings/llm.ts (1 hunks)
- src/const/settings/sync.ts (1 hunks)
- src/const/settings/systemAgent.ts (2 hunks)
- src/const/settings/tts.ts (1 hunks)
- src/database/client/core/migrations/migrateSettingsToUser/type.ts (1 hunks)
- src/database/client/models/tests/user.test.ts (1 hunks)
- src/database/client/models/user.ts (2 hunks)
- src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx (1 hunks)
- src/features/Conversation/Error/APIKeyForm/index.tsx (1 hunks)
- src/features/Conversation/components/BubblesLoading.tsx (1 hunks)
- src/services/tests/share.test.ts (2 hunks)
- src/services/_auth.test.ts (2 hunks)
- src/services/config.ts (2 hunks)
- src/services/share.ts (3 hunks)
- src/services/user/client.test.ts (3 hunks)
- src/services/user/client.ts (2 hunks)
- src/services/user/type.ts (1 hunks)
- src/store/agent/store.ts (2 hunks)
- src/store/chat/store.ts (2 hunks)
- src/store/file/store.ts (2 hunks)
- src/store/global/store.ts (2 hunks)
- src/store/market/store.ts (2 hunks)
- src/store/middleware/createDevtools.ts (1 hunks)
- src/store/serverConfig/store.ts (2 hunks)
- src/store/session/store.ts (2 hunks)
- src/store/tool/store.ts (2 hunks)
- src/store/user/slices/common/action.ts (2 hunks)
- src/store/user/slices/modelList/action.test.ts (2 hunks)
- src/store/user/slices/modelList/action.ts (2 hunks)
- src/store/user/slices/modelList/selectors/modelConfig.ts (1 hunks)
- src/store/user/slices/modelList/selectors/modelProvider.ts (1 hunks)
- src/store/user/slices/settings/action.test.ts (4 hunks)
- src/store/user/slices/settings/action.ts (1 hunks)
- src/store/user/slices/settings/initialState.ts (1 hunks)
- src/store/user/slices/settings/selectors/settings.ts (2 hunks)
- src/store/user/store.ts (2 hunks)
- src/types/exportConfig.ts (2 hunks)
- src/types/serverConfig.ts (2 hunks)
- src/types/user/index.ts (2 hunks)
- src/types/user/settings/general.ts (1 hunks)
- src/types/user/settings/index.ts (1 hunks)
Files not processed due to max files limit (5)
- src/types/user/settings/modelProvider.ts
- src/types/user/settings/sync.ts
- src/types/user/settings/systemAgent.ts
- src/types/user/settings/tool.ts
- src/types/user/settings/tts.ts
Files not reviewed due to errors (3)
- src/store/session/store.ts (no review received)
- src/store/tool/store.ts (no review received)
- src/features/Conversation/components/BubblesLoading.tsx (no review received)
Additional Context Used
Biome (157)
src/app/(main)/settings/llm/Bedrock/index.tsx (1)
9-10: All these imports are only used as types.
src/app/(main)/settings/llm/components/Checker.tsx (3)
21-21: Do not shadow the global "Error" property.
35-35: Unexpected any. Specify a different type.
13-14: All these imports are only used as types.
src/app/(main)/settings/llm/components/ProviderConfig/index.tsx (6)
115-115: Unexpected any. Specify a different type.
118-118: Unexpected any. Specify a different type.
119-119: Unexpected any. Specify a different type.
161-161: Forbidden non-null assertion.
6-7: Some named imports are only used as types.
20-21: All these imports are only used as types.
src/app/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx (1)
12-13: All these imports are only used as types.
src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx (1)
15-16: All these imports are only used as types.
src/app/(main)/settings/llm/components/ProviderModelList/Option.tsx (2)
45-45: Forbidden non-null assertion.
13-14: All these imports are only used as types.
src/app/(main)/settings/llm/components/ProviderModelList/index.tsx (3)
96-96: Unexpected any. Specify a different type.
5-6: Some named imports are only used as types.
11-12: All these imports are only used as types.
src/const/settings/agent.ts (2)
2-3: All these imports are only used as types.
3-4: All these imports are only used as types.
src/const/settings/common.ts (1)
1-1: All these imports are only used as types.
src/const/settings/index.ts (1)
1-1: All these imports are only used as types.
src/const/settings/llm.ts (1)
19-20: All these imports are only used as types.
src/const/settings/sync.ts (1)
1-1: All these imports are only used as types.
src/const/settings/systemAgent.ts (1)
1-1: All these imports are only used as types.
src/const/settings/tts.ts (1)
1-1: All these imports are only used as types.
src/database/client/core/migrations/migrateSettingsToUser/type.ts (4)
2-3: All these imports are only used as types.
3-4: All these imports are only used as types.
4-5: All these imports are only used as types.
5-6: All these imports are only used as types.
src/database/client/models/__tests__/user.test.ts (1)
8-8: Unexpected any. Specify a different type.
src/database/client/models/user.ts (5)
48-48: Unexpected any. Specify a different type.
1-1: All these imports are only used as types.
3-4: All these imports are only used as types.
4-5: All these imports are only used as types.
7-8: Some named imports are only used as types.
src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx (4)
35-35: Unexpected any. Specify a different type.
36-36: Unexpected any. Specify a different type.
3-4: Some named imports are only used as types.
8-9: All these imports are only used as types.
src/features/Conversation/Error/APIKeyForm/index.tsx (1)
7-8: All these imports are only used as types.
src/features/Conversation/components/BubblesLoading.tsx (4)
45-45: Alternative text title element cannot be empty
46-46: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
47-47: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
48-48: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
src/services/__tests__/share.test.ts (4)
1-1: All these imports are only used as types.
1-2: Some named imports are only used as types.
4-5: All these imports are only used as types.
5-6: All these imports are only used as types.
src/services/_auth.test.ts (1)
5-6: All these imports are only used as types.
src/services/config.ts (6)
66-68: This case is falling through to the next case.
7-8: All these imports are only used as types.
8-9: All these imports are only used as types.
9-10: All these imports are only used as types.
10-11: All these imports are only used as types.
11-12: All these imports are only used as types.
src/services/share.ts (3)
1-1: All these imports are only used as types.
3-4: All these imports are only used as types.
4-5: All these imports are only used as types.
src/services/user/client.test.ts (6)
41-41: The computed expression can be simplified without the use of a string literal.
94-94: The computed expression can be simplified without the use of a string literal.
1-1: All these imports are only used as types.
1-2: Some named imports are only used as types.
4-5: All these imports are only used as types.
5-6: All these imports are only used as types.
src/services/user/client.ts (4)
1-1: All these imports are only used as types.
5-6: All these imports are only used as types.
6-7: All these imports are only used as types.
9-10: All these imports are only used as types.
src/services/user/type.ts (6)
8-8: Unexpected any. Specify a different type.
9-9: Unexpected any. Specify a different type.
10-10: Unexpected any. Specify a different type.
1-1: All these imports are only used as types.
2-3: All these imports are only used as types.
3-4: All these imports are only used as types.
src/store/agent/store.ts (3)
2-3: All these imports are only used as types.
5-6: Some named imports are only used as types.
6-7: Some named imports are only used as types.
src/store/chat/store.ts (8)
3-4: All these imports are only used as types.
6-7: Some named imports are only used as types.
7-8: Some named imports are only used as types.
8-9: Some named imports are only used as types.
9-10: Some named imports are only used as types.
10-11: Some named imports are only used as types.
11-12: Some named imports are only used as types.
12-13: Some named imports are only used as types.
src/store/file/store.ts (4)
2-3: All these imports are only used as types.
5-6: Some named imports are only used as types.
6-7: Some named imports are only used as types.
7-8: Some named imports are only used as types.
src/store/global/store.ts (1)
3-4: All these imports are only used as types.
src/store/market/store.ts (1)
1-1: Some named imports are only used as types.
src/store/middleware/createDevtools.ts (2)
21-21: Template literals are preferred over string concatenation.
1-2: All these imports are only used as types.
src/store/serverConfig/store.ts (5)
1-1: All these imports are only used as types.
4-5: All these imports are only used as types.
6-7: Some named imports are only used as types.
8-9: All these imports are only used as types.
10-11: All these imports are only used as types.
src/store/session/store.ts (5)
29-30: Template literals are preferred over string concatenation.
3-4: All these imports are only used as types.
8-9: Some named imports are only used as types.
9-10: Some named imports are only used as types.
10-11: Some named imports are only used as types.
src/store/tool/store.ts (6)
2-3: All these imports are only used as types.
5-6: Some named imports are only used as types.
6-7: Some named imports are only used as types.
7-8: Some named imports are only used as types.
8-9: Some named imports are only used as types.
9-10: Some named imports are only used as types.
src/store/user/slices/common/action.ts (4)
73-73: Avoid redundant double-negation.
1-1: Some named imports are only used as types.
1-2: All these imports are only used as types.
9-10: All these imports are only used as types.
src/store/user/slices/modelList/action.test.ts (3)
189-189: Forbidden non-null assertion.
6-7: All these imports are only used as types.
9-10: All these imports are only used as types.
src/store/user/slices/modelList/action.ts (6)
119-119: Unexpected any. Specify a different type.
1-2: Some named imports are only used as types.
6-7: All these imports are only used as types.
7-8: All these imports are only used as types.
8-9: All these imports are only used as types.
11-12: Some named imports are only used as types.
src/store/user/slices/modelList/selectors/modelConfig.ts (2)
1-1: All these imports are only used as types.
2-3: All these imports are only used as types.
src/store/user/slices/modelList/selectors/modelProvider.ts (4)
3-4: All these imports are only used as types.
4-5: All these imports are only used as types.
5-6: All these imports are only used as types.
7-8: All these imports are only used as types.
src/store/user/slices/settings/action.test.ts (2)
8-9: All these imports are only used as types.
9-10: All these imports are only used as types.
src/store/user/slices/settings/action.ts (5)
1-1: All these imports are only used as types.
2-3: All these imports are only used as types.
7-8: All these imports are only used as types.
8-9: All these imports are only used as types.
9-10: All these imports are only used as types.
src/store/user/slices/settings/initialState.ts (2)
1-1: All these imports are only used as types.
3-4: All these imports are only used as types.
src/store/user/slices/settings/selectors/settings.ts (3)
8-9: All these imports are only used as types.
9-14: All these imports are only used as types.
17-18: All these imports are only used as types.
src/store/user/store.ts (1)
3-4: All these imports are only used as types.
src/types/exportConfig.ts (4)
1-1: All these imports are only used as types.
1-2: All these imports are only used as types.
2-3: All these imports are only used as types.
3-4: All these imports are only used as types.
src/types/serverConfig.ts (3)
1-1: All these imports are only used as types.
2-3: All these imports are only used as types.
3-4: All these imports are only used as types.
src/types/user/index.ts (2)
1-1: All these imports are only used as types.
2-3: All these imports are only used as types.
src/types/user/settings/general.ts (1)
3-4: All these imports are only used as types.
src/types/user/settings/index.ts (6)
3-4: All these imports are only used as types.
6-7: All these imports are only used as types.
7-8: All these imports are only used as types.
8-9: All these imports are only used as types.
9-10: All these imports are only used as types.
10-11: All these imports are only used as types.
GitHub Check Runs (1)
codecov/patch success (2)
src/store/middleware/createDevtools.ts: [warning] 16-17: src/store/middleware/createDevtools.ts#L16-L17
Added lines #L16 - L17 were not covered by tests
src/store/user/slices/settings/selectors/settings.ts: [warning] 41-41: src/store/user/slices/settings/selectors/settings.ts#L41
Added line #L41 was not covered by tests
Additional comments not posted (51)
src/const/settings/sync.ts (2)
1-1
: The import is correctly used as a type, which is appropriate for TypeScript projects to ensure type safety without bloating the runtime.
3-3
: The definition ofDEFAULT_SYNC_CONFIG
is clear and follows best practices for defining constants with appropriate default values.src/const/settings/common.ts (2)
1-1
: The import is correctly used as a type, which is appropriate for TypeScript projects to ensure type safety without bloating the runtime.
3-3
: The definition ofDEFAULT_COMMON_SETTINGS
is clear and follows best practices for defining constants with appropriate default values.src/const/settings/tts.ts (2)
1-1
: The import is correctly used as a type, which is appropriate for TypeScript projects to ensure type safety without bloating the runtime.
3-3
: The definition ofDEFAULT_TTS_CONFIG
is clear and follows best practices for defining constants with appropriate default values.src/store/user/slices/settings/initialState.ts (2)
1-1
: The imports are correctly used as types, which is appropriate for TypeScript projects to ensure type safety without bloating the runtime.Also applies to: 4-4
7-8
: The structure and definition ofUserSettingsState
andinitialSettingsState
are clear and follow best practices for state management in Redux-like stores.src/types/user/settings/general.ts (1)
6-12
: TheUserGeneralSettings
interface is well-defined with appropriate types. The use of deprecation for thepassword
field is a good practice, signaling future removals without breaking existing code.src/const/settings/systemAgent.ts (2)
1-1
: The import is correctly used as a type, which is appropriate for TypeScript projects to ensure type safety without bloating the runtime.
10-10
: The definition ofDEFAULT_SYSTEM_AGENT_CONFIG
is clear and follows best practices for defining constants with appropriate default values.src/store/middleware/createDevtools.ts (1)
21-21
: Use template literals for string concatenation to improve readability and maintainability.
[REFACTOR_SUGGESTion]- name: `LobeChat_${name}` + (isDev ? '_DEV' : ''), + name: `LobeChat_${name}${isDev ? '_DEV' : ''}`,src/types/serverConfig.ts (1)
19-19
: Ensure that thedefaultAgent
field inGlobalServerConfig
is properly handled in all relevant parts of the application, especially considering its optional nature.src/const/settings/index.ts (1)
19-19
: The structure ofDEFAULT_SETTINGS
looks correct and aligns with the newUserSettings
type. Ensure that all components usingDEFAULT_SETTINGS
are updated to handle the new structure.src/store/agent/store.ts (1)
22-22
: The integration ofcreateDevtools
inuseAgentStore
appears correct. Ensure that the store's behavior remains consistent with the expected functionality.Verification successful
The search results indicate that
useAgentStore
is well-covered in multiple test files, ensuring that its behavior is validated across various scenarios.
- Files with references to
useAgentStore
in tests:
src/store/agent/slices/chat/action.test.ts
src/store/chat/slices/message/selectors.test.ts
src/store/chat/slices/message/action.test.ts
src/features/Conversation/Extras/Assistant.test.tsx
Given this extensive coverage, it is reasonable to conclude that the integration of
createDevtools
inuseAgentStore
has been adequately tested and should maintain the expected functionality.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the behavior of `useAgentStore`. # Test: Search for tests covering `useAgentStore`. Expect: Tests validate expected functionality. rg --type test "useAgentStore" "src/store/agent/"Length of output: 76
Script:
#!/bin/bash # Description: Verify the behavior of `useAgentStore`. # Test: Search for tests covering `useAgentStore`. Expect: Tests validate expected functionality. # Correcting the file type to search for test files. rg "useAgentStore" --glob "*test.*"Length of output: 3001
src/store/global/store.ts (1)
24-24
: The integration ofcreateDevtools
inuseGlobalStore
usingsubscribeWithSelector
is implemented correctly. Verify that this change does not affect the performance or expected behavior of the store.src/store/file/store.ts (2)
21-23
: TheuseFileStore
function uses thecreateDevtools
wrapper correctly. Ensure that the store functionality integrates well with the rest of the application.Verification successful
The
useFileStore
function is widely integrated across various parts of the application, including tests, services, features, and components. This extensive usage suggests that the store functionality is well-integrated with the rest of the application.
- Integration Points:
src/store/file/slices/images/action.test.ts
src/store/file/slices/tts/action.test.ts
src/store/file/index.ts
src/services/chat.ts
src/services/__tests__/chat.test.ts
src/features/Conversation/Extras/TTS/InitPlayer.tsx
src/features/Conversation/Extras/TTS/FilePlayer.tsx
src/features/ChatInput/useSend.ts
src/features/ChatInput/ActionBar/FileUpload.tsx
src/features/ChatInput/ActionBar/Clear.tsx
src/app/(main)/settings/common/features/Common.tsx
src/components/FileList/ImageFileItem.tsx
src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx
src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files.tsx
src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/LocalFiles.tsx
src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/DragUpload.tsx
Given the extensive integration, it is crucial to ensure that any changes to
useFileStore
are thoroughly tested to avoid breaking functionality in these areas.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify integration of `useFileStore` across the application. # Test: Search for usage of `useFileStore`. Expect: Correct integration without issues. rg --type python $'useFileStore'Length of output: 62
Script:
#!/bin/bash # Description: Verify integration of `useFileStore` across the application. # Test: Search for usage of `useFileStore`. Expect: Correct integration without issues. rg --type ts 'useFileStore'Length of output: 3632
5-5
: Ensure thatcreateDevtools
is correctly implemented and tested since it's a new import.Verification successful
The implementation of
createDevtools
has been verified and it appears to be correctly defined insrc/store/middleware/createDevtools.ts
. The function checks the URL for a debug parameter and conditionally enables devtools based on that.
createDevtools
is implemented insrc/store/middleware/createDevtools.ts
.- It conditionally enables devtools based on the URL parameters.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of `createDevtools`. # Test: Search for the implementation of `createDevtools`. Expect: Proper implementation and associated tests. rg --type python $'createDevtools'Length of output: 64
Script:
#!/bin/bash # Description: Verify the implementation of `createDevtools`. # Test: Search for the implementation of `createDevtools`. Expect: Proper implementation and associated tests. rg --type js,ts 'createDevtools'Length of output: 62
Script:
#!/bin/bash # Description: Verify the implementation of `createDevtools`. # Test: Search for the implementation of `createDevtools`. Expect: Proper implementation and associated tests. rg --type js 'createDevtools' rg --type ts 'createDevtools'Length of output: 1550
Script:
#!/bin/bash # Description: Extract the implementation of `createDevtools`. # Test: Retrieve the implementation details of `createDevtools` from the specified file. rg --type ts 'export const createDevtools' -A 20 src/store/middleware/createDevtools.tsLength of output: 589
src/types/user/index.ts (2)
42-42
: Thesettings
field inUserInitializationState
correctly usesDeepPartial<UserSettings>
, ensuring flexibility in partial updates. Good use of TypeScript features for robust type safety.
3-3
: The import ofUserSettings
is appropriate for the new user-specific settings architecture. Ensure all references to this type are updated accordingly.Verification successful
The previous script did not find any occurrences of
GlobalSettings
in TypeScript files, which suggests that the references have been updated correctly. However, to ensure thorough verification, we should also check for the usage ofUserSettings
to confirm that it has been integrated properly.
The search results show that
UserSettings
is widely used across the codebase, indicating that the transition fromGlobalSettings
toUserSettings
has been implemented thoroughly.
UserSettings
is imported and used in various files, including type definitions, state management, services, and tests.- There are no remaining references to
GlobalSettings
, confirming that the update is complete.This confirms that the import of
UserSettings
insrc/types/user/index.ts
is appropriate and consistent with the rest of the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `UserSettings` are updated. # Test: Search for outdated references to `GlobalSettings`. Expect: No occurrences. rg --type python $'GlobalSettings'Length of output: 64
Script:
#!/bin/bash # Description: Verify all references to `UserSettings` are updated. # Test: Search for outdated references to `GlobalSettings`. Expect: No occurrences. rg --type ts $'GlobalSettings'Length of output: 29
Script:
#!/bin/bash # Description: Verify the usage of `UserSettings` in the codebase. # Test: Search for references to `UserSettings`. Expect: Relevant occurrences. rg --type ts $'UserSettings'Length of output: 9900
src/const/settings/agent.ts (1)
4-4
: The import ofUserDefaultAgent
aligns with the new user-specific settings architecture. Ensure that the type is correctly defined and used.Verification successful
The
UserDefaultAgent
type is correctly defined and used in the codebase. Here are the relevant locations:
- Definition:
src/types/user/settings/index.ts
- Usage:
src/types/serverConfig.ts
,src/const/settings/agent.ts
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the definition and usage of `UserDefaultAgent`. # Test: Search for the definition and usage of `UserDefaultAgent`. Expect: Correct definition and usage. rg --type python $'UserDefaultAgent'Length of output: 66
Script:
#!/bin/bash # Description: Verify the definition and usage of `UserDefaultAgent`. # Test: Search for the definition and usage of `UserDefaultAgent`. Expect: Correct definition and usage. rg --type typescript 'UserDefaultAgent'Length of output: 74
Script:
#!/bin/bash # Description: Verify the definition and usage of `UserDefaultAgent`. # Test: Search for the definition and usage of `UserDefaultAgent`. Expect: Correct definition and usage. rg --type ts 'UserDefaultAgent'Length of output: 548
src/store/market/store.ts (2)
8-8
: The import ofcreateDevtools
is correctly implemented.
43-46
: The integration ofcreateDevtools
with the store creation function is correctly implemented.src/types/user/settings/index.ts (1)
1-54
: The file is well-organized with clear type definitions and appropriate use of type-only imports. The deprecation comments within theUserSettings
interface are helpful for maintaining backward compatibility while guiding future refactoring.src/store/chat/store.ts (2)
6-6
: The import ofcreateDevtools
is correctly implemented.
39-42
: The integration ofcreateDevtools
with the store creation function is correctly implemented.src/store/user/store.ts (2)
6-6
: The import ofcreateDevtools
is correctly implemented.
37-40
: The integration ofcreateDevtools
with the store creation function is correctly implemented.src/services/user/client.ts (1)
Line range hint
1-36
: TheClientService
class is well-implemented with clear methods for user settings management. The use ofUserSettings
in type annotations is appropriate, ensuring type safety.src/services/share.ts (1)
Line range hint
1-54
: TheShareService
class is well-implemented with clear methods for sharing settings and conversations. The use ofUserSettings
in type annotations is appropriate, ensuring type safety.src/store/serverConfig/store.ts (1)
44-47
: The introduction ofcreateDevtools
enhances modularity and maintainability by encapsulating the devtools configuration.src/const/settings/llm.ts (2)
20-20
: The import change aligns with the renaming of settings types from global to user-specific. This is consistent with the PR's objectives.
22-22
: The definition ofDEFAULT_LLM_CONFIG
usingUserModelProviderConfig
is appropriate and reflects the shift to user-specific settings. The use offilterEnabledModels
enhances modularity by dynamically adjusting the configuration based on the provider.src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx (2)
16-16
: The import change aligns with the renaming of settings types from global to user-specific. This is consistent with the PR's objectives.
16-16
: The component logic for fetching model lists based on the provider is well-encapsulated using custom hooks and store selectors. This enhances maintainability and readability.src/app/(main)/settings/llm/components/Checker.tsx (2)
53-53
: The introduction of theisError
flag enhances error handling by providing a clear mechanism to track and respond to errors during the connection check process.
Line range hint
53-81
: The logic for checking the connection and updating the UI based on the result is correctly implemented using React state hooks and asynchronous handling. This ensures a responsive and accurate user interface.src/app/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx (2)
13-13
: The import change aligns with the renaming of settings types from global to user-specific. This is consistent with the PR's objectives.
13-13
: The component logic for managing custom model options is well-encapsulated using custom hooks and store selectors. This enhances maintainability and readability.src/services/user/client.test.ts (2)
6-6
: The import change aligns with the renaming of settings types from global to user-specific. This is consistent with the PR's objectives.
6-6
: The test logic for theClientService
class is comprehensive and correctly uses mocks and spies to isolate the tests. This ensures that the tests are reliable and focused.src/services/__tests__/share.test.ts (2)
6-6
: The import change aligns with the renaming of settings types from global to user-specific. This is consistent with the PR's objectives.
6-6
: The test logic for theShareService
class is comprehensive and correctly uses mocks to isolate the tests. This ensures that the tests are reliable and focused.src/store/user/slices/common/action.ts (1)
11-11
: The import ofUserSettings
should be marked as a type-only import to clarify its usage and optimize bundling.- import type { UserSettings } from '@/types/user/settings'; + import type { UserSettings } from '@/types/user/settings';Likely invalid or redundant comment.
src/store/user/slices/settings/action.test.ts (1)
24-24
: Ensure that thepassword
field is explicitly excluded when updating settings, as it is deprecated.Also applies to: 72-72
Verification successful
Ensure that the
password
field is explicitly excluded when updating settings, as it is deprecated.The search results indicate multiple occurrences of the
password
field in the codebase, including in thesettings
context. Specifically, the following lines are relevant to the settings updates:
src/store/user/slices/settings/action.ts: const { password: _, ...settings } = importAppSettings;
src/store/user/slices/settings/selectors/settings.ts: const { password: _, ...settings } = currentSettings(s);
These lines show that the
password
field is being excluded when updating settings, which aligns with the requirement to exclude the deprecatedpassword
field.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `password` field is not being used in settings updates. # Test: Search for the `password` field usage in settings updates. Expect: No occurrences. rg --type python $'password'Length of output: 58
Script:
#!/bin/bash # Description: Verify that the `password` field is not being used in settings updates. # Test: Search for the `password` field usage in settings updates. Expect: No occurrences. rg --type typescript 'password'Length of output: 66
Script:
#!/bin/bash # Description: Verify that the `password` field is not being used in settings updates. # Test: Search for the `password` field usage in settings updates. Expect: No occurrences. rg --type ts 'password'Length of output: 5956
src/services/config.ts (2)
12-12
: The import ofUserSettings
is correctly updated to reflect the new user-specific settings architecture.
38-38
: TheimportSettings
method correctly uses the updatedUserSettings
type for its parameter, ensuring type safety and consistency with the new settings architecture.src/store/user/slices/modelList/action.ts (2)
9-9
: The import ofUserModelProviderConfig
andGlobalLLMProviderKey
is correctly updated to reflect the new user-specific settings architecture.
31-31
: ThesetModelProviderConfig
method correctly uses the updatedUserModelProviderConfig
type for its parameter, ensuring type safety and consistency with the new settings architecture.src/store/user/slices/modelList/action.test.ts (2)
7-7
: The import ofOpenAICompatibleProviderConfig
is correctly updated to reflect the new user-specific settings architecture.
27-27
: The test case forsetModelProviderConfig
correctly uses the updatedOpenAICompatibleProviderConfig
type for its parameter, ensuring type safety and consistency with the new settings architecture.
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'; | |||
|
|||
import { useUserStore } from '@/store/user'; | |||
import { settingsSelectors } from '@/store/user/selectors'; | |||
import { GlobalLLMProviderKey } from '@/types/settings'; | |||
import { GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
The import of GlobalLLMProviderKey
is only used as a type. Consider using TypeScript's import type
syntax to make this explicit.
- import { GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { GlobalLLMProviderKey } from '@/types/user/settings'; |
@@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'; | |||
import { Flexbox } from 'react-layout-kit'; | |||
|
|||
import { ModelProvider } from '@/libs/agent-runtime'; | |||
import { GlobalLLMProviderKey } from '@/types/settings'; | |||
import { GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
The import of GlobalLLMProviderKey
is only used as a type. Consider using TypeScript's import type
syntax to make this explicit.
- import { GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { GlobalLLMProviderKey } from '@/types/user/settings'; |
import { ChatTopic } from '@/types/topic'; | ||
import { UserSettings } from '@/types/user/settings'; |
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.
The import of UserSettings
is only used as a type. Consider using TypeScript's import type
syntax to make this explicit.
- import { UserSettings } from '@/types/user/settings';
+ import type { UserSettings } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { UserSettings } from '@/types/user/settings'; | |
import type { UserSettings } from '@/types/user/settings'; |
@@ -5,7 +5,7 @@ import { Center, Flexbox } from 'react-layout-kit'; | |||
|
|||
import { ModelProvider } from '@/libs/agent-runtime'; | |||
import { useChatStore } from '@/store/chat'; | |||
import { GlobalLLMProviderKey } from '@/types/settings'; | |||
import { GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
The import of GlobalLLMProviderKey
is only used as a type. Consider using TypeScript's import type
syntax to make this explicit.
- import { GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { GlobalLLMProviderKey } from '@/types/user/settings'; |
@@ -7,15 +7,15 @@ import { userService } from '@/services/user'; | |||
import type { UserStore } from '@/store/user'; | |||
import { LocaleMode } from '@/types/locale'; | |||
import { LobeAgentSettings } from '@/types/session'; | |||
import { GlobalSettings } from '@/types/settings'; | |||
import { UserSettings } from '@/types/user/settings'; |
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.
The import of UserSettings
is only used as a type. Consider using TypeScript's import type
syntax to make this explicit.
- import { UserSettings } from '@/types/user/settings';
+ import type { UserSettings } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { UserSettings } from '@/types/user/settings'; | |
import type { UserSettings } from '@/types/user/settings'; |
@@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit'; | |||
|
|||
import { useUserStore } from '@/store/user'; | |||
import { modelProviderSelectors } from '@/store/user/selectors'; | |||
import { GlobalLLMProviderKey } from '@/types/settings'; | |||
import { GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
The import of GlobalLLMProviderKey
should be marked as a type-only import to clarify its usage and optimize bundling.
- import { GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { GlobalLLMProviderKey } from '@/types/user/settings'; |
@@ -11,7 +11,7 @@ import ModelIcon from '@/components/ModelIcon'; | |||
import { ModelInfoTags } from '@/components/ModelSelect'; | |||
import { useUserStore } from '@/store/user'; | |||
import { modelProviderSelectors } from '@/store/user/selectors'; | |||
import { GlobalLLMProviderKey } from '@/types/settings'; | |||
import { GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
Consider using import type
for imports that are only used as types to clarify their usage and optimize bundling.
- import { GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { GlobalLLMProviderKey } from '@/types/user/settings'; |
@@ -3,7 +3,7 @@ import { describe, expect, it, vi } from 'vitest'; | |||
|
|||
import { ModelProvider } from '@/libs/agent-runtime'; | |||
import { useUserStore } from '@/store/user'; | |||
import { GlobalLLMConfig, GlobalLLMProviderKey } from '@/types/settings'; | |||
import { UserModelProviderConfig, GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
The import of UserModelProviderConfig
and GlobalLLMProviderKey
should be marked as type-only imports to clarify their usage and optimize bundling.
- import { UserModelProviderConfig, GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { UserModelProviderConfig, GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { UserModelProviderConfig, GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { UserModelProviderConfig, GlobalLLMProviderKey } from '@/types/user/settings'; |
@@ -18,7 +18,7 @@ import { | |||
import { FORM_STYLE } from '@/const/layoutTokens'; | |||
import { useUserStore } from '@/store/user'; | |||
import { modelConfigSelectors } from '@/store/user/selectors'; | |||
import { GlobalLLMProviderKey } from '@/types/settings'; | |||
import { GlobalLLMProviderKey } from '@/types/user/settings'; |
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.
The import of GlobalLLMProviderKey
should be marked as a type-only import to clarify its usage and optimize bundling.
- import { GlobalLLMProviderKey } from '@/types/user/settings';
+ import type { GlobalLLMProviderKey } from '@/types/user/settings';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import { GlobalLLMProviderKey } from '@/types/user/settings'; | |
import type { GlobalLLMProviderKey } from '@/types/user/settings'; |
showDevtools = true; | ||
} |
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.
Tip
Codebase Verification
The search across all identified test files did not yield any references to createDevtools
. This indicates that the new conditional logic in createDevtools
is not currently covered by unit tests.
Ensure to add unit tests for the new conditional logic in createDevtools
to verify its correct behavior under different scenarios.
- Add unit tests for the new conditional logic in
createDevtools
.
Analysis chain
Ensure to cover the new conditional logic in createDevtools
with unit tests to verify the correct behavior under different scenarios.
The previous scripts have identified numerous test files but did not confirm the presence of tests specifically for createDevtools
. To ensure comprehensive verification, we need to search within these test files for any references to createDevtools
.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if new conditional logic in createDevtools is covered by tests.
# Test: Search for tests covering the new logic. Expect: At least one test case.
rg --type test "createDevtools" "src/store/middleware/createDevtools.test.ts"
Length of output: 104
Script:
#!/bin/bash
# Description: Check if new conditional logic in createDevtools is covered by tests.
# Test: Search for tests covering the new logic. Expect: At least one test case.
rg "createDevtools" --glob "*test*"
Length of output: 35
Script:
#!/bin/bash
# Description: Locate the `createDevtools` function and identify relevant test files.
# Step 1: Locate the `createDevtools` function in the codebase.
echo "Locating createDevtools function..."
ast-grep --lang typescript --pattern 'function createDevtools($_) { $$$ }'
# Step 2: Identify test files that might contain tests for `createDevtools`.
echo "Identifying test files..."
fd --type f --name '*test*'
Length of output: 499
Script:
#!/bin/bash
# Description: Locate the `createDevtools` function and identify relevant test files.
# Step 1: Locate the `createDevtools` function in the codebase.
echo "Locating createDevtools function..."
ast-grep --lang typescript --pattern 'function createDevtools($_) { $$$ }'
# Step 2: Identify test files that might contain tests for `createDevtools`.
echo "Identifying test files..."
fd '*test*'
Length of output: 518
Script:
#!/bin/bash
# Description: Locate the `createDevtools` function and identify relevant test files.
# Step 1: Locate the `createDevtools` function in the codebase.
echo "Locating createDevtools function..."
ast-grep --lang typescript --pattern 'function createDevtools($_) { $$$ }'
# Step 2: Identify test files that might contain tests for `createDevtools`.
echo "Identifying test files..."
fd --glob '*test*'
Length of output: 9072
Script:
#!/bin/bash
# Description: Search for references to `createDevtools` in identified test files.
# Step 1: List all identified test files.
test_files=(
"src/app/(main)/(mobile)/me/(home)/__tests__/UserBanner.test.tsx"
"src/app/(main)/(mobile)/me/(home)/__tests__/useCategory.test.tsx"
"src/app/(main)/@nav/_layout/Desktop/Avatar.test.tsx"
"src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/__tests__/useAutoFocus.test.ts"
"src/app/api/chat/[provider]/route.test.ts"
"src/app/api/chat/agentRuntime.test.ts"
"src/app/api/chat/anthropic/route.test.ts"
"src/app/api/chat/apiKeyManager.test.ts"
"src/app/api/config.test.ts"
"src/app/api/errorResponse.test.ts"
"src/app/api/market/AgentMarket.test.ts"
"src/app/api/middleware/auth/index.test.ts"
"src/app/api/openai/createBizOpenAI/auth.test.ts"
"src/app/api/plugin/gateway/settings.test.ts"
"src/app/api/plugin/store/Store.test.ts"
"src/chains/__tests__/langDetect.test.ts"
"src/chains/__tests__/pickEmoji.test.ts"
"src/chains/__tests__/summaryAgentName.test.ts"
"src/chains/__tests__/summaryDescription.test.ts"
"src/chains/__tests__/summaryTags.test.ts"
"src/chains/__tests__/summaryTitle.test.ts"
"src/chains/__tests__/translate.test.ts"
"src/components/AntdStaticMethods/index.test.tsx"
"src/config/__tests__/analytics.test.ts"
"src/config/__tests__/app.test.ts"
"src/config/__tests__/client.test.ts"
"src/config/featureFlags/schema.test.ts"
"src/config/featureFlags/utils/parser.test.ts"
"src/const/message.test.ts"
"src/database/client/core/__tests__/db-upgrade.test.ts"
"src/database/client/core/__tests__/db.test.ts"
"src/database/client/core/__tests__/model.test.ts"
"src/database/client/core/migrations/migrateSettingsToUser/index.test.ts"
"src/database/client/models/__tests__/file.test.ts"
"src/database/client/models/__tests__/message.test.ts"
"src/database/client/models/__tests__/plugin.test.ts"
"src/database/client/models/__tests__/session.test.ts"
"src/database/client/models/__tests__/sessionGroup.test.ts"
"src/database/client/models/__tests__/topic.test.ts"
"src/database/client/models/__tests__/user.test.ts"
"src/features/Conversation/Extras/Assistant.test.tsx"
"src/features/Conversation/Plugins/Render/BuiltinType/index.test.tsx"
"src/features/Conversation/Plugins/Render/utils/iframeOnReady.test.ts"
"src/features/Conversation/Plugins/Render/utils/listenToPlugin.test.ts"
"src/features/Conversation/Plugins/Render/utils/pluginSettings.test.ts"
"src/features/Conversation/Plugins/Render/utils/pluginState.test.ts"
"src/features/Conversation/Plugins/Render/utils/postMessage.test.ts"
"src/features/User/__tests__/PanelContent.test.tsx"
"src/features/User/__tests__/UserAvatar.test.tsx"
"src/features/User/__tests__/useMenu.test.tsx"
"src/hooks/useInterceptingRoutes.test.ts"
"src/hooks/usePWAInstall.test.ts"
"src/hooks/usePlatform.test.ts"
"src/hooks/useQuery.test.ts"
"src/hooks/useQueryRoute.test.ts"
"src/hooks/useTokenCount.test.ts"
"src/libs/agent-runtime/AgentRuntime.test.ts"
"src/libs/agent-runtime/anthropic/index.test.ts"
"src/libs/agent-runtime/azureOpenai/index.test.ts"
"src/libs/agent-runtime/bedrock/index.test.ts"
"src/libs/agent-runtime/deepseek/index.test.ts"
"src/libs/agent-runtime/google/index.test.ts"
"src/libs/agent-runtime/groq/index.test.ts"
"src/libs/agent-runtime/minimax/index.test.ts"
"src/libs/agent-runtime/mistral/index.test.ts"
"src/libs/agent-runtime/moonshot/index.test.ts"
"src/libs/agent-runtime/ollama/index.test.ts"
"src/libs/agent-runtime/openai/index.test.ts"
"src/libs/agent-runtime/openrouter/index.test.ts"
"src/libs/agent-runtime/perplexity/index.test.ts"
"src/libs/agent-runtime/togetherai/index.test.ts"
"src/libs/agent-runtime/utils/anthropicHelpers.test.ts"
"src/libs/agent-runtime/utils/debugStream.test.ts"
"src/libs/agent-runtime/utils/desensitizeUrl.test.ts"
"src/libs/agent-runtime/utils/openaiCompatibleFactory/index.test.ts"
"src/libs/agent-runtime/utils/streams/anthropic.test.ts"
"src/libs/agent-runtime/utils/streams/bedrock/llama.test.ts"
"src/libs/agent-runtime/utils/streams/google-ai.test.ts"
"src/libs/agent-runtime/utils/streams/ollama.test.ts"
"src/libs/agent-runtime/utils/streams/openai.test.ts"
"src/libs/agent-runtime/utils/uriParser.test.ts"
"src/libs/agent-runtime/zeroone/index.test.ts"
"src/libs/agent-runtime/zhipu/authToken.test.ts"
"src/libs/agent-runtime/zhipu/index.test.ts"
"src/libs/traces/event.test.ts"
"src/libs/traces/index.test.ts"
"src/libs/trpc/middleware/password.test.ts"
"src/libs/trpc/middleware/userAuth.test.ts"
"src/locales/resources.test.ts"
"src/migrations/FromV1ToV2/migrations.test.ts"
"src/migrations/FromV2ToV3/migrations.test.ts"
"src/migrations/FromV3ToV4/migrations.test.ts"
"src/migrations/FromV4ToV5/migrations.test.ts"
"src/migrations/FromV5ToV6/migrations.test.ts"
"src/migrations/VersionController.test.ts"
"src/server/globalConfig/parseDefaultAgent.test.ts"
"src/server/routers/edge/config/index.test.ts"
"src/services/__tests__/chat.test.ts"
"src/services/__tests__/global.test.ts"
"src/services/__tests__/ollama.test.ts"
"src/services/__tests__/share.test.ts"
"src/services/__tests__/sync.test.ts"
"src/services/__tests__/tool.test.ts"
"src/services/__tests__/upload.test.ts"
"src/services/_auth.test.ts"
"src/services/file/client.test.ts"
"src/services/message/client.test.ts"
"src/services/message/index.test.ts"
"src/services/plugin/client.test.ts"
"src/services/session/client.test.ts"
"src/services/topic/client.test.ts"
"src/store/agent/slices/chat/action.test.ts"
"src/store/agent/slices/chat/selectors.test.ts"
"src/store/chat/helpers.test.ts"
"src/store/chat/slices/builtinTool/action.test.ts"
"src/store/chat/slices/enchance/action.test.ts"
"src/store/chat/slices/message/action.test.ts"
"src/store/chat/slices/message/reducer.test.ts"
"src/store/chat/slices/message/selectors.test.ts"
"src/store/chat/slices/plugin/action.test.ts"
"src/store/chat/slices/share/action.test.ts"
"src/store/chat/slices/topic/action.test.ts"
"src/store/chat/slices/topic/reducer.test.ts"
"src/store/chat/slices/topic/selectors.test.ts"
"src/store/file/selectors.test.ts"
"src/store/file/slices/images/action.test.ts"
"src/store/file/slices/tts/action.test.ts"
"src/store/global/action.test.ts"
"src/store/middleware/createHyperStorage/index.test.ts"
"src/store/middleware/createHyperStorage/indexedDB.test.ts"
"src/store/middleware/createHyperStorage/urlStorage.test.ts"
"src/store/serverConfig/selectors.test.ts"
"src/store/serverConfig/store.test.ts"
"src/store/session/slices/session/action.test.ts"
"src/store/session/slices/session/reducers.test.ts"
"src/store/session/slices/session/selectors/list.test.ts"
"src/store/session/slices/session/selectors/meta.test.ts"
"src/store/session/slices/sessionGroup/action.test.ts"
"src/store/session/slices/sessionGroup/reducer.test.ts"
"src/store/tool/selectors/tool.test.ts"
"src/store/tool/slices/builtin/action.test.ts"
"src/store/tool/slices/builtin/selectors.test.ts"
"src/store/tool/slices/customPlugin/action.test.ts"
"src/store/tool/slices/customPlugin/selectors.test.ts"
"src/store/tool/slices/plugin/action.test.ts"
"src/store/tool/slices/plugin/selectors.test.ts"
"src/store/tool/slices/store/action.test.ts"
"src/store/tool/slices/store/selectors.test.ts"
"src/store/user/slices/auth/action.test.ts"
"src/store/user/slices/auth/selectors.test.ts"
"src/store/user/slices/common/action.test.ts"
"src/store/user/slices/modelList/action.test.ts"
"src/store/user/slices/modelList/reducers/customModelCard.test.ts"
"src/store/user/slices/modelList/selectors/modelConfig.test.ts"
"src/store/user/slices/modelList/selectors/modelProvider.test.ts"
"src/store/user/slices/preference/action.test.ts"
"src/store/user/slices/preference/selectors.test.ts"
"src/store/user/slices/settings/action.test.ts"
"src/store/user/slices/settings/selectors/settings.test.ts"
"src/store/user/slices/sync/action.test.ts"
"src/utils/client/switchLang.test.ts"
"src/utils/compressImage.test.ts"
"src/utils/difference.test.ts"
"src/utils/fetch.test.ts"
"src/utils/filter.test.ts"
"src/utils/jwt.test.ts"
"src/utils/parseModels.test.ts"
"src/utils/platform.test.ts"
"src/utils/url.test.ts"
)
# Step 2: Search for references to `createDevtools` in these test files.
for test_file in "${test_files[@]}"; do
rg "createDevtools" "$test_file"
done
Length of output: 25410
❤️ Great PR @arvinxx ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
### [Version 0.161.22](v0.161.21...v0.161.22) <sup>Released on **2024-05-26**</sup> #### 🐛 Bug Fixes - **misc**: Fix connection checker. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix connection checker, closes [#2672](#2672) ([bef8926](bef8926)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 0.161.22 🎉 The release is available on: Your semantic-release bot 📦🚀 |
### [Version 1.41.12](v1.41.11...v1.41.12) <sup>Released on **2024-05-27**</sup> #### ♻ Code Refactoring - **misc**: Refactor `keyVaults` and rename `endpoint` to `baseURL`. #### 🐛 Bug Fixes - **misc**: Fix connection checker, fix the batch import error. #### 💄 Styles - **misc**: Fix PluginStore layout. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Refactor `keyVaults` and rename `endpoint` to `baseURL`, closes [lobehub#2673](https://github.com/bentwnghk/lobe-chat/issues/2673) ([4049bc7](4049bc7)) #### What's fixed * **misc**: Fix connection checker, closes [lobehub#2672](https://github.com/bentwnghk/lobe-chat/issues/2672) ([bef8926](bef8926)) * **misc**: Fix the batch import error, closes [lobehub#2671](https://github.com/bentwnghk/lobe-chat/issues/2671) ([db8f2c6](db8f2c6)) #### Styles * **misc**: Fix PluginStore layout, closes [lobehub#2590](https://github.com/bentwnghk/lobe-chat/issues/2590) [lobehub#2511](https://github.com/bentwnghk/lobe-chat/issues/2511) ([e1ae39b](e1ae39b)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
* 🐛 fix: fix check error * 💄 style: improve bubble loading * ♻️ refactor: add store devtools url control * 🚚 refactor: move settings type folder * ♻️ refactor: rename type * 🐛 fix: fix check error
### [Version 0.161.22](lobehub/lobe-chat@v0.161.21...v0.161.22) <sup>Released on **2024-05-26**</sup> #### 🐛 Bug Fixes - **misc**: Fix connection checker. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix connection checker, closes [lobehub#2672](lobehub#2672) ([bef8926](lobehub@bef8926)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information
Summary by CodeRabbit
New Features
isError
flag to handle errors during connection checks in settings.Bug Fixes
Refactor
GlobalSettings
toUserSettings
).Style
Chores