[BUG] issue view的命令实现里面使用了print_json而不是默认用markdown输出,--json下才应该是json输出才对 #1

Closed
opened 2026-06-06 02:21:38 +00:00 by ph · 2 comments
Owner

如题,我的test case是:

~/git/fj master* ❯ fj issue view --owner ph --repo gd --index 18 
```json
{
  "assets": [],
  "assignee": null,
  "assignees": null,
  "body": "1. 优化使用read工具替代 bash cat 工具。\n2. 系统提示词优化,添加提示词。\n3. 请求里面调优temperature\n",
  "closed_at": null,
  "comments": 0,
  "created_at": "2026-06-04T23:08:33+08:00",
  "due_date": null,
  "html_url": "http://git.apas.com/ph/gd/issues/18",
  "id": 23,
  "is_locked": false,
  "labels": [],
  "milestone": null,
  "number": 18,
  "original_author": "",
  "original_author_id": 0,
  "pin_order": 0,
  "pull_request": null,
  "ref": "",
  "repository": {
    "full_name": "ph/gd",
    "id": 5,
    "name": "gd",
    "owner": "ph"
  },
  "state": "open",
  "title": "[feature request] 提示词优化,请求优化",
  "updated_at": "2026-06-05T22:55:36+08:00",
  "url": "http://git.apas.com/api/v1/repos/ph/gd/issues/18",
  "user": {
    "active": true,
    "avatar_url": "http://git.apas.com/avatars/96ff73faf85fcadb4b3e7c1f4f597e4d",
    "created": "2026-05-08T19:51:11+08:00",
    "description": "",
    "email": "chenyi.ph@outlook.com",
    "followers_count": 0,
    "following_count": 0,
    "full_name": "",
    "html_url": "http://git.apas.com/ph",
    "id": 2,
    "is_admin": false,
    "language": "zh-CN",
    "last_login": "2026-06-02T21:26:32+08:00",
    "location": "",
    "login": "ph",
    "login_name": "",
    "prohibit_login": false,
    "pronouns": "",
    "restricted": false,
    "source_id": 0,
    "starred_repos_count": 0,
    "visibility": "public",
    "website": ""
  }
}
如题,我的test case是: ``` ~/git/fj master* ❯ fj issue view --owner ph --repo gd --index 18 ```json { "assets": [], "assignee": null, "assignees": null, "body": "1. 优化使用read工具替代 bash cat 工具。\n2. 系统提示词优化,添加提示词。\n3. 请求里面调优temperature\n", "closed_at": null, "comments": 0, "created_at": "2026-06-04T23:08:33+08:00", "due_date": null, "html_url": "http://git.apas.com/ph/gd/issues/18", "id": 23, "is_locked": false, "labels": [], "milestone": null, "number": 18, "original_author": "", "original_author_id": 0, "pin_order": 0, "pull_request": null, "ref": "", "repository": { "full_name": "ph/gd", "id": 5, "name": "gd", "owner": "ph" }, "state": "open", "title": "[feature request] 提示词优化,请求优化", "updated_at": "2026-06-05T22:55:36+08:00", "url": "http://git.apas.com/api/v1/repos/ph/gd/issues/18", "user": { "active": true, "avatar_url": "http://git.apas.com/avatars/96ff73faf85fcadb4b3e7c1f4f597e4d", "created": "2026-05-08T19:51:11+08:00", "description": "", "email": "chenyi.ph@outlook.com", "followers_count": 0, "following_count": 0, "full_name": "", "html_url": "http://git.apas.com/ph", "id": 2, "is_admin": false, "language": "zh-CN", "last_login": "2026-06-02T21:26:32+08:00", "location": "", "login": "ph", "login_name": "", "prohibit_login": false, "pronouns": "", "restricted": false, "source_id": 0, "starred_repos_count": 0, "visibility": "public", "website": "" } } ``` ```
Author
Owner

我的提议是,markdown情况下,优化渲染,渲染主要内容即可,比如说这个发起人是谁,谁说了什么之类的。
详细的内容就通过--json去输出最好。
当然这样的区分要落地到文档、help说明和skill文档里面去。

我的提议是,markdown情况下,优化渲染,渲染主要内容即可,比如说这个发起人是谁,谁说了什么之类的。 详细的内容就通过--json去输出最好。 当然这样的区分要落地到文档、help说明和skill文档里面去。
Author
Owner

除了这个命令之外,好像还有很多命令直接使用了output.print_json(),可能也是需要修复一下。

除了这个命令之外,好像还有很多命令直接使用了output.print_json(),可能也是需要修复一下。
ph closed this issue 2026-06-06 03:04:54 +00:00
Sign in to join this conversation.
No labels
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
ph/fj#1
No description provided.