Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#108127)

hermes-seaeye[bot]8c74118c4a0c
diff --git a/apps/desktop/src/api/wisdom.ts b/apps/desktop/src/api/wisdom.ts
index 5e46ceb9bbf..890f684398c 100644
--- a/apps/desktop/src/api/wisdom.ts
+++ b/apps/desktop/src/api/wisdom.ts
@@ -363,7 +363,6 @@ export const getWisdomStatus = (profile?: ProfileScope): Promise<WisdomStatus> =
export const getWisdomEntitlement = (profile?: ProfileScope): Promise<WisdomEntitlement> =>
request('/api/wisdom/entitlement', profile)
-
export const getWisdomSync = (profile?: ProfileScope): Promise<WisdomSyncSnapshot> =>
request('/api/wisdom/sync', profile)
export const retryWisdomSync = (profile?: ProfileScope): Promise<WisdomSyncSnapshot> =>
diff --git a/apps/desktop/src/app/skills/collective-tab.test.tsx b/apps/desktop/src/app/skills/collective-tab.test.tsx
index 53f021c33c4..72b03f3ae4a 100644
--- a/apps/desktop/src/app/skills/collective-tab.test.tsx
+++ b/apps/desktop/src/app/skills/collective-tab.test.tsx
@@ -292,24 +292,26 @@ describe('CollectiveTab', () => {
expect(await screen.findByRole('button', { name: 'Review update' })).toBeTruthy()
})
- it.each(['open', 'moderated'] as const)('reviews and rescans locally before one final %s submission', async publicationMode => {
- mockInstallations()
- getWisdomStatus.mockResolvedValue({ configured: true, verified_org_id: 'org-1' })
- getWisdomDiscovery.mockResolvedValue({ next_cursor: null, skills: [] })
- getWisdomCandidates.mockResolvedValue({
- candidates: [
- {
- local_skill_id: 'local-1',
- name: 'candidate-skill',
- eligibility: 'eligible',
- reason: null,
- qualification: 'manual_selection',
- contribution_state: 'new'
- }
- ]
- })
- getWisdomDrafts.mockResolvedValue({ drafts: [] })
- suggestWisdomSkill.mockResolvedValueOnce({
+ it.each(['open', 'moderated'] as const)(
+ 'reviews and rescans locally before one final %s submission',
+ async publicationMode => {
+ mockInstallations()
+ getWisdomStatus.mockResolvedValue({ configured: true, verified_org_id: 'org-1' })
+ getWisdomDiscovery.mockResolvedValue({ next_cursor: null, skills: [] })
+ getWisdomCandidates.mockResolvedValue({
+ candidates: [
+ {
+ local_skill_id: 'local-1',
+ name: 'candidate-skill',
+ eligibility: 'eligible',
+ reason: null,
+ qualification: 'manual_selection',
+ contribution_state: 'new'
+ }
+ ]
+ })
+ getWisdomDrafts.mockResolvedValue({ drafts: [] })
+ suggestWisdomSkill.mockResolvedValueOnce({
network_submission: false,
local_draft_id: 'local:draft',
overlay_path: '/private/overlay',
@@ -317,56 +319,65 @@ describe('CollectiveTab', () => {
system_specification: systemSpecification,
next_step: 'review'
})
- const manifest = JSON.stringify({ schema_version: 1, name: 'candidate-skill', requirements: systemSpecification })
-
- const initialReview = {
- draft: { id: 'local:draft', slug: 'candidate-skill', state: 'prepared', authorDescription: 'Drafted copy' },
- publication_mode: publicationMode,
- effective_policy: {},
- files: [
- { path: 'SKILL.md', mode: 'file', hash: 'sha256:skill', content_utf8: '# Candidate\n' },
- { path: 'skill.manifest.json', mode: 'file', hash: 'sha256:manifest', content_utf8: manifest }
- ],
- hashes: { content: 'sha256:content', author_description: 'sha256:description', package_manifest: 'sha256:manifest' },
- receipt: null
- }
+ const manifest = JSON.stringify({ schema_version: 1, name: 'candidate-skill', requirements: systemSpecification })
+
+ const initialReview = {
+ draft: { id: 'local:draft', slug: 'candidate-skill', state: 'prepared', authorDescription: 'Drafted copy' },
+ publication_mode: publicationMode,
+ effective_policy: {},
+ files: [
+ { path: 'SKILL.md', mode: 'file', hash: 'sha256:skill', content_utf8: '# Candidate\n' },
+ { path: 'skill.manifest.json', mode: 'file', hash: 'sha256:manifest', content_utf8: manifest }
+ ],
+ hashes: {
+ content: 'sha256:content',
+ author_description: 'sha256:description',
+ package_manifest: 'sha256:manifest'
+ },
+ receipt: null
+ }
+
+ const rescannedReview = {
+ ...initialReview,
+ draft: { ...initialReview.draft, authorDescription: 'Approved owner copy' },
+ hashes: { ...initialReview.hashes, author_description: 'sha256:revised' }
+ }
+
+ reviewWisdomPublication.mockResolvedValueOnce(initialReview).mockResolvedValueOnce(rescannedReview)
+ saveWisdomPreparedDraft.mockResolvedValue({ local_draft_id: 'local:draft' })
+ submitWisdomPublication.mockResolvedValue({
+ draft_id: 'draft-1',
+ publication_state: publicationMode === 'open' ? 'published' : 'pending_moderation',
+ portal_url: 'https://portal.example/skill/draft-1'
+ })
- const rescannedReview = {
- ...initialReview,
- draft: { ...initialReview.draft, authorDescription: 'Approved owner copy' },
- hashes: { ...initialReview.hashes, author_description: 'sha256:revised' }
+ await renderTab()
+ fireEvent.click(await screen.findByText('View all local skills (1)'))
+ fireEvent.click(await screen.findByRole('button', { name: 'Start contribution' }))
+ const description = await screen.findByLabelText('Owner-authored description')
+ fireEvent.change(description, { target: { value: 'Approved owner copy' } })
+ const action = publicationMode === 'open' ? 'Publish to team' : 'Submit for approval'
+ expect(screen.getByRole('button', { name: action })).toHaveProperty('disabled', true)
+ expect(submitWisdomPublication).not.toHaveBeenCalled()
+ fireEvent.click(screen.getByRole('button', { name: 'Save changes & rescan' }))
+ await waitFor(() => expect(screen.getByRole('button', { name: action })).toHaveProperty('disabled', false))
+ expect(saveWisdomPreparedDraft).toHaveBeenCalledWith(
+ 'local:draft',
+ 'Approved owner copy',
+ initialReview.files.map(({ path, content_utf8 }) => ({ path, content_utf8 })),
+ scope
+ )
+ fireEvent.click(screen.getByRole('button', { name: action }))
+ await waitFor(() =>
+ expect(submitWisdomPublication).toHaveBeenCalledExactlyOnceWith(rescannedReview, scope, undefined)
+ )
+ expect(suggestWisdomSkill).toHaveBeenCalledTimes(1)
+ expect(suggestWisdomSkill.mock.calls[0][3]).toBe('local-1')
+ expect((await screen.findByRole('link', { name: 'View in Portal' })).getAttribute('href')).toBe(
+ 'https://portal.example/skill/draft-1'
+ )
}
-
- reviewWisdomPublication.mockResolvedValueOnce(initialReview).mockResolvedValueOnce(rescannedReview)
- saveWisdomPreparedDraft.mockResolvedValue({ local_draft_id: 'local:draft' })
- submitWisdomPublication.mockResolvedValue({
- draft_id: 'draft-1',
- publication_state: publicationMode === 'open' ? 'published' : 'pending_moderation',
- portal_url: 'https://portal.example/skill/draft-1'
- })
-
- await renderTab()
- fireEvent.click(await screen.findByText('View all local skills (1)'))
- fireEvent.click(await screen.findByRole('button', { name: 'Start contribution' }))
- const description = await screen.findByLabelText('Owner-authored description')
- fireEvent.change(description, { target: { value: 'Approved owner copy' } })
- const action = publicationMode === 'open' ? 'Publish to team' : 'Submit for approval'
- expect(screen.getByRole('button', { name: action })).toHaveProperty('disabled', true)
- expect(submitWisdomPublication).not.toHaveBeenCalled()
- fireEvent.click(screen.getByRole('button', { name: 'Save changes & rescan' }))
- await waitFor(() => expect(screen.getByRole('button', { name: action })).toHaveProperty('disabled', false))
- expect(saveWisdomPreparedDraft).toHaveBeenCalledWith(
- 'local:draft', 'Approved owner copy',
- initialReview.files.map(({ path, content_utf8 }) => ({ path, content_utf8 })), scope
- )
- fireEvent.click(screen.getByRole('button', { name: action }))
- await waitFor(() => expect(submitWisdomPublication).toHaveBeenCalledExactlyOnceWith(rescannedReview, scope, undefined))
- expect(suggestWisdomSkill).toHaveBeenCalledTimes(1)
- expect(suggestWisdomSkill.mock.calls[0][3]).toBe('local-1')
- expect((await screen.findByRole('link', { name: 'View in Portal' })).getAttribute('href')).toBe(
- 'https://portal.example/skill/draft-1'
- )
- })
+ )
it('separates qualified suggestions, manual inventory, and submissions waiting on collective approval', async () => {
mockInstallations()
diff --git a/apps/desktop/src/app/skills/index.test.tsx b/apps/desktop/src/app/skills/index.test.tsx
index 6af7ca48050..5f8174cf1d9 100644
--- a/apps/desktop/src/app/skills/index.test.tsx
+++ b/apps/desktop/src/app/skills/index.test.tsx
@@ -99,8 +99,11 @@ async function renderSkills(tab = 'toolsets') {
</QueryClientProvider>
)
})
+
if (vi.isFakeTimers()) {
- await act(async () => { await vi.advanceTimersByTimeAsync(50) })
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(50)
+ })
}
return result!
@@ -151,10 +154,7 @@ describe('SkillsView toolset management', { timeout: 60_000 }, () => {
expect(await screen.findByRole('region', { name: selected })).toBeTruthy()
expect(screen.queryByRole('region', { name: other })).toBeNull()
- expect(navigateSpy).not.toHaveBeenCalledWith(
- { pathname: '/skills', search: '', hash: '' },
- { replace: true }
- )
+ expect(navigateSpy).not.toHaveBeenCalledWith({ pathname: '/skills', search: '', hash: '' }, { replace: true })
const otherTab = other.replace(' workspace', '')
fireEvent.click(screen.getByRole('button', { name: otherTab }))
expect(navigateSpy).toHaveBeenCalledWith(
@@ -170,10 +170,7 @@ describe('SkillsView toolset management', { timeout: 60_000 }, () => {
expect(screen.queryByRole('button', { name: 'Collective' })).toBeNull()
expect(screen.queryByRole('region', { name: 'Collective workspace' })).toBeNull()
await waitFor(() =>
- expect(navigateSpy).toHaveBeenCalledWith(
- { pathname: '/skills', search: '', hash: '' },
- { replace: true }
- )
+ expect(navigateSpy).toHaveBeenCalledWith({ pathname: '/skills', search: '', hash: '' }, { replace: true })
)
})
@@ -193,6 +190,7 @@ describe('SkillsView toolset management', { timeout: 60_000 }, () => {
it('rechecks entitlement after switching away and back while probes are pending', async () => {
const { SkillsView } = await import('./index')
+
const page = (profile: string) => (
<QueryClientProvider client={queryClient}>
<MemoryRouter>
@@ -200,6 +198,7 @@ describe('SkillsView toolset management', { timeout: 60_000 }, () => {
</MemoryRouter>
</QueryClientProvider>
)
+
const result = render(page('eligible'))
expect(await screen.findByRole('button', { name: 'Collective' })).toBeTruthy()
diff --git a/apps/desktop/src/app/skills/index.tsx b/apps/desktop/src/app/skills/index.tsx
index bb273349446..94ea38c93cc 100644
--- a/apps/desktop/src/app/skills/index.tsx
+++ b/apps/desktop/src/app/skills/index.tsx
@@ -319,8 +319,10 @@ export function SkillsView({
refetchInterval: 15_000,
retry: false
})
+
// Identity changes on every scope visit, including A -> B -> A.
const wisdomScope = useMemo(() => ({ key: scopeKey }), [scopeKey])
+
const [acceptedWisdomResult, setAcceptedWisdomResult] = useState<null | {
scope: typeof wisdomScope
updatedAt: number
@@ -357,11 +359,13 @@ export function SkillsView({
wisdomEntitlement.data?.entitled === true &&
typeof entitlementExpiresAt === 'number' &&
entitlementExpiresAt * 1000 > entitlementClock
+
const wisdomEntitled =
acceptedWisdomResult?.scope === wisdomScope &&
acceptedWisdomResult.updatedAt === wisdomEntitlement.dataUpdatedAt &&
!wisdomEntitlement.isError &&
freshWisdomEntitlement
+
const wisdomDenied = wisdomEntitlement.isError || (wisdomEntitlement.isSuccess && !freshWisdomEntitlement)
useEffect(() => {
diff --git a/apps/desktop/src/app/skills/wisdom-manifest-editor.tsx b/apps/desktop/src/app/skills/wisdom-manifest-editor.tsx
index 10a8b34958e..98a7e68f4ab 100644
--- a/apps/desktop/src/app/skills/wisdom-manifest-editor.tsx
+++ b/apps/desktop/src/app/skills/wisdom-manifest-editor.tsx
@@ -132,7 +132,11 @@ function PresetMultiSelect({
const checked = value.includes(option.value)
return (
- <label className="flex cursor-pointer items-center gap-2 text-[0.68rem]" htmlFor={checkboxId} key={option.value}>
+ <label
+ className="flex cursor-pointer items-center gap-2 text-[0.68rem]"
+ htmlFor={checkboxId}
+ key={option.value}
+ >
<Checkbox
checked={checked}
disabled={disabled}
@@ -175,12 +179,7 @@ function BooleanField({
}) {
return (
<label className="flex cursor-pointer items-start gap-2" htmlFor={id}>
- <Checkbox
- checked={checked}
- disabled={disabled}
- id={id}
- onCheckedChange={next => onChange(next === true)}
- />
+ <Checkbox checked={checked} disabled={disabled} id={id} onCheckedChange={next => onChange(next === true)} />
<FieldCopy description={description} label={label} />
</label>
)
@@ -213,7 +212,9 @@ function ToolRequirements({
id={`${id}-tool-${index}`}
maxLength={512}
onChange={event =>
- onChange(value.map((item, itemIndex) => (itemIndex === index ? { ...item, name: event.target.value } : item)))
+ onChange(
+ value.map((item, itemIndex) => (itemIndex === index ? { ...item, name: event.target.value } : item))
+ )
}
size="sm"
value={tool.name}
@@ -301,7 +302,9 @@ function PluginRequirements({
id={`${id}-plugin-${index}`}
maxLength={512}
onChange={event =>
- onChange(value.map((item, itemIndex) => (itemIndex === index ? { ...item, id: event.target.value } : item)))
+ onChange(
+ value.map((item, itemIndex) => (itemIndex === index ? { ...item, id: event.target.value } : item))
+ )
}
size="sm"
value={plugin.id}
@@ -359,11 +362,7 @@ function PluginRequirements({
)
}
-export function WisdomSystemSpecificationEditor({
- value,
- disabled = false,
- onChange
-}: SpecificationEditorProps) {
+export function WisdomSystemSpecificationEditor({ value, disabled = false, onChange }: SpecificationEditorProps) {
const id = useId()
const update = <K extends keyof WisdomSystemSpecification>(key: K, next: WisdomSystemSpecification[K]) =>
@@ -492,7 +491,11 @@ export function WisdomSystemSpecificationEditor({
<fieldset className="grid gap-5 border-t border-(--ui-stroke-tertiary) pt-4 lg:grid-cols-2">
<legend className="pr-3 text-[0.68rem] font-medium uppercase tracking-wide">Tools and plugins</legend>
<ToolRequirements disabled={disabled} onChange={tools => update('tools', tools)} value={value.tools} />
- <PluginRequirements disabled={disabled} onChange={plugins => update('plugins', plugins)} value={value.plugins} />
+ <PluginRequirements
+ disabled={disabled}
+ onChange={plugins => update('plugins', plugins)}
+ value={value.plugins}
+ />
</fieldset>
<fieldset className="grid gap-5 border-t border-(--ui-stroke-tertiary) pt-4 sm:grid-cols-2">
diff --git a/apps/desktop/src/app/skills/wisdom-manifest.test.ts b/apps/desktop/src/app/skills/wisdom-manifest.test.ts
index 263b80bb8b8..592279f0f0a 100644
--- a/apps/desktop/src/app/skills/wisdom-manifest.test.ts
+++ b/apps/desktop/src/app/skills/wisdom-manifest.test.ts
@@ -44,9 +44,7 @@ describe('Desktop Wisdom manifest forms', () => {
it('reports form-level validation errors before a revision is submitted', () => {
expect(wisdomSystemSpecificationValidationError({ ...specification, platforms: [''] })).toMatch(/required/)
expect(
- wisdomManifestValidationError(
- JSON.stringify({ schema_version: 1, name: '', requirements: specification })
- )
+ wisdomManifestValidationError(JSON.stringify({ schema_version: 1, name: '', requirements: specification }))
).toBe('Skill name is required.')
})
})
diff --git a/apps/desktop/src/app/skills/wisdom-manifest.ts b/apps/desktop/src/app/skills/wisdom-manifest.ts
index ca9cecc0eeb..9d82b83b7b6 100644
--- a/apps/desktop/src/app/skills/wisdom-manifest.ts
+++ b/apps/desktop/src/app/skills/wisdom-manifest.ts
@@ -38,25 +38,33 @@ function isRecord(value: unknown): value is Record<string, unknown> {
}
function record(value: unknown, label: string): Record<string, unknown> {
- if (!isRecord(value)) {throw new Error(`${label} must be an object`)}
+ if (!isRecord(value)) {
+ throw new Error(`${label} must be an object`)
+ }
return value
}
function text(value: unknown, label: string): string {
- if (typeof value !== 'string') {throw new Error(`${label} must be text`)}
+ if (typeof value !== 'string') {
+ throw new Error(`${label} must be text`)
+ }
return value
}
function nullableText(value: unknown, label: string): null | string {
- if (value === null) {return null}
+ if (value === null) {
+ return null
+ }
return text(value, label)
}
function boolean(value: unknown, label: string): boolean {
- if (typeof value !== 'boolean') {throw new Error(`${label} must be true or false`)}
+ if (typeof value !== 'boolean') {
+ throw new Error(`${label} must be true or false`)
+ }
return value
}
@@ -74,9 +82,13 @@ function exactKeys(value: Record<string, unknown>, keys: string[], label: string
const unexpected = Object.keys(value).filter(key => !expected.has(key))
const missing = keys.filter(key => !(key in value))
- if (unexpected.length) {throw new Error(`${label} contains unsupported fields: ${unexpected.join(', ')}`)}
+ if (unexpected.length) {
+ throw new Error(`${label} contains unsupported fields: ${unexpected.join(', ')}`)
+ }
- if (missing.length) {throw new Error(`${label} is missing fields: ${missing.join(', ')}`)}
+ if (missing.length) {
+ throw new Error(`${label} is missing fields: ${missing.join(', ')}`)
+ }
}
export function parseWisdomSystemSpecification(value: unknown): WisdomSystemSpecification {
@@ -116,13 +128,17 @@ export function parseWisdomSystemSpecification(value: unknown): WisdomSystemSpec
const runtime = record(specification.runtime, 'Runtime requirement')
exactKeys(runtime, ['shell', 'browser', 'code', 'sandbox'], 'Runtime requirement')
- if (!Array.isArray(specification.tools)) {throw new Error('Tools must be a list')}
+ if (!Array.isArray(specification.tools)) {
+ throw new Error('Tools must be a list')
+ }
const tools = specification.tools.map((raw, index) => {
const tool = record(raw, `Tool ${index + 1}`)
exactKeys(tool, ['name', 'minimum_version', 'auto_install', 'requires_admin'], `Tool ${index + 1}`)
- if (tool.auto_install !== false) {throw new Error(`Tool ${index + 1} cannot request automatic installation`)}
+ if (tool.auto_install !== false) {
+ throw new Error(`Tool ${index + 1} cannot request automatic installation`)
+ }
return {
name: text(tool.name, `Tool ${index + 1} name`),
@@ -132,7 +148,9 @@ export function parseWisdomSystemSpecification(value: unknown): WisdomSystemSpec
}
})
- if (!Array.isArray(specification.plugins)) {throw new Error('Plugins must be a list')}
+ if (!Array.isArray(specification.plugins)) {
+ throw new Error('Plugins must be a list')
+ }
const plugins = specification.plugins.map((raw, index) => {
const plugin = record(raw, `Plugin ${index + 1}`)
@@ -177,7 +195,9 @@ export function parseWisdomManifest(value: string): WisdomManifestV1 {
const manifest = record(JSON.parse(value) as unknown, 'Manifest')
exactKeys(manifest, ['schema_version', 'name', 'requirements'], 'Manifest')
- if (manifest.schema_version !== 1) {throw new Error('Only manifest schema version 1 is supported')}
+ if (manifest.schema_version !== 1) {
+ throw new Error('Only manifest schema version 1 is supported')
+ }
return {
schema_version: 1,
@@ -187,20 +207,28 @@ export function parseWisdomManifest(value: string): WisdomManifestV1 {
}
function boundedTextError(value: string, label: string): null | string {
- if (!value.trim()) {return `${label} is required.`}
+ if (!value.trim()) {
+ return `${label} is required.`
+ }
- if (new TextEncoder().encode(value).length > 512) {return `${label} must be 512 UTF-8 bytes or fewer.`}
+ if (new TextEncoder().encode(value).length > 512) {
+ return `${label} must be 512 UTF-8 bytes or fewer.`
+ }
return null
}
function listError(values: string[], label: string): null | string {
- if (values.length > 64) {return `${label} can contain at most 64 entries.`}
+ if (values.length > 64) {
+ return `${label} can contain at most 64 entries.`
+ }
for (const value of values) {
const error = boundedTextError(value, `${label} entry`)
- if (error) {return error}
+ if (error) {
+ return error
+ }
}
return null
@@ -230,7 +258,9 @@ export function wisdomSystemSpecificationValidationError(value: WisdomSystemSpec
for (const [index, tool] of value.tools.entries()) {
errors.push(boundedTextError(tool.name, `Tool ${index + 1} name`))
- if (tool.minimum_version !== null) {errors.push(boundedTextError(tool.minimum_version, `Tool ${index + 1} version`))}
+ if (tool.minimum_version !== null) {
+ errors.push(boundedTextError(tool.minimum_version, `Tool ${index + 1} version`))
+ }
}
for (const [index, plugin] of value.plugins.entries()) {
@@ -248,7 +278,9 @@ export function wisdomManifestValidationError(value: string): null | string {
try {
const manifest = parseWisdomManifest(value)
- return boundedTextError(manifest.name, 'Skill name') ?? wisdomSystemSpecificationValidationError(manifest.requirements)
+ return (
+ boundedTextError(manifest.name, 'Skill name') ?? wisdomSystemSpecificationValidationError(manifest.requirements)
+ )
} catch (reason) {
return reason instanceof Error ? reason.message : String(reason)
}
diff --git a/apps/desktop/src/components/assistant-ui/markdown-text.tsx b/apps/desktop/src/components/assistant-ui/markdown-text.tsx
index e7c836661f0..530d20afade 100644
--- a/apps/desktop/src/components/assistant-ui/markdown-text.tsx
+++ b/apps/desktop/src/components/assistant-ui/markdown-text.tsx
@@ -677,7 +677,8 @@ function MarkdownTextSurface({
// right rail; every other language falls back to the Shiki-highlighted
// code block.
SyntaxHighlighter: (props: SyntaxHighlighterProps) => {
- const artifact = disableArtifacts || previewOnly || scratchpad ? null : detectArtifact(props.language, props.code)
+ const artifact =
+ disableArtifacts || previewOnly || scratchpad ? null : detectArtifact(props.language, props.code)
if (artifact) {
return <ArtifactCard code={props.code} detection={artifact} streaming={isStreaming} />
diff --git a/apps/desktop/src/components/assistant-ui/thread/index.tsx b/apps/desktop/src/components/assistant-ui/thread/index.tsx
index d9651ea0227..1cacbaced3a 100644
--- a/apps/desktop/src/components/assistant-ui/thread/index.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/index.tsx
@@ -181,13 +181,14 @@ export const Thread = memo(function Thread({
const wisdomSessionId = sessionKey || sessionId
const wisdomContent = useMemo(
- () => (wisdomSessionId ? (
- <>
- <WisdomNoticeCard profile={wisdomProfile} />
- <WisdomMediationCard profile={wisdomProfile} sessionId={wisdomSessionId} />
- <WisdomCandidateCard profile={wisdomProfile} sessionId={wisdomSessionId} />
- </>
- ) : undefined),
+ () =>
+ wisdomSessionId ? (
+ <>
+ <WisdomNoticeCard profile={wisdomProfile} />
+ <WisdomMediationCard profile={wisdomProfile} sessionId={wisdomSessionId} />
+ <WisdomCandidateCard profile={wisdomProfile} sessionId={wisdomSessionId} />
+ </>
+ ) : undefined,
[wisdomProfile, wisdomSessionId]
)
diff --git a/apps/desktop/src/components/assistant-ui/thread/list.tsx b/apps/desktop/src/components/assistant-ui/thread/list.tsx
index a1761ca38e8..299c92b1906 100644
--- a/apps/desktop/src/components/assistant-ui/thread/list.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/list.tsx
@@ -17,7 +17,11 @@ import {
} from 'react'
import { type GetTargetScrollTop, useStickToBottom } from 'use-stick-to-bottom'
-import { $chatOnboardingSolo, $chatOnboardingThreadIds, $onboardingGreeting } from '@/components/onboarding-chat/assembly'
+import {
+ $chatOnboardingSolo,
+ $chatOnboardingThreadIds,
+ $onboardingGreeting
+} from '@/components/onboarding-chat/assembly'
import { usePaneLifecycle, usePaneVisible } from '@/components/pane-shell/pane-visibility'
import { useI18n } from '@/i18n'
import { messagePaintWeight } from '@/lib/render-weight'
@@ -177,10 +181,7 @@ let greetingRevealed = false
* the visible slice (height grows exactly like real streaming). */
function OnboardingGreetingRow({ text }: { text: string }) {
const [shown, setShown] = useState(() =>
- greetingRevealed ||
- window.matchMedia?.('(prefers-reduced-motion: reduce)').matches
- ? text.length
- : 0
+ greetingRevealed || window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ? text.length : 0
)
const done = shown >= text.length
@@ -219,10 +220,7 @@ function OnboardingGreetingRow({ text }: { text: string }) {
}, [shown, text])
return (
- <div
- className="mb-(--conversation-turn-gap) whitespace-pre-wrap leading-relaxed"
- data-onboarding-greeting
- >
+ <div className="mb-(--conversation-turn-gap) whitespace-pre-wrap leading-relaxed" data-onboarding-greeting>
{text.slice(0, shown)}
{!done && (
<span className="ml-0.5 inline-block h-[1.05em] w-[2px] translate-y-[0.18em] animate-pulse bg-foreground/70" />
@@ -541,10 +539,7 @@ const ThreadMessageListInner: FC<ThreadMessageListProps> = ({
// Row structure is memoized on the STRUCTURAL signature only, so streaming
// part-appends can't churn group identity (that would defeat the rows memo
// below on every tick). Weights are folded in separately for the budget.
- const { groups, onboardingThread, threadType, greetingRow } = useOnboardingTranscript(
- structuralSignature,
- sessionKey
- )
+ const { groups, onboardingThread, threadType, greetingRow } = useOnboardingTranscript(structuralSignature, sessionKey)
const renderEmpty = groups.length === 0 && Boolean(emptyPlaceholder) && !onboardingThread
diff --git a/apps/desktop/src/components/assistant-ui/thread/system-message.test.tsx b/apps/desktop/src/components/assistant-ui/thread/system-message.test.tsx
index 3b44d29516a..c0713e0fa14 100644
--- a/apps/desktop/src/components/assistant-ui/thread/system-message.test.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/system-message.test.tsx
@@ -122,6 +122,7 @@ describe('system message timestamp text separation', () => {
const { container } = render(
<Harness text={'slash:/wisdom\nCollective Wisdom commands\n\n/wisdom browse — Search team skills'} />
)
+
const row = container.querySelector('[data-role="system"]')
expect(row?.className).toContain('w-[min(92%,56rem)]')
@@ -132,6 +133,7 @@ describe('system message timestamp text separation', () => {
it('opens Wisdom browse results in an in-app skill preview', async () => {
const openExternal = vi.fn().mockResolvedValue(undefined)
+
const api = vi.fn().mockImplementation(({ path }: { path: string }) => {
if (path.endsWith('/versions/1')) {
return Promise.resolve({
@@ -199,6 +201,7 @@ describe('system message timestamp text separation', () => {
})
Object.defineProperty(window, 'hermesDesktop', { configurable: true, value: { api, openExternal } })
+
const { container } = render(
<Harness
text={
diff --git a/apps/desktop/src/components/assistant-ui/transcript-directive.tsx b/apps/desktop/src/components/assistant-ui/transcript-directive.tsx
index 8102e3861a2..0e52324f86a 100644
--- a/apps/desktop/src/components/assistant-ui/transcript-directive.tsx
+++ b/apps/desktop/src/components/assistant-ui/transcript-directive.tsx
@@ -134,7 +134,12 @@ export const TranscriptDirectiveLeaf: FC<{ text: string; streaming?: boolean }>
return (
<>
{entries.map(entry => (
- <DirectiveEntry contribution={entry.match} key={entry.key} parsed={entry.parsed} streaming={streaming ?? false} />
+ <DirectiveEntry
+ contribution={entry.match}
+ key={entry.key}
+ parsed={entry.parsed}
+ streaming={streaming ?? false}
+ />
))}
</>
)
diff --git a/apps/desktop/src/components/assistant-ui/wisdom-candidate-card.test.tsx b/apps/desktop/src/components/assistant-ui/wisdom-candidate-card.test.tsx
index 0cbd2c5183a..2517c76e021 100644
--- a/apps/desktop/src/components/assistant-ui/wisdom-candidate-card.test.tsx
+++ b/apps/desktop/src/components/assistant-ui/wisdom-candidate-card.test.tsx
@@ -196,11 +196,13 @@ describe('WisdomCandidateCard', () => {
fireEvent.change(await screen.findByLabelText('Edit SKILL.md'), { target: { value: '# Edited' } })
expect(screen.getByRole('button', { name: 'Submit for approval' })).toHaveProperty('disabled', true)
saveWisdomPreparedDraft.mockResolvedValue(prepared())
+
const updated = {
...exactReview('saved', '# Edited'),
draft: { ...exactReview('saved').draft, state: 'prepared' },
publication_mode: 'moderated'
}
+
reviewWisdomPublication.mockResolvedValue(updated)
fireEvent.click(screen.getByRole('button', { name: 'Save changes & rescan' }))
await waitFor(() => expect(saveWisdomPreparedDraft).toHaveBeenCalledTimes(1))
diff --git a/apps/desktop/src/components/onboarding-chat/cards/build.tsx b/apps/desktop/src/components/onboarding-chat/cards/build.tsx
index 1a22f57dbb2..d01df113afe 100644
--- a/apps/desktop/src/components/onboarding-chat/cards/build.tsx
+++ b/apps/desktop/src/components/onboarding-chat/cards/build.tsx
@@ -186,6 +186,7 @@ export function ProgressCard({ attrs, locked }: CardProps) {
const messages = useStore(view.$messages)
const messageId = useAuiState(state => state.message.id)
const title = (attrs.title ?? '').trim() || 'Working on it'
+
const steps = useMemo(() => {
const index = messages.findIndex(message => message.id === messageId)
const previous = index < 0 ? [] : messages.slice(0, index)
diff --git a/apps/desktop/src/components/wisdom-mediation-card.test.tsx b/apps/desktop/src/components/wisdom-mediation-card.test.tsx
index 39039c02f06..40fdf5ec4d5 100644
--- a/apps/desktop/src/components/wisdom-mediation-card.test.tsx
+++ b/apps/desktop/src/components/wisdom-mediation-card.test.tsx
@@ -77,6 +77,7 @@ describe('WisdomMediationCard', () => {
if (phase !== 'prerequisite') {
expect(screen.getByText('echo reviewed').tagName).toBe('CODE')
}
+
resolve.mockResolvedValue({ ...step, state: 'completed', actions: ['inspect'] })
fireEvent.click(
screen.getByRole('button', { name: phase === 'prerequisite' ? 'Confirm prerequisite' : 'Run this step' })
diff --git a/apps/desktop/src/components/wisdom-publication-review.tsx b/apps/desktop/src/components/wisdom-publication-review.tsx
index a645f3223b8..e9658d45472 100644
--- a/apps/desktop/src/components/wisdom-publication-review.tsx
+++ b/apps/desktop/src/components/wisdom-publication-review.tsx
@@ -194,10 +194,19 @@ export function WisdomPublicationReview({
{copy.viewInPortal}
</a>
{allowDecline && result.publication_state === 'pending_moderation' && (
- <Button disabled={busy} onClick={() => void run(async () => {
- await decideWisdomDraft(result.draft_id, 'decline', profile)
- onClose()
- })} size="sm" variant="outline">{copy.decline}</Button>
+ <Button
+ disabled={busy}
+ onClick={() =>
+ void run(async () => {
+ await decideWisdomDraft(result.draft_id, 'decline', profile)
+ onClose()
+ })
+ }
+ size="sm"
+ variant="outline"
+ >
+ {copy.decline}
+ </Button>
)}
</div>
) : review ? (
diff --git a/apps/desktop/src/components/wisdom-sync-status.tsx b/apps/desktop/src/components/wisdom-sync-status.tsx
index 6d22d4dd9f1..9953f3b58e8 100644
--- a/apps/desktop/src/components/wisdom-sync-status.tsx
+++ b/apps/desktop/src/components/wisdom-sync-status.tsx
@@ -22,7 +22,9 @@ function SyncStatus({ profile }: { profile?: ProfileScope }) {
const controller = useRef<ReturnType<typeof createWisdomSyncController> | null>(null)
// eslint-disable-next-line no-restricted-syntax -- Effect-owned controller, disposed on close/profile change.
useEffect(() => {
- if (!open) {return}
+ if (!open) {
+ return
+ }
const next = createWisdomSyncController({
read: () => getWisdomSync(scope),
@@ -34,7 +36,9 @@ function SyncStatus({ profile }: { profile?: ProfileScope }) {
void next.refresh()
const poll = () => {
- if (document.visibilityState !== 'hidden') {void next.refresh()}
+ if (document.visibilityState !== 'hidden') {
+ void next.refresh()
+ }
}
const timer = window.setInterval(poll, 15_000)
diff --git a/apps/desktop/src/hermes.test.ts b/apps/desktop/src/hermes.test.ts
index 92e32329b85..a4257920a58 100644
--- a/apps/desktop/src/hermes.test.ts
+++ b/apps/desktop/src/hermes.test.ts
@@ -94,12 +94,22 @@ describe('Hermes REST helpers', () => {
}
expect(api).toHaveBeenNthCalledWith(1, expect.objectContaining({ path: '/api/wisdom/mute' }))
- expect(api).toHaveBeenNthCalledWith(2, expect.objectContaining({
- path: '/api/wisdom/mute/prepare', method: 'POST', body: {}
- }))
- expect(api).toHaveBeenNthCalledWith(3, expect.objectContaining({
- path: '/api/wisdom/mute/choose', method: 'POST', body: { control_id: controlId, duration: null }
- }))
+ expect(api).toHaveBeenNthCalledWith(
+ 2,
+ expect.objectContaining({
+ path: '/api/wisdom/mute/prepare',
+ method: 'POST',
+ body: {}
+ })
+ )
+ expect(api).toHaveBeenNthCalledWith(
+ 3,
+ expect.objectContaining({
+ path: '/api/wisdom/mute/choose',
+ method: 'POST',
+ body: { control_id: controlId, duration: null }
+ })
+ )
})
it('reads Wisdom entitlement from the dedicated scoped endpoint', async () => {
@@ -107,9 +117,7 @@ describe('Hermes REST helpers', () => {
await getWisdomEntitlement(scope)
- expect(api).toHaveBeenCalledWith(
- expect.objectContaining({ ...scope, path: '/api/wisdom/entitlement' })
- )
+ expect(api).toHaveBeenCalledWith(expect.objectContaining({ ...scope, path: '/api/wisdom/entitlement' }))
})
it('uses a longer timeout for the all-profile session list', async () => {
diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.ts
index 0414f660e50..065b20a2a5f 100644
--- a/apps/desktop/src/i18n/ar.ts
+++ b/apps/desktop/src/i18n/ar.ts
@@ -1117,18 +1117,18 @@ export const ar = defineLocale({
skills: {
collective: {
notificationPreferences: {
- title: "إعدادات الإشعارات",
- scope: "إشعاراتك الاستباقية عبر تطبيقات هذه المؤسسة. يبقى التصفح والمشاركة اليدويان متاحين.",
- on: "الإشعارات مفعلة",
- muted: "الإشعارات مكتومة",
- day: "يوم واحد",
- week: "أسبوع واحد",
- month: "30 يومًا",
- forever: "بلا حد زمني",
- pending: "تم حفظ اختيارك محليًا وهو بانتظار المزامنة.",
- failed: "فشلت المزامنة. حدّث الإعدادات قبل الاختيار مجددًا.",
- conflict: "تغير تفضيلك في تطبيق آخر. حدّث لمراجعته.",
- expired: "انتهت صلاحية هذا الاختيار. حدّث الإعدادات للمحاولة مجددًا.",
+ title: 'إعدادات الإشعارات',
+ scope: 'إشعاراتك الاستباقية عبر تطبيقات هذه المؤسسة. يبقى التصفح والمشاركة اليدويان متاحين.',
+ on: 'الإشعارات مفعلة',
+ muted: 'الإشعارات مكتومة',
+ day: 'يوم واحد',
+ week: 'أسبوع واحد',
+ month: '30 يومًا',
+ forever: 'بلا حد زمني',
+ pending: 'تم حفظ اختيارك محليًا وهو بانتظار المزامنة.',
+ failed: 'فشلت المزامنة. حدّث الإعدادات قبل الاختيار مجددًا.',
+ conflict: 'تغير تفضيلك في تطبيق آخر. حدّث لمراجعته.',
+ expired: 'انتهت صلاحية هذا الاختيار. حدّث الإعدادات للمحاولة مجددًا.'
},
title: 'الحكمة الجماعية',
loading: 'جارٍ تحميل الحكمة الجماعية…',
@@ -1198,11 +1198,11 @@ export const ar = defineLocale({
submit: 'إرسال المسودة',
submitting: 'جارٍ الإرسال…',
readEvery: 'اقرأ كل ملف. ترتبط الموافقة بالقيم الثلاث الدقيقة للتجزئة أدناه.',
- publishToTeam: "نشر للفريق",
- submitForApproval: "إرسال للموافقة",
- publishLocalNotice: "يؤدي التأكيد إلى رفع هذه الحزمة كما هي ونشرها للفريق بعد اجتياز الفحوصات المطلوبة.",
- submitLocalNotice: "يؤدي التأكيد إلى رفع هذه الحزمة كما هي لموافقة مؤسستك. لن تُنشر حتى اكتمال المراجعة.",
- reloadReview: "إعادة تحميل المراجعة",
+ publishToTeam: 'نشر للفريق',
+ submitForApproval: 'إرسال للموافقة',
+ publishLocalNotice: 'يؤدي التأكيد إلى رفع هذه الحزمة كما هي ونشرها للفريق بعد اجتياز الفحوصات المطلوبة.',
+ submitLocalNotice: 'يؤدي التأكيد إلى رفع هذه الحزمة كما هي لموافقة مؤسستك. لن تُنشر حتى اكتمال المراجعة.',
+ reloadReview: 'إعادة تحميل المراجعة',
editReview:
'عدّل الوصف أو SKILL.md أو البيان التصريحي هنا. ينشئ الحفظ مراجعة خاصة جديدة ويعيد إجراء الفحوصات ويُرجع قيماً جديدة للتجزئة؛ ولا يعيد كتابة المهارة المصدر المحلية.',
editOwnerDescription: 'تعديل الوصف الذي كتبه المالك',
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 138a55ad4d9..4c0aa9f6e9b 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1561,18 +1561,19 @@ export const en: Translations = {
skills: {
collective: {
notificationPreferences: {
- title: "Notification settings",
- scope: "Your proactive notifications across clients in this organization. Manual browsing and sharing remain available.",
- on: "Notifications on",
- muted: "Notifications muted",
- day: "1 day",
- week: "1 week",
- month: "30 days",
- forever: "Indefinitely",
- pending: "Your choice is saved locally and waiting to sync.",
- failed: "Sync failed. Refresh settings before choosing again.",
- conflict: "Your preference changed on another client. Refresh to review it.",
- expired: "This choice expired. Refresh settings to try again.",
+ title: 'Notification settings',
+ scope:
+ 'Your proactive notifications across clients in this organization. Manual browsing and sharing remain available.',
+ on: 'Notifications on',
+ muted: 'Notifications muted',
+ day: '1 day',
+ week: '1 week',
+ month: '30 days',
+ forever: 'Indefinitely',
+ pending: 'Your choice is saved locally and waiting to sync.',
+ failed: 'Sync failed. Refresh settings before choosing again.',
+ conflict: 'Your preference changed on another client. Refresh to review it.',
+ expired: 'This choice expired. Refresh settings to try again.'
},
title: 'Collective Wisdom',
loading: 'Loading Collective Wisdom…',
@@ -1645,8 +1646,10 @@ export const en: Translations = {
readEvery: 'Read every file. Approval is bound to the exact three hashes below.',
publishToTeam: 'Publish to team',
submitForApproval: 'Submit for approval',
- publishLocalNotice: 'Confirming uploads this exact package and publishes it to your team after the required checks.',
- submitLocalNotice: 'Confirming uploads this exact package for your organization to approve. It stays unpublished until moderation is complete.',
+ publishLocalNotice:
+ 'Confirming uploads this exact package and publishes it to your team after the required checks.',
+ submitLocalNotice:
+ 'Confirming uploads this exact package for your organization to approve. It stays unpublished until moderation is complete.',
reloadReview: 'Reload review',
editReview:
'Edit the description, SKILL.md, or declarative manifest here. Saving creates a new private revision, reruns scans, and returns new hashes; it does not rewrite your local source skill.',
@@ -1672,7 +1675,8 @@ export const en: Translations = {
share: 'Share',
reviewPreviousPage: 'Previous review page',
reviewNextPage: 'Next review page',
- sharePreparationNotice: 'Share prepares a local handoff package. You will review it and approve separately before anything is uploaded or published.',
+ sharePreparationNotice:
+ 'Share prepares a local handoff package. You will review it and approve separately before anything is uploaded or published.',
muteNotificationsSoon: 'Mute notifications (coming soon)',
unmuteNotificationsSoon: 'Unmute notifications (coming soon)',
openCollective: 'Open Collective',
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 0bcd88fcabf..df727947cf2 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -1407,18 +1407,18 @@ export const ja = defineLocale({
skills: {
collective: {
notificationPreferences: {
- title: "通知設定",
- scope: "この組織の各クライアントで受け取る通知を管理します。手動での閲覧や共有は引き続き利用できます。",
- on: "通知オン",
- muted: "通知ミュート",
- day: "1 日",
- week: "1 週間",
- month: "30 日",
- forever: "無期限",
- pending: "選択はローカルに保存され、同期待ちです。",
- failed: "同期に失敗しました。設定を更新してから選び直してください。",
- conflict: "別のクライアントで設定が変更されました。更新して確認してください。",
- expired: "この選択は期限切れです。設定を更新して再試行してください。",
+ title: '通知設定',
+ scope: 'この組織の各クライアントで受け取る通知を管理します。手動での閲覧や共有は引き続き利用できます。',
+ on: '通知オン',
+ muted: '通知ミュート',
+ day: '1 日',
+ week: '1 週間',
+ month: '30 日',
+ forever: '無期限',
+ pending: '選択はローカルに保存され、同期待ちです。',
+ failed: '同期に失敗しました。設定を更新してから選び直してください。',
+ conflict: '別のクライアントで設定が変更されました。更新して確認してください。',
+ expired: 'この選択は期限切れです。設定を更新して再試行してください。'
},
title: 'コレクティブ・ウィズダム',
loading: 'コレクティブ・ウィズダムを読み込み中…',
@@ -1491,11 +1491,11 @@ export const ja = defineLocale({
submit: '下書きを提出',
submitting: '提出中…',
readEvery: 'すべてのファイルを確認してください。承認は下記の正確な3つのハッシュに紐づきます。',
- publishToTeam: "チームに公開",
- submitForApproval: "承認を申請",
- publishLocalNotice: "確認すると、このパッケージをアップロードし、必要なチェックの後にチームへ公開します。",
- submitLocalNotice: "確認すると、このパッケージを組織の承認に提出します。審査完了までは公開されません。",
- reloadReview: "レビューを再読み込み",
+ publishToTeam: 'チームに公開',
+ submitForApproval: '承認を申請',
+ publishLocalNotice: '確認すると、このパッケージをアップロードし、必要なチェックの後にチームへ公開します。',
+ submitLocalNotice: '確認すると、このパッケージを組織の承認に提出します。審査完了までは公開されません。',
+ reloadReview: 'レビューを再読み込み',
editReview:
'ここで説明、SKILL.md、宣言的マニフェストを編集できます。保存すると新しい非公開リビジョンが作成され、スキャンが再実行されて新しいハッシュが返されます。ローカルの元スキルは書き換えません。',
editOwnerDescription: '所有者による説明を編集',
@@ -1520,7 +1520,8 @@ export const ja = defineLocale({
share: '共有',
reviewPreviousPage: '前の確認ページ',
reviewNextPage: '次の確認ページ',
- sharePreparationNotice: '共有用のパッケージをローカルで準備します。アップロードや公開の前に、内容を確認して別途承認します。',
+ sharePreparationNotice:
+ '共有用のパッケージをローカルで準備します。アップロードや公開の前に、内容を確認して別途承認します。',
muteNotificationsSoon: '通知をミュート(近日対応)',
unmuteNotificationsSoon: '通知のミュートを解除(近日対応)',
openCollective: 'コレクティブを開く',
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index 6e56ebe064d..bb90986541c 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -1512,22 +1512,25 @@ export const ru = defineLocale({
collective: {
publishToTeam: 'Опубликовать для команды',
submitForApproval: 'Отправить на одобрение',
- publishLocalNotice: 'Подтверждение загрузит именно этот пакет и опубликует его для команды после обязательных проверок.',
- submitLocalNotice: 'Подтверждение загрузит именно этот пакет на одобрение организации. До завершения модерации он не будет опубликован.',
+ publishLocalNotice:
+ 'Подтверждение загрузит именно этот пакет и опубликует его для команды после обязательных проверок.',
+ submitLocalNotice:
+ 'Подтверждение загрузит именно этот пакет на одобрение организации. До завершения модерации он не будет опубликован.',
reloadReview: 'Обновить проверку',
notificationPreferences: {
- title: "Настройки уведомлений",
- scope: "Ваши инициативные уведомления во всех клиентах этой организации. Просмотр и публикация вручную остаются доступны.",
- on: "Уведомления включены",
- muted: "Уведомления отключены",
- day: "1 день",
- week: "1 неделя",
- month: "30 дней",
- forever: "Бессрочно",
- pending: "Выбор сохранён локально и ожидает синхронизации.",
- failed: "Сбой синхронизации. Обновите настройки и выберите снова.",
- conflict: "Настройка изменена в другом клиенте. Обновите для проверки.",
- expired: "Срок действия выбора истёк. Обновите настройки и повторите.",
+ title: 'Настройки уведомлений',
+ scope:
+ 'Ваши инициативные уведомления во всех клиентах этой организации. Просмотр и публикация вручную остаются доступны.',
+ on: 'Уведомления включены',
+ muted: 'Уведомления отключены',
+ day: '1 день',
+ week: '1 неделя',
+ month: '30 дней',
+ forever: 'Бессрочно',
+ pending: 'Выбор сохранён локально и ожидает синхронизации.',
+ failed: 'Сбой синхронизации. Обновите настройки и выберите снова.',
+ conflict: 'Настройка изменена в другом клиенте. Обновите для проверки.',
+ expired: 'Срок действия выбора истёк. Обновите настройки и повторите.'
},
qualificationFirst: organizationName =>
`${organizationName ? `Ваша организация (${organizationName})` : 'Ваша организация'} включила Collective Wisdom — функцию, которая автоматически находит полезные навыки у всех участников команды. Поздравляем! Hermes обнаружил навык, который может быть полезен вашей команде.`,
@@ -1544,7 +1547,8 @@ export const ru = defineLocale({
share: 'Поделиться',
reviewPreviousPage: 'Предыдущая страница проверки',
reviewNextPage: 'Следующая страница проверки',
- sharePreparationNotice: 'Будет подготовлен локальный пакет. Перед загрузкой или публикацией вы отдельно проверите и одобрите его.',
+ sharePreparationNotice:
+ 'Будет подготовлен локальный пакет. Перед загрузкой или публикацией вы отдельно проверите и одобрите его.',
muteNotificationsSoon: 'Отключить уведомления (скоро)',
unmuteNotificationsSoon: 'Включить уведомления (скоро)'
},
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index e10152391f2..da3416b238a 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -1356,18 +1356,18 @@ export const zhHant = defineLocale({
submitLocalNotice: '確認後將上傳此確切的套件供組織審核。審核完成前不會發布。',
reloadReview: '重新載入審核內容',
notificationPreferences: {
- title: "通知設定",
- scope: "管理此組織中跨用戶端的主動通知。手動瀏覽和分享仍可使用。",
- on: "通知已開啟",
- muted: "通知已靜音",
- day: "1 天",
- week: "1 週",
- month: "30 天",
- forever: "無限期",
- pending: "選擇已儲存在本機,正在等待同步。",
- failed: "同步失敗。請重新整理設定後重新選擇。",
- conflict: "其他用戶端變更了偏好。請重新整理查看。",
- expired: "此選擇已過期。請重新整理設定後再試。",
+ title: '通知設定',
+ scope: '管理此組織中跨用戶端的主動通知。手動瀏覽和分享仍可使用。',
+ on: '通知已開啟',
+ muted: '通知已靜音',
+ day: '1 天',
+ week: '1 週',
+ month: '30 天',
+ forever: '無限期',
+ pending: '選擇已儲存在本機,正在等待同步。',
+ failed: '同步失敗。請重新整理設定後重新選擇。',
+ conflict: '其他用戶端變更了偏好。請重新整理查看。',
+ expired: '此選擇已過期。請重新整理設定後再試。'
},
title: '集體智慧',
loading: '正在載入集體智慧…',
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 3c254a7a031..b6bf7ae990a 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -1735,18 +1735,18 @@ export const zh: Translations = {
submitLocalNotice: '确认后将上传此确切的软件包供组织审核。审核完成前不会发布。',
reloadReview: '重新加载审核内容',
notificationPreferences: {
- title: "通知设置",
- scope: "管理此组织中跨客户端的主动通知。手动浏览和分享仍可使用。",
- on: "通知已开启",
- muted: "通知已静音",
- day: "1 天",
- week: "1 周",
- month: "30 天",
- forever: "无限期",
- pending: "选择已保存在本地,正在等待同步。",
- failed: "同步失败。请刷新设置后重新选择。",
- conflict: "其他客户端更改了偏好。请刷新查看。",
- expired: "此选择已过期。请刷新设置后重试。",
+ title: '通知设置',
+ scope: '管理此组织中跨客户端的主动通知。手动浏览和分享仍可使用。',
+ on: '通知已开启',
+ muted: '通知已静音',
+ day: '1 天',
+ week: '1 周',
+ month: '30 天',
+ forever: '无限期',
+ pending: '选择已保存在本地,正在等待同步。',
+ failed: '同步失败。请刷新设置后重新选择。',
+ conflict: '其他客户端更改了偏好。请刷新查看。',
+ expired: '此选择已过期。请刷新设置后重试。'
},
title: '集体智慧',
loading: '正在加载集体智慧…',
diff --git a/apps/desktop/src/lib/transcript-directives.ts b/apps/desktop/src/lib/transcript-directives.ts
index bb0b0d3a7d4..91c117f690a 100644
--- a/apps/desktop/src/lib/transcript-directives.ts
+++ b/apps/desktop/src/lib/transcript-directives.ts
@@ -55,8 +55,7 @@ export interface ParsedTranscriptDirective {
}
export type TranscriptParagraphSegment =
- | { kind: 'prose'; text: string }
- | { kind: 'directive'; directive: ParsedTranscriptDirective }
+ { kind: 'prose'; text: string } | { kind: 'directive'; directive: ParsedTranscriptDirective }
// The whole paragraph, nothing else on the line: `::name` or `::name{...}`.
// Length caps bound the attr scan on adversarial input.
diff --git a/apps/desktop/src/store/profile.ts b/apps/desktop/src/store/profile.ts
index cc5b10e185d..b2d48892531 100644
--- a/apps/desktop/src/store/profile.ts
+++ b/apps/desktop/src/store/profile.ts
@@ -532,9 +532,7 @@ export async function ensureGatewayProfile(profile: string | null | undefined):
const descriptor = $connection.get()
return Boolean(
- descriptor &&
- descriptor.sharedPrimary === true &&
- normalizeProfileKey(descriptor.profile) === target
+ descriptor && descriptor.sharedPrimary === true && normalizeProfileKey(descriptor.profile) === target
)
}