Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

486 B
Raw Blame
import { extractIpcError } from '@/utils/ipcError';

/** Local presentation only; never sent to the Host or persisted in task history. */
export interface PluginSetupCommandError {
  requestId: string;
  revision: number;
  code: 'REMOTE_UNSUPPORTED' | 'REMOTE_FAILED';
}

export function remotePluginSetupErrorCode(error: unknown): PluginSetupCommandError['code'] {
  return extractIpcError(error)?.code === 'UNSUPPORTED_CAPABILITY'
    ? 'REMOTE_UNSUPPORTED'
    : 'REMOTE_FAILED';
}