Skip to content

feat(feedback): support attaching logs and codebase - #1120

Merged
7Sageer merged 7 commits into
mainfrom
feat/feedback-codebase-upload
Jun 26, 2026
Merged

feat(feedback): support attaching logs and codebase#1120
7Sageer merged 7 commits into
mainfrom
feat/feedback-codebase-upload

Conversation

@7Sageer

@7Sageer 7Sageer commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No related issue. This PR adds optional diagnostic attachments to the /feedback command.

Problem

When users report feedback via /feedback, the CLI only submits the free-text content. Diagnosing reported issues often requires the session logs and codebase context, but there was no way to attach them, so maintainers have to ask for them manually.

What changed

  • Add an attachment step to /feedback that lets users opt into uploading session logs and a codebase archive alongside their feedback.
  • Export session logs through the harness session export and package the codebase into a zip, then upload both through the managed feedback upload API using multipart uploads.
  • Fall back to logs only when the codebase scan or packaging fails, and keep uploads partial-safe so a failed attachment does not block the feedback submission.
  • Add the feedback upload URL and completion methods on the SDK auth facade, normalizing the upload URL response to camelCase for SDK callers.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

7Sageer added 6 commits June 26, 2026 14:57
Add an attachment picker to /feedback (none / logs / logs + codebase).
Codebase uploads scan the working directory with sensitive files excluded
and are sent through a new multipart upload API on the oauth/node-sdk layers.
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9c632c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/kimi-code Minor
@moonshot-ai/kimi-code-sdk Minor
@moonshot-ai/acp-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 26, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@9c632c9
npx https://pkg.pr.new/@moonshot-ai/kimi-code@9c632c9

commit: 9c632c9

Move the attachment orchestration out of tui/commands/info.ts into a
dedicated feedback/feedback-attachments.ts, and split the former
codebase-upload/attach.ts into a generic multipart uploader
(feedback/upload.ts) and an archive lifecycle module
(feedback/archive.ts). Both session and codebase archives now flow
through a single upload lifecycle, which also removes the temp-dir
leak that occurred when codebase packaging failed.

Rename FeedbackCodebaseArchive to FeedbackArchive and the
codebase-upload/ directory to codebase/ so module boundaries match
their actual responsibilities (scan + package only).
@7Sageer
7Sageer merged commit e736349 into main Jun 26, 2026
9 checks passed
@7Sageer
7Sageer deleted the feat/feedback-codebase-upload branch June 26, 2026 08:15
@github-actions github-actions Bot mentioned this pull request Jun 26, 2026
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Jul 11, 2026
* feat(feedback): support attaching logs and codebase

Add an attachment picker to /feedback (none / logs / logs + codebase).
Codebase uploads scan the working directory with sensitive files excluded
and are sent through a new multipart upload API on the oauth/node-sdk layers.

* fix(feedback): fall back to logs when codebase scan fails

* tiny fix

* fix(feedback): make diagnostic uploads partial-safe

* refactor(feedback): reuse harness session export and normalize upload url types

* docs(slash-commands): note optional feedback attachments

* refactor(feedback): reorganize feedback upload modules

Move the attachment orchestration out of tui/commands/info.ts into a
dedicated feedback/feedback-attachments.ts, and split the former
codebase-upload/attach.ts into a generic multipart uploader
(feedback/upload.ts) and an archive lifecycle module
(feedback/archive.ts). Both session and codebase archives now flow
through a single upload lifecycle, which also removes the temp-dir
leak that occurred when codebase packaging failed.

Rename FeedbackCodebaseArchive to FeedbackArchive and the
codebase-upload/ directory to codebase/ so module boundaries match
their actual responsibilities (scan + package only).

(cherry picked from commit e736349)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant