Skip to content

  • 项目
  • 群组
  • 代码片段
  • 帮助
  • 当前项目
    • 正在载入...
  • 登录 / 注册
B
bit-pm
  • 项目
    • 项目
    • 详情
    • 活动
    • 周期分析
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 图表
    • 比较
    • 统计图
  • 议题 0
    • 议题 0
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI / CD
    • CI / CD
    • 流水线
    • 作业
    • 日程
    • 统计图
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 成员
    • 成员
  • 折叠边栏
  • 活动
  • 图像
  • 聊天
  • 创建新问题
  • 作业
  • 提交
  • 问题看板
  • 燕伟桐
  • bit-pm
  • Repository

切换分支/标签
  • bit-pm
  • src
  • ipc
  • deep_link_data.ts
查找文件
BlameHistoryPermalink
  • Will Chen's avatar
    Deep link: add prompt (#1669) · 04b1a36f
    由 Will Chen 提交于 10月 30, 2025
    Example:
    open
    "dyad://add-prompt?data=eyJ0aXRsZSI6IlRlc3QgUHJvbXB0IiwiZGVzY3JpcHRpb24iOiJBIHRlc3QgcHJvbXB0IGZyb20gZGVlcCBsaW5rIiwiY29udGVudCI6IlRoaXMgaXMgdGhlIGNvbnRlbnQgb2YgdGhlIHByb21wdC4ifQ%3D%3D"
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > Adds dyad://add-prompt deep link that navigates to Library and opens a
    prefilled Create Prompt dialog from base64 JSON.
    > 
    > - **Deep Link Handling**
    > - Parse `dyad://add-prompt?data=<base64-json>` in `src/main.ts`;
    validate with `AddPromptDataSchema` and send `deep-link-received` with
    payload.
    > - Extend `DeepLinkContext` to navigate to `/library` on `add-prompt`.
    > - **Library/Dialogs**
    > - Add controlled open state and `prefillData` support to
    `CreateOrEditPromptDialog` and `CreatePromptDialog`
    (`src/components/CreatePromptDialog.tsx`).
    > - In `src/pages/library.tsx`, listen for `add-prompt` deep link,
    prefill form, open dialog, and clear deep-link state.
    > - **Schemas**
    > - Define `AddPromptDataSchema`, `AddPromptPayload`, and
    `AddPromptDeepLinkData` in `src/ipc/deep_link_data.ts` and include in
    `DeepLinkData` union.
    > - **E2E Tests**
    > - Add Playwright test `e2e-tests/add_prompt_deep_link.spec.ts` and
    ARIA snapshot to verify deep link opens prefilled dialog and saves
    prompt.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    1ddb12306cfca195682c8a1b719f60093b858d54. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    04b1a36f
deep_link_data.ts 905 Bytes
编辑Web IDE

Replace deep_link_data.ts

拖放文件到此处或者 点击上传


取消
将在派生(fork)项目中中创建一个新的分支, 并开启一个新的合并请求。