メインコンテンツへスキップ
Deeplinks はカスタム URL に基づくナビゲーションメカニズムであり、ブラウザ、ドキュメント、ターミナル、その他の外部環境から Qoder Desktop を直接起動し、指定されたページを開いたり、特定の操作を実行したりできます——例えばチャットの開始、Quest タスクの作成、ルールのインポート、MCP サービス設定の追加など。 コンテンツの書き込みや設定のインポートを伴う Deeplinks の場合、Qoder Desktop は続行前に確認ダイアログを表示し、内容を確認してから実行します。一部の Deeplinks は、事前にアカウントにログインする必要があります。 deeplink example

URL フォーマット

{scheme}://{host}/{path}?{parameters}
構成要素説明
schemeプロトコルqoder
hostDeeplinks ハンドラー識別子aicoding.aicoding-deeplink
pathアクションパス/chat, /quest, /rule, /command, /mcp/add
parametersURL クエリパラメータtext=hello&mode=agent
パス説明ログイン必須
/chatAI チャットを作成はい
/questQuest タスクを作成はい
/ruleルールを作成いいえ
/commandカスタムコマンドを作成いいえ
/mcp/addMCP サービスを追加いいえ

AI チャットを作成 /chat

リンクを介してチャットセッションを直接開始します。リンクを開くと、Qoder Desktop はまず新しい会話に持ち込まれるコンテンツを表示し、確認後に新しいチャットを作成して、自動的に送信することなく入力ボックスにテキストを事前入力します。使用する前にアカウントにログインする必要があります。

URL フォーマット

qoder://aicoding.aicoding-deeplink/chat?text={prompt}&mode={mode}&isNewChat={isNewChat}

パラメータ

パラメータ必須説明
textはい事前入力するプロンプト内容
modeいいえチャットモード:agentaskchat、または Experts が有効な場合は expertsask は内部では chat として扱われます。
isNewChatいいえ新しいチャットを作成するかどうか。デフォルトは truefalse にすると現在のチャットに事前入力します。

qoder://aicoding.aicoding-deeplink/chat?text=Help%20me%20refactor%20this%20code&mode=agent

リンク生成コード

function generateChatDeeplink(text: string, mode?: 'agent' | 'ask' | 'chat' | 'experts', isNewChat?: boolean): string {
  if (!text) {
    throw new Error('必須パラメータがありません: text');
  }

  const url = new URL('qoder://aicoding.aicoding-deeplink/chat');
  url.searchParams.set('text', text);
  if (mode) {
    url.searchParams.set('mode', mode);
  }
  if (isNewChat !== undefined) {
    url.searchParams.set('isNewChat', String(isNewChat));
  }

  return url.toString();
}

// 例
const deeplink = generateChatDeeplink('このコードをリファクタリングしてください', 'agent');
console.log(deeplink);
from urllib.parse import urlencode

def generate_chat_deeplink(text: str, mode: str = None, is_new_chat: bool = None) -> str:
    if not text:
        raise ValueError('必須パラメータがありません: text')

    params = {'text': text}
    if mode:
        params['mode'] = mode
    if is_new_chat is not None:
        params['isNewChat'] = str(is_new_chat).lower()

    return f"qoder://aicoding.aicoding-deeplink/chat?{urlencode(params)}"

# 例
deeplink = generate_chat_deeplink('このコードをリファクタリングしてください', 'agent')
print(deeplink)

Quest タスクを作成 /quest

独立した Quest ウィンドウを開く、または前面に出し、New Quest の下書きを事前入力します。リンクを開くと、タスクの説明と実行モードを確認してから続行するかどうかを決定できます。使用する前にアカウントにログインする必要があります。

URL フォーマット

qoder://aicoding.aicoding-deeplink/quest?text={description}&agentClass={agentClass}

パラメータ

パラメータ必須説明
textはいタスクの説明
agentClassいいえ実行モード:LocalAgent(デフォルト)または LocalWorktree

実行モード

モード説明
LocalAgent現在のワークスペースで実行
LocalWorktree分離された git worktree で実行

qoder://aicoding.aicoding-deeplink/quest?text=Implement%20user%20authentication%20with%20JWT&agentClass=LocalWorktree

リンク生成コード

type AgentClass = 'LocalAgent' | 'LocalWorktree';

function generateQuestDeeplink(text: string, agentClass?: AgentClass): string {
  if (!text) {
    throw new Error('必須パラメータがありません: text');
  }

  const url = new URL('qoder://aicoding.aicoding-deeplink/quest');
  url.searchParams.set('text', text);
  if (agentClass) {
    url.searchParams.set('agentClass', agentClass);
  }

  return url.toString();
}

// 例
const deeplink = generateQuestDeeplink('JWT を使用したユーザー認証を実装', 'LocalWorktree');
console.log(deeplink);
from urllib.parse import urlencode

def generate_quest_deeplink(text: str, agent_class: str = None) -> str:
    if not text:
        raise ValueError('必須パラメータがありません: text')

    params = {'text': text}
    if agent_class:
        params['agentClass'] = agent_class

    return f"qoder://aicoding.aicoding-deeplink/quest?{urlencode(params)}"

# 例
deeplink = generate_quest_deeplink('JWT を使用したユーザー認証を実装', 'LocalWorktree')
print(deeplink)

ルールを作成 /rule

リンクを介して AI の動作をガイドするルールをインポートします。ルールでは、コーディング標準、プロジェクトの規約、AI 応答の特定の指示を定義できます。リンクを開くと、インポートするかどうかを決定する前に、ルール名とコンテンツをプレビューできます。確認後、対応するルールが作成されます。

URL フォーマット

qoder://aicoding.aicoding-deeplink/rule?name={ruleName}&text={ruleContent}

パラメータ

パラメータ必須説明
nameはいルール名(ファイル名として使用)
textはいルールの内容

qoder://aicoding.aicoding-deeplink/rule?name=typescript-conventions&text=Always%20use%20strict%20TypeScript%20types

リンク生成コード

function generateRuleDeeplink(name: string, text: string): string {
  if (!name || !text) {
    throw new Error('必須パラメータがありません: name と text');
  }

  const url = new URL('qoder://aicoding.aicoding-deeplink/rule');
  url.searchParams.set('name', name);
  url.searchParams.set('text', text);

  return url.toString();
}

// 例
const deeplink = generateRuleDeeplink(
  'typescript-conventions',
  `常に厳格な TypeScript 型を使用してください。
'any' 型の使用を避けてください。
オブジェクト型には type より interface を優先してください。`
);
console.log(deeplink);
from urllib.parse import urlencode

def generate_rule_deeplink(name: str, text: str) -> str:
    if not name or not text:
        raise ValueError('必須パラメータがありません: name と text')

    params = {'name': name, 'text': text}
    return f"qoder://aicoding.aicoding-deeplink/rule?{urlencode(params)}"

# 例
deeplink = generate_rule_deeplink(
    'typescript-conventions',
    """常に厳格な TypeScript 型を使用してください。
'any' 型の使用を避けてください。
オブジェクト型には type より interface を優先してください。"""
)
print(deeplink)

MCP サービスを追加 /mcp/add

リンクを介して MCP(Model Context Protocol)サービス設定をすばやく追加できます。MCP サービスは、追加のツールとコンテキストソースを提供することで AI の機能を拡張します。リンクを開くと、Qoder Desktop はまず追加されるサービス情報を表示し、MCP 設定ページを開いて、内容を確認しながら承認できるようにします。

URL フォーマット

qoder://aicoding.aicoding-deeplink/mcp/add?name={serverName}&config={base64EncodedConfig}

パラメータ

パラメータ必須説明
nameはいMCP サービス名
configはいBase64 エンコードされた MCP service JSON 設定
注意:設定には command または url のいずれかが含まれている必要があります。名前が既に存在する場合は、重複して追加することはできません。

qoder://aicoding.aicoding-deeplink/mcp/add?name=postgres&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMm5weCUyMiUyQyUyMmFyZ3MlMjIlM0ElNUIlMjIteSUyMiUyQyUyMiU0MG1vZGVsY29udGV4dHByb3RvY29sJTJGc2VydmVyLXBvc3RncmVzJTIyJTJDJTIycG9zdGdyZXNxbCUzQSUyRiUyRmxvY2FsaG9zdCUyRm15ZGIlMjIlNUQlN0Q%3D

リンク生成コード

MCP service JSON エンコードプロセス:
  1. 設定 JSON オブジェクトを作成
  2. JSON.stringify() でシリアライズ
  3. encodeURIComponent() で URL エンコード
  4. btoa() で Base64 エンコード
  5. 結果を encodeURIComponent() で URL エンコード
interface McpServerConfig {
  command?: string;
  args?: string[];
  url?: string;
  env?: Record<string, string>;
}

function generateMcpAddDeeplink(name: string, config: McpServerConfig): string {
  if (!name) {
    throw new Error('必須パラメータがありません: name');
  }
  if (!config) {
    throw new Error('必須パラメータがありません: config');
  }
  if (!config.command && !config.url) {
    throw new Error('設定には "command" または "url" が必要です');
  }

  const configJson = JSON.stringify(config);
  const base64Config = btoa(encodeURIComponent(configJson));
  const encodedName = encodeURIComponent(name);
  const encodedConfig = encodeURIComponent(base64Config);

  return `qoder://aicoding.aicoding-deeplink/mcp/add?name=${encodedName}&config=${encodedConfig}`;
}

// 例 1: PostgreSQL MCP サーバー
const postgresDeeplink = generateMcpAddDeeplink('postgres', {
  command: 'npx',
  args: ['-y', '@modelcontextprotocol/server-postgres', 'postgresql://localhost/mydb']
});
console.log(postgresDeeplink);

// 例 2: 環境変数付きの GitHub MCP サーバー
const githubDeeplink = generateMcpAddDeeplink('github', {
  command: 'npx',
  args: ['-y', '@modelcontextprotocol/server-github'],
  env: { GITHUB_PERSONAL_ACCESS_TOKEN: '<YOUR_TOKEN>' }
});
console.log(githubDeeplink);

// 例 3: HTTP ベースの MCP サーバー
const httpDeeplink = generateMcpAddDeeplink('custom-server', {
  url: 'https://mcp.example.com/sse'
});
console.log(httpDeeplink);
import json
import base64
from urllib.parse import quote

def generate_mcp_add_deeplink(name: str, config: dict) -> str:
    if not name:
        raise ValueError('必須パラメータがありません: name')
    if not config:
        raise ValueError('必須パラメータがありません: config')
    if 'command' not in config and 'url' not in config:
        raise ValueError('設定には "command" または "url" が必要です')

    config_json = json.dumps(config)
    config_encoded = quote(config_json)
    config_base64 = base64.b64encode(config_encoded.encode()).decode()
    encoded_name = quote(name)
    encoded_config = quote(config_base64)

    return f"qoder://aicoding.aicoding-deeplink/mcp/add?name={encoded_name}&config={encoded_config}"

# 例 1: PostgreSQL MCP サーバー
postgres_deeplink = generate_mcp_add_deeplink('postgres', {
    'command': 'npx',
    'args': ['-y', '@modelcontextprotocol/server-postgres', 'postgresql://localhost/mydb']
})
print(postgres_deeplink)

# 例 2: 環境変数付きの GitHub MCP サーバー
github_deeplink = generate_mcp_add_deeplink('github', {
    'command': 'npx',
    'args': ['-y', '@modelcontextprotocol/server-github'],
    'env': { 'GITHUB_PERSONAL_ACCESS_TOKEN': '<YOUR_TOKEN>' }
})
print(github_deeplink)


コマンドを作成 /command

リンクを介してカスタムコマンドをすばやく作成します。一般的なプロンプトテンプレート、プロジェクトの操作説明、チーム内の規約コマンドの配布に最適です。リンクを開くと、Qoder Desktop はまずコマンド名、スコープ、説明、およびコンテンツを表示し、確認後に作成します。

URL フォーマット

qoder://aicoding.aicoding-deeplink/command?name={name}&text={content}&description={description}&scope={scope}

パラメータ

パラメータ必須説明
nameはいコマンド名。小文字のアルファベット、数字、ハイフン、アンダースコアのみを含めることができます
textはいコマンドの内容
descriptionいいえコマンドの説明
scopeいいえ適用範囲:user または project、デフォルトは user

適用範囲

範囲説明
user現在のユーザー環境にのみ追加されます
project現在のワークスペースに追加され、チームの共有に適しています

qoder://aicoding.aicoding-deeplink/command?name=review_pr&text=Please%20help%20me%20review%20this%20PR&description=Review%20pull%20request&scope=user

リンク生成コード

type CommandScope = 'user' | 'project';

function generateCommandDeeplink(
  name: string,
  text: string,
  description?: string,
  scope: CommandScope = 'user'
): string {
  if (!name) {
    throw new Error('必須パラメータがありません: name');
  }
  if (!text) {
    throw new Error('必須パラメータがありません: text');
  }
  if (!/^[a-z0-9_-]+$/.test(name)) {
    throw new Error('コマンド名には小文字の英字、数字、ハイフン、アンダースコアのみ使用できます');
  }

  const url = new URL('qoder://aicoding.aicoding-deeplink/command');
  url.searchParams.set('name', name);
  url.searchParams.set('text', text);
  if (description) {
    url.searchParams.set('description', description);
  }
  url.searchParams.set('scope', scope);

  return url.toString();
}

// 例
const deeplink = generateCommandDeeplink(
  'review_pr',
  'Please help me review this PR',
  'Review pull request'
);
console.log(deeplink);
import re
from urllib.parse import urlencode

def generate_command_deeplink(name: str, text: str, description: str = None, scope: str = 'user') -> str:
    if not name:
        raise ValueError('必須パラメータがありません: name')
    if not text:
        raise ValueError('必須パラメータがありません: text')
    if not re.match(r'^[a-z0-9_-]+$', name):
        raise ValueError('コマンド名には小文字の英字、数字、ハイフン、アンダースコアのみ使用できます')
    if scope not in ('user', 'project'):
        raise ValueError('無効な scope です。有効な値: user, project')

    params = {
        'name': name,
        'text': text,
        'scope': scope,
    }
    if description:
        params['description'] = description

    return f"qoder://aicoding.aicoding-deeplink/command?{urlencode(params)}"

# 例
deeplink = generate_command_deeplink('review_pr', 'Please help me review this PR', 'Review pull request')
print(deeplink)

使用上の注意

  1. リンクをクリックすると、Qoder Desktop は確認のためにコマンド情報を表示します。
  2. name は空にできず、小文字のアルファベット、数字、ハイフン、アンダースコアのみを使用できます。
  3. scope=project には、現在ワークスペースが開かれている必要があります。そうでない場合は作成できません。
  4. 同名のコマンドを重複して作成することはできません。

セキュリティに関する注意事項

重要: Deeplinks をクリックする前に、必ず内容を確認してください。
  • 機密データを含めない: Deeplinks に API キー、パスワード、プロプライエタリコードを埋め込まないでください
  • ソースを確認する: 信頼できるソースからの Deeplinks のみをクリックしてください
  • 確認前に内容を確認: Qoder Desktop は常に確認ダイアログを表示します。続行する前に内容を注意深く確認してください
  • 自動実行なし: Deeplinks は自動的に実行されません。常にユーザーの確認が必要です

トラブルシューティング

問題考えられる原因解決策
”Unregistered deeplink path”サポートされていないディープリンクパスパスがサポートされているか確認し、Qoder バージョンが 0.2.21 以上であることを確認してください
”Missing required parameter”パラメータが指定されていないURL にすべての必須パラメータが含まれているか確認してください
”Invalid JSON config”JSON の形式が正しくないエンコード前に JSON 構造を検証してください
”Quest Mode is disabled”Quest 機能が有効になっていない設定で Quest モードを有効にしてください
ログインプロンプトが表示されるディープリンクに認証が必要最初にアカウントにサインインしてください
”Invalid Base64 encoded config”MCP 設定のエンコード順序が正しくない正しいエンコード順序を確認: JSON → encodeURIComponent → btoa → encodeURIComponent

URL 長さ制限

Deeplinks URL は 8,000 文字を超えないようにしてください。長いコンテンツの場合は、以下を検討してください:
  • プロンプトまたはルールの内容を短くする
  • インラインコンテンツの代わりに外部参照を使用する
  • 複数の Deeplinks に分割する