feat(search-space): introduce activeWorkspaceIdAtom and refactor user-message component for improved readability

- Added activeWorkspaceIdAtom as a reference to activeSearchSpaceIdAtom.
- Refactored the UserTextPart component in user-message.tsx to simplify icon determination and tooltip logic, enhancing code clarity and maintainability.
This commit is contained in:
Anish Sarkar 2026-07-06 09:35:12 +05:30
parent dec4cd9a0d
commit e92b7a34ed
2 changed files with 25 additions and 27 deletions

View file

@ -5,6 +5,7 @@ import { searchSpacesApiService } from "@/lib/apis/search-spaces-api.service";
import { cacheKeys } from "@/lib/query-client/cache-keys";
export const activeSearchSpaceIdAtom = atom<string | null>(null);
export const activeWorkspaceIdAtom = activeSearchSpaceIdAtom;
export const searchSpacesQueryParamsAtom = atom<GetSearchSpacesRequest["queryParams"]>({
skip: 0,