[GH-ISSUE #12] 一次输出较长内容貌似会截断,并停止,这块有啥思路吗? #10

Closed
opened 2026-03-13 14:18:21 +03:00 by kerem · 13 comments
Owner

Originally created by @w2wybtvhwwweb on GitHub (Mar 7, 2026).
Original GitHub issue: https://github.com/7836246/cursor2api/issues/12

Originally created by @w2wybtvhwwweb on GitHub (Mar 7, 2026). Original GitHub issue: https://github.com/7836246/cursor2api/issues/12
kerem closed this issue 2026-03-13 14:18:27 +03:00
Author
Owner

@HiramYong commented on GitHub (Mar 8, 2026):

我也遇到啦

Image
<!-- gh-comment-id:4019587941 --> @HiramYong commented on GitHub (Mar 8, 2026): 我也遇到啦 <img width="615" height="419" alt="Image" src="https://github.com/user-attachments/assets/c2508d71-c363-4b57-b701-9ae64a203a4d" />
Author
Owner

@7836246 commented on GitHub (Mar 10, 2026):

更新再试试

<!-- gh-comment-id:4029206202 --> @7836246 commented on GitHub (Mar 10, 2026): 更新再试试
Author
Owner

@wtgadtdg commented on GitHub (Mar 10, 2026):

更新再试试

佬,效率有点高哦

<!-- gh-comment-id:4029355479 --> @wtgadtdg commented on GitHub (Mar 10, 2026): > 更新再试试 佬,效率有点高哦
Author
Owner

@Theo-jobs commented on GitHub (Mar 10, 2026):

还是会经常这样,已经更新过了

<!-- gh-comment-id:4029633467 --> @Theo-jobs commented on GitHub (Mar 10, 2026): 还是会经常这样,已经更新过了
Author
Owner

@7836246 commented on GitHub (Mar 10, 2026):

还是会经常这样,已经更新了

我在研究一下吧 截断这个我找找原因 有提示词吗

<!-- gh-comment-id:4029731788 --> @7836246 commented on GitHub (Mar 10, 2026): > 还是会经常这样,已经更新了 我在研究一下吧 截断这个我找找原因 有提示词吗
Author
Owner

@7836246 commented on GitHub (Mar 10, 2026):

初步得出结果是因为 提示词太多 导致超上下文 压缩了一下 试试

<!-- gh-comment-id:4029910060 --> @7836246 commented on GitHub (Mar 10, 2026): 初步得出结果是因为 提示词太多 导致超上下文 压缩了一下 试试
Author
Owner

@gclm commented on GitHub (Mar 10, 2026):

我测试发现不太行,代码是最新的版本:
cc 返回的信息

[Called Bash(command, description)]
[Called Bash(command, description)]

项目运行错误

Converter] 总消息数=397, 总字符=122482
[Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=397
[Handler] 重试响应 (215 chars): 现在明确了:配额数据来自各服务商的独立 API(不是 CLI-Proxy 的 `/usage`),通过 authFiles 获取凭证,再直接请求各服务商接口(Claude profile、Codex usage 等)。这和我之前的实现完全不同。

读一下 `parseClaudeUsagePayload` 和 `apiCallApi` 的实现确认调用方式:
[Called Bash(command...

然后就直接卡死不动了,我现在在开一个新窗口试试

<!-- gh-comment-id:4030031056 --> @gclm commented on GitHub (Mar 10, 2026): 我测试发现不太行,代码是最新的版本: cc 返回的信息 ``` [Called Bash(command, description)] [Called Bash(command, description)] ``` 项目运行错误 ``` Converter] 总消息数=397, 总字符=122482 [Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=397 [Handler] 重试响应 (215 chars): 现在明确了:配额数据来自各服务商的独立 API(不是 CLI-Proxy 的 `/usage`),通过 authFiles 获取凭证,再直接请求各服务商接口(Claude profile、Codex usage 等)。这和我之前的实现完全不同。 读一下 `parseClaudeUsagePayload` 和 `apiCallApi` 的实现确认调用方式: [Called Bash(command... ``` 然后就直接卡死不动了,我现在在开一个新窗口试试
Author
Owner

@gclm commented on GitHub (Mar 10, 2026):

这个压缩可能不太理想,去掉后发现好像正常了。
错误信息反馈

基于docs/整改问题.md 分析一下目前问题我们应该先做什么呢?

⏺ Read 3 files (ctrl+o to expand)

⏺ I apologize for the parameter error. Let me read the file correctly.

⏺ Read 2 files (ctrl+o to expand)

⏺ I see the issue - the Read tool requires file_path, not path. Let me fix that.

⏺ Read 1 file (ctrl+o to expand)

⏺ I notice there's a persistent issue with the Read tool parameters. The schema requires file_path but something is using path. Let me check the memory file
  first.It seems the structured JSON action format isn't correctly mapping file_path. This appears to be an environment issue where the action blocks aren't
  properly passing the parameter.

  Could you let me know what you'd like me to help with? I can see from the git status that there are modified files:
  - src/pages/Instance/Quota/index.tsx
  - src/stores/instancesStore.ts
  - src/pages/Welcome/index.tsx
  - docs/整改问题.md (untracked)

  What task would you like me to work on?

项目日志:

[Converter] 总消息数=11, 总字符=76832
[Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=11
[Handler] 原始响应 (208 chars, tools=true): I see the issue - the Read tool requires `file_path`, not `path`. Let me fix that.

```json action
{
  "tool": "Read",
  "parameters": {
    "file_path": "/Users/gclm/Codes/app/octopus/docs/整改问题.md"
 ...
[Handler] 收到请求: model=anthropic/claude-sonnet-4.6, messages=11, stream=true, tools=21
[Converter] 工具数量: 21, tool_choice: auto
[Converter] 🗜️ 上下文压缩: 137874 → 77198 chars (压缩 4 条, 保留最近 6 条原文)
[Converter]   cursor_msg[0] role=user chars=74861 (few-shot)
[Converter]   cursor_msg[1] role=assistant chars=176 (few-shot)
[Converter]   cursor_msg[2] role=user chars=223
[Converter]   cursor_msg[3] role=assistant chars=39
[Converter]   cursor_msg[4] role=user chars=167
[Converter]   cursor_msg[5] role=assistant chars=115
[Converter]   cursor_msg[6] role=user chars=167
[Converter]   cursor_msg[7] role=assistant chars=185
[Converter]   cursor_msg[8] role=user chars=317
[Converter]   cursor_msg[9] role=assistant chars=115
[Converter]   cursor_msg[10] role=user chars=317
[Converter]   cursor_msg[11] role=assistant chars=199
[Converter]   cursor_msg[12] role=user chars=317
[Converter] 总消息数=13, 总字符=77198
[Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=13
[Handler] 原始响应 (641 chars, tools=true): I notice there's a persistent issue with the Read tool parameters. The schema requires `file_path` but something is using `path`. Let me check the memory file first.It seems the structured JSON action...
[Handler] 收到请求: model=anthropic/claude-sonnet-4.6, messages=13, stream=true, tools=21
[Converter] 工具数量: 21, tool_choice: auto
[Converter] 🗜️ 上下文压缩: 139681 → 78855 chars (压缩 5 条, 保留最近 6 条原文)
[Converter]   cursor_msg[0] role=user chars=74861 (few-shot)
[Converter]   cursor_msg[1] role=assistant chars=176 (few-shot)
[Converter]   cursor_msg[2] role=user chars=223
[Converter]   cursor_msg[3] role=assistant chars=39
[Converter]   cursor_msg[4] role=user chars=167
[Converter]   cursor_msg[5] role=assistant chars=115
[Converter]   cursor_msg[6] role=user chars=167
[Converter]   cursor_msg[7] role=assistant chars=185
[Converter]   cursor_msg[8] role=user chars=167
[Converter]   cursor_msg[9] role=assistant chars=115
[Converter]   cursor_msg[10] role=user chars=317
[Converter]   cursor_msg[11] role=assistant chars=199
[Converter]   cursor_msg[12] role=user chars=317
[Converter]   cursor_msg[13] role=assistant chars=641
[Converter]   cursor_msg[14] role=user chars=1166
[Converter] 总消息数=15, 总字符=78855
[Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=15
[Handler] 原始响应 (15 chars, tools=true): 看看整改问题.md里有什么内容
<!-- gh-comment-id:4030116789 --> @gclm commented on GitHub (Mar 10, 2026): 这个压缩可能不太理想,去掉后发现好像正常了。 错误信息反馈 ``` 基于docs/整改问题.md 分析一下目前问题我们应该先做什么呢? ⏺ Read 3 files (ctrl+o to expand) ⏺ I apologize for the parameter error. Let me read the file correctly. ⏺ Read 2 files (ctrl+o to expand) ⏺ I see the issue - the Read tool requires file_path, not path. Let me fix that. ⏺ Read 1 file (ctrl+o to expand) ⏺ I notice there's a persistent issue with the Read tool parameters. The schema requires file_path but something is using path. Let me check the memory file first.It seems the structured JSON action format isn't correctly mapping file_path. This appears to be an environment issue where the action blocks aren't properly passing the parameter. Could you let me know what you'd like me to help with? I can see from the git status that there are modified files: - src/pages/Instance/Quota/index.tsx - src/stores/instancesStore.ts - src/pages/Welcome/index.tsx - docs/整改问题.md (untracked) What task would you like me to work on? ``` 项目日志: ``` [Converter] 总消息数=11, 总字符=76832 [Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=11 [Handler] 原始响应 (208 chars, tools=true): I see the issue - the Read tool requires `file_path`, not `path`. Let me fix that. ```json action { "tool": "Read", "parameters": { "file_path": "/Users/gclm/Codes/app/octopus/docs/整改问题.md" ... [Handler] 收到请求: model=anthropic/claude-sonnet-4.6, messages=11, stream=true, tools=21 [Converter] 工具数量: 21, tool_choice: auto [Converter] 🗜️ 上下文压缩: 137874 → 77198 chars (压缩 4 条, 保留最近 6 条原文) [Converter] cursor_msg[0] role=user chars=74861 (few-shot) [Converter] cursor_msg[1] role=assistant chars=176 (few-shot) [Converter] cursor_msg[2] role=user chars=223 [Converter] cursor_msg[3] role=assistant chars=39 [Converter] cursor_msg[4] role=user chars=167 [Converter] cursor_msg[5] role=assistant chars=115 [Converter] cursor_msg[6] role=user chars=167 [Converter] cursor_msg[7] role=assistant chars=185 [Converter] cursor_msg[8] role=user chars=317 [Converter] cursor_msg[9] role=assistant chars=115 [Converter] cursor_msg[10] role=user chars=317 [Converter] cursor_msg[11] role=assistant chars=199 [Converter] cursor_msg[12] role=user chars=317 [Converter] 总消息数=13, 总字符=77198 [Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=13 [Handler] 原始响应 (641 chars, tools=true): I notice there's a persistent issue with the Read tool parameters. The schema requires `file_path` but something is using `path`. Let me check the memory file first.It seems the structured JSON action... [Handler] 收到请求: model=anthropic/claude-sonnet-4.6, messages=13, stream=true, tools=21 [Converter] 工具数量: 21, tool_choice: auto [Converter] 🗜️ 上下文压缩: 139681 → 78855 chars (压缩 5 条, 保留最近 6 条原文) [Converter] cursor_msg[0] role=user chars=74861 (few-shot) [Converter] cursor_msg[1] role=assistant chars=176 (few-shot) [Converter] cursor_msg[2] role=user chars=223 [Converter] cursor_msg[3] role=assistant chars=39 [Converter] cursor_msg[4] role=user chars=167 [Converter] cursor_msg[5] role=assistant chars=115 [Converter] cursor_msg[6] role=user chars=167 [Converter] cursor_msg[7] role=assistant chars=185 [Converter] cursor_msg[8] role=user chars=167 [Converter] cursor_msg[9] role=assistant chars=115 [Converter] cursor_msg[10] role=user chars=317 [Converter] cursor_msg[11] role=assistant chars=199 [Converter] cursor_msg[12] role=user chars=317 [Converter] cursor_msg[13] role=assistant chars=641 [Converter] cursor_msg[14] role=user chars=1166 [Converter] 总消息数=15, 总字符=78855 [Cursor] 发送请求: model=anthropic/claude-sonnet-4.6, messages=15 [Handler] 原始响应 (15 chars, tools=true): 看看整改问题.md里有什么内容 ```
Author
Owner

@7836246 commented on GitHub (Mar 10, 2026):

好的 我在研究一下

<!-- gh-comment-id:4030186063 --> @7836246 commented on GitHub (Mar 10, 2026): 好的 我在研究一下
Author
Owner

@gclm commented on GitHub (Mar 10, 2026):

好的 我在研究一下

麻烦大佬了。

<!-- gh-comment-id:4030193117 --> @gclm commented on GitHub (Mar 10, 2026): > 好的 我在研究一下 麻烦大佬了。
Author
Owner

@Theo-jobs commented on GitHub (Mar 11, 2026):

压缩也有些问题,多的话会重复阅读,并且上下文长了经常[Called Bash(command, description)]
[Called Bash(command, description)]

<!-- gh-comment-id:4035736815 --> @Theo-jobs commented on GitHub (Mar 11, 2026): 压缩也有些问题,多的话会重复阅读,并且上下文长了经常[Called Bash(command, description)] [Called Bash(command, description)]
Author
Owner

@7836246 commented on GitHub (Mar 11, 2026):

Image 完美解决了
<!-- gh-comment-id:4035737841 --> @7836246 commented on GitHub (Mar 11, 2026): <img width="888" height="797" alt="Image" src="https://github.com/user-attachments/assets/9cf7b440-324a-42f5-a431-80c76af28d8b" /> 完美解决了
Author
Owner

@7836246 commented on GitHub (Mar 11, 2026):

压缩也有些问题,多的话会重复阅读,并且上下文长了经常[Called Bash(command, description)] [Called Bash(command, description)]

我在推送 你刷新 更新新的试试

<!-- gh-comment-id:4035738900 --> @7836246 commented on GitHub (Mar 11, 2026): > 压缩也有些问题,多的话会重复阅读,并且上下文长了经常[Called Bash(command, description)] [Called Bash(command, description)] 我在推送 你刷新 更新新的试试
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cursor2api#10
No description provided.