-
-
Notifications
You must be signed in to change notification settings - Fork 217
feat(ws): add OpenAI Responses WebSocket support #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
b7a58dd
2d51ef9
f768c63
30fb85c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,4 +58,6 @@ COPY --from=build --chown=node:node /app/.next/static ./.next/static | |
| USER node | ||
| EXPOSE 3000 | ||
|
|
||
| # TODO: Switch to custom server entry for WebSocket support once ingress handler is ready | ||
| # CMD ["node", "src/server/index.js"] | ||
| CMD ["node", "server.js"] | ||
|
Comment on lines
+61
to
63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# 检查 server.js 和 src/server/index.js 的存在及内容
# 查找服务器相关文件
echo "=== 查找服务器入口文件 ==="
fd -t f -e js -e ts "^(server|index)\.(js|ts)$" --max-depth 2
echo ""
echo "=== 检查 package.json 中的启动脚本 ==="
cat package.json | jq '.scripts | to_entries | map(select(.key | test("start")))' 2>/dev/null || grep -A 5 '"scripts"' package.jsonRepository: ding113/claude-code-hub Length of output: 259 🏁 Script executed: #!/bin/bash
# 检查 Next.js 构建配置和服务器文件结构
echo "=== 查找 Next.js 配置文件 ==="
fd -t f "next\.config\.(js|ts|mjs)" .
echo ""
echo "=== 检查 src/server 目录结构 ==="
fd -t f . src/server/ 2>/dev/null || echo "src/server/ 目录不存在或为空"
echo ""
echo "=== 检查 .next 构建输出目录 ==="
ls -la .next/ 2>/dev/null | head -20 || echo ".next/ 目录不存在"
echo ""
echo "=== 查找所有 server 相关文件 ==="
fd -t f "server" . --exclude "node_modules" --exclude ".git" --exclude ".next"
echo ""
echo "=== 检查 Dockerfile 的完整内容 ==="
cat deploy/DockerfileRepository: ding113/claude-code-hub Length of output: 2454 TODO 注释已过时,Dockerfile 应更新以使用自定义服务器入口。 WebSocket 入站处理器已在本 PR 中实现( 同时,注释中对 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ALTER TABLE "system_settings" ADD COLUMN "enable_responses_websocket" boolean DEFAULT false NOT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ding113/claude-code-hub
Length of output: 18518
Docker 当前运行的是 Next.js 独立输出,会跳过自定义 WS 服务器。
容器启动
server.js(Next.js standalone from.next/standalone/),而完整的 HTTP+WS 引导逻辑在src/server/index.ts中。该自定义服务器已正确实现:/v1/responses路径配置完成问题:Docker 目前运行的 standalone 输出不包含自定义服务器代码,导致容器内 WebSocket 无法工作。
修复:修改 Dockerfile 第 28-30 行,将
CMD ["node", "server.js"]改为:或更新构建流程,确保自定义服务器逻辑被编译进
server.js。🤖 Prompt for AI Agents