Skip to content

Repository files navigation

🚀 CK-ASK

AI 对话暂停工具 - 让 AI 等待你的指令

Version License Node.js Python

🔥 绕过 MCP 限制 | 📡 纯 HTTP 通信 | 🖥️ 终端 + 弹窗双模式


✨ 核心特性

功能 说明
🔓 绕过 MCP - 纯 HTTP 通信,无需复杂的 MCP 配置
🖥️ 终端模式 - 直接在终端等待用户输入
🪟 弹窗模式 - 配合 VSIX 扩展显示精美弹窗
📎 文件上传 - 支持图片和文件附加
自动回调 - 智能端口发现和回调机制

📦 架构

┌─────────────────────────────────────────────────────────────────┐
│                         Windsurf / Cursor                        │
│  ┌───────────┐    subprocess    ┌────────────────────────────┐  │
│  │    AI     │ ───────────────► │   pause_dialog.js          │  │
│  │  (模型)   │                  │   (Node.js 暂停脚本)        │  │
│  └───────────┘                  └────────────────────────────┘  │
│                                          │                       │
│                            ┌─────────────┴─────────────┐        │
│                            ▼                           ▼        │
│                   ┌──────────────┐           ┌──────────────┐   │
│                   │  终端输入    │           │  VSIX 扩展   │   │
│                   │  (备选方案)  │           │  (弹窗 UI)   │   │
│                   └──────────────┘           └──────────────┘   │
└─────────────────────────────────────────────────────────────────┘

🚀 快速开始

方式一:直接使用 Node.js 脚本

# 克隆项目
git clone https://github.com/1837620622/ck-ask.git
cd ck-ask

# 运行暂停脚本
node pause_dialog.js "任务已完成" "/your/workspace/path"

方式二:配合 Python MCP Server

# 安装依赖
pip install mcp

# 配置 MCP (编辑 ~/.codeium/windsurf/mcp_config.json)
{
  "mcpServers": {
    "ck-ask": {
      "command": "python3",
      "args": ["/path/to/mcp_server.py"],
      "env": {
        "WORKSPACE_PATH": "${workspaceFolder}"
      }
    }
  }
}

方式三:安装 VSIX 扩展(推荐)

  1. 打开 Windsurf
  2. Cmd+Shift+PExtensions: Install from VSIX
  3. 选择 windsurf-ask-continue-1.3.2.vsix
  4. 重启 Windsurf

📁 文件说明

文件 说明
pause_dialog.js 🟢 核心脚本 - Node.js 对话暂停,纯 HTTP 通信
mcp_server.py 🐍 Python MCP 服务器(可选)
windsurf-ask-continue-*.vsix 🧩 Windsurf 弹窗扩展(可选)

🔧 工作原理

1️⃣ AI 调用暂停 ──► 2️⃣ Node.js 启动回调服务器
                            │
                            ▼
3️⃣ 发送 HTTP 请求 ──► 4️⃣ 扩展显示弹窗 / 终端等待输入
                            │
                            ▼
5️⃣ 用户输入 ──► 6️⃣ 回调返回结果 ──► 7️⃣ AI 继续执行

HTTP 接口

接口 方法 说明
/ask POST 发送暂停请求
/response POST 接收用户响应

📖 使用示例

终端模式输出

[Node.js] 回调服务器已启动,端口 23990
[Node.js] Ask Continue 暂停脚本启动
[Node.js] 原因: 代码修改完成
[Node.js] 扩展端口: 23983
[Node.js] 回调端口: 23990

==================================================
📋 代码修改完成
==================================================
请输入后续指令(输入 exit 结束对话):
> 继续优化性能

返回 JSON 格式

{
  "should_continue": true,
  "user_instruction": "继续优化性能",
  "image_paths": null
}

🌟 为什么选择 CK-ASK?

对比项 传统 MCP CK-ASK
配置复杂度
通信方式 stdio HTTP
调试难度 困难 简单
独立运行
终端模式

👨‍💻 作者

传康 KK

GitHub Email

💬 微信: 1837620622
🐟 咸鱼/B站: 万能程序员


⭐ 支持项目

如果这个项目对你有帮助,请给个 Star ⭐ 支持一下!


📄 License

MIT License - 自由使用,欢迎贡献!

About

CK-ASK - AI对话暂停工具 | 绕过MCP限制 | 纯HTTP通信 | 终端+弹窗双模式 | Windsurf/Cursor

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages