演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
565 B
TypeScript
20 lines
565 B
TypeScript
'use client'
|
|
|
|
import type { ImSyncResultItem } from '@dify/contracts/api/console/workspaces/types.gen'
|
|
import { parseAsString, parseAsStringEnum, useQueryState } from 'nuqs'
|
|
|
|
type SyncResult = ImSyncResultItem['result']['type']
|
|
export const useContactImSyncRunUrlState = () => useQueryState('sync_run_id', parseAsString)
|
|
|
|
export const useContactImSyncResultUrlState = () =>
|
|
useQueryState(
|
|
'sync_result',
|
|
parseAsStringEnum<SyncResult>([
|
|
'added',
|
|
'not_matched',
|
|
'failed',
|
|
'removed',
|
|
'skipped',
|
|
]).withDefault('added'),
|
|
)
|