mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-23 05:35:27 +00:00
fix(web): address workspace settings review
This commit is contained in:
parent
05bcda6139
commit
18780f1d09
3 changed files with 17 additions and 8 deletions
|
|
@ -617,9 +617,17 @@ export default function Account() {
|
|||
</div>
|
||||
</section>
|
||||
|
||||
{canManageTeam && <OrgContext />}
|
||||
|
||||
{canManageTeam && isCompanyBrain && <WorkspacePersona />}
|
||||
{canManageTeam && (
|
||||
<div className="flex flex-col gap-5">
|
||||
<OrgContext />
|
||||
{isCompanyBrain && (
|
||||
<>
|
||||
<div aria-hidden="true" className="mx-1 h-px bg-white/[0.055]" />
|
||||
<WorkspacePersona key={org?.id} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<DigestPreferences />
|
||||
|
||||
|
|
|
|||
|
|
@ -54,14 +54,15 @@ export function useUpdateOrgSettings() {
|
|||
body: settings,
|
||||
})
|
||||
if (response.error) {
|
||||
throw new Error("Failed to save settings", {
|
||||
cause: response.error.message,
|
||||
throw new Error(response.error.message || "Failed to save settings", {
|
||||
cause: response.error,
|
||||
})
|
||||
}
|
||||
return response.data
|
||||
},
|
||||
onSuccess: async (data) => {
|
||||
const queryKey = ["settings", "org", orgId] as const
|
||||
onMutate: () => ({ orgId }),
|
||||
onSuccess: async (data, _settings, mutationContext) => {
|
||||
const queryKey = ["settings", "org", mutationContext.orgId] as const
|
||||
const canonicalSettings = data?.settings
|
||||
if (canonicalSettings) {
|
||||
queryClient.setQueryData<OrgSettings>(queryKey, (current) =>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const SettingsResponseSchema = z.object({
|
|||
message: z.string(),
|
||||
settings: z.object({
|
||||
excludeItems: z.array(z.string().min(1).max(20)).nullable().optional(),
|
||||
filterPrompt: z.string().min(1).max(750).nullable().optional(),
|
||||
filterPrompt: z.string().max(750).nullable().optional(),
|
||||
includeItems: z.array(z.string().min(1).max(20)).nullable().optional(),
|
||||
shouldLLMFilter: z.boolean().optional(),
|
||||
workspacePersona: z.string().max(1500).nullable().optional(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue