mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-18 23:36:00 +00:00
### Implemented nova spaces multi-select
##### Summary
- Renamed "All Spaces" to "Nova Spaces" - now filters to only nova content (sm_project_*)
- Added multi-select spaces support via "Select Spaces" modal
- Projects API now returns `{ nova, developer }` instead of `{ projects }`
##### Changes
- `selectedProject` → `selectedProjects[]` (array-based selection)
- New `SelectSpacesModal` component for picking multiple spaces
- Selected spaces appear at top in modal
- Search works by containerTag
- Graphs filter by selected spaces
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import {
|
|
parseAsString,
|
|
parseAsBoolean,
|
|
parseAsStringLiteral,
|
|
parseAsArrayOf,
|
|
} from "nuqs"
|
|
|
|
// Modal states
|
|
export const addDocumentParam = parseAsStringLiteral([
|
|
"note",
|
|
"link",
|
|
"file",
|
|
"connect",
|
|
] as const)
|
|
export const mcpParam = parseAsBoolean.withDefault(false)
|
|
export const searchParam = parseAsBoolean.withDefault(false)
|
|
export const qParam = parseAsString.withDefault("")
|
|
export const docParam = parseAsString
|
|
export const fullscreenParam = parseAsBoolean.withDefault(false)
|
|
export const chatParam = parseAsBoolean
|
|
export const threadParam = parseAsString
|
|
export const shareParam = parseAsBoolean.withDefault(false)
|
|
export const feedbackParam = parseAsBoolean.withDefault(false)
|
|
|
|
// View & filter states
|
|
const viewLiterals = ["graph", "list", "integrations"] as const
|
|
export type ViewParamValue = (typeof viewLiterals)[number]
|
|
export const viewParam = parseAsStringLiteral(viewLiterals).withDefault("list")
|
|
export const categoriesParam = parseAsArrayOf(parseAsString, ",").withDefault(
|
|
[],
|
|
)
|
|
export const projectParam = parseAsArrayOf(parseAsString, ",").withDefault([])
|