Repository navigation
Conversation
🦋 Changeset detectedLatest commit: fac67ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31983281e4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const lines = [ | ||
| 'The following data will be submitted for troubleshooting:', | ||
| '- Feedback note and metadata (`session_id`, `request_id`, active model, CLI version, OS, shell)', | ||
| '- `session.zip`: conversation history (`wire.jsonl`), tool calls/results, session attachments, `logs/kimi-code.log`, and `logs/global/kimi-code.log`', |
There was a problem hiding this comment.
Disclose every file bundled in session.zip
For every user choosing Logs only or Logs + codebase, this notice understates what is uploaded: exportSessionDirectory recursively includes every file under the session directory except file-history blobs, including files such as state.json, plan files, background-task output, and the generated manifest.json. Because the new prompt presents this as the data that will be submitted, users can consent without being told about files actually present in session.zip; either disclose the complete recursive session-directory export or constrain the archive to the listed entries.
Useful? React with 👍 / 👎.
| label: 'Logs + codebase', | ||
| description: | ||
| 'Include your codebase for deeper diagnosis. Sensitive files are automatically excluded — e.g. .env, config files, secret keys. We use attachments only for diagnosis and never share them.', | ||
| 'Also upload repo.zip from this workspace (excludes .git, node_modules, build outputs, .env*, private keys, and credential dirs). Attachments are used only for diagnosis and never shared.', |
There was a problem hiding this comment.
Do not promise that every .env file is excluded
When a workspace contains .env.example, .env.sample, or .env.template, selecting Logs + codebase uploads those files even though this text promises that .env* is excluded: isSensitivePath explicitly allows those three suffixes. Users may rely on this disclosure when deciding whether to upload a repository, so the copy must describe the exceptions accurately or the scanner must exclude all .env* files as promised.
Useful? React with 👍 / 👎.
| const wireText = await readFile(join(sessionDir, 'agents', 'main', 'wire.jsonl'), 'utf8'); | ||
| for (const line of wireText.split('\n')) { |
There was a problem hiding this comment.
Avoid loading the entire wire journal for feedback
For long-running sessions with a large wire.jsonl, opening /feedback now reads the complete journal into one UTF-8 string and then duplicates it into an array with split, even though only the latest 50 IDs are retained. This can add a long pause or substantial memory pressure before feedback is submitted; scan the file incrementally or read a bounded tail instead.
Useful? React with 👍 / 👎.
| handleTurnEnded(event: TurnEndedEvent): void { | ||
| if (event.requestId !== undefined && event.requestId.length > 0) { |
There was a problem hiding this comment.
Include the in-flight request ID in feedback
When /feedback is invoked while a model request is still streaming or hung, the command executes immediately because it is registered as availability: 'always', but this list is populated only after turn.ended. The current request has neither a persisted usage.record nor a turn.ended entry yet, so the feedback submitted for that active failure omits the most relevant request_id; expose and collect the active request trace as well as completed-turn IDs.
Useful? React with 👍 / 👎.
| ): void { | ||
| const modelAlias = observation.context?.modelAlias ?? observation.config.resolved.modelAlias; | ||
| this.log.warn('llm request failed', { | ||
| const requestId = apiRequestId(error) ?? previousRequestId; |
There was a problem hiding this comment.
Read request IDs directly from APIStatusError
For ordinary non-2xx OpenAI or Anthropic responses, the SDK error decoder places the response ID in APIStatusError.requestId/details.requestId, while no llm.streaming.headers event is emitted, so previousRequestId is undefined. apiRequestId only inspects diagnostics and therefore this newly added requestId log field—and the corresponding api_error.request_id fallback—remains empty despite the error carrying the ID; include the direct status-error request ID before falling back to the trace.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c10cb2e530
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| label: 'Logs + codebase', | ||
| description: | ||
| 'Include your codebase for deeper diagnosis. Sensitive files are automatically excluded — e.g. .env, config files, secret keys. We use attachments only for diagnosis and never share them.', | ||
| 'Also upload repo.zip from this workspace (excludes .git, node_modules, build outputs, .env files except .example/.sample/.template, private keys, and credential files/dirs). Attachments are used only for diagnosis and never shared.', |
There was a problem hiding this comment.
Stop promising tracked build outputs are excluded
For Git worktrees containing tracked files under dist, build, out, or even node_modules, this disclosure is inaccurate: scanWithGit uses git ls-files -co --exclude-standard, which includes tracked files, and its loop applies only isSensitivePath rather than the ignored-directory list. Users may therefore approve Logs + codebase believing these artifacts are absent when they are included in repo.zip; either filter ignored directory segments on the Git scan path or narrow the disclosure.
Useful? React with 👍 / 👎.
| function buildFeedbackDisclosureMarkdown(sessionDir?: string): string { | ||
| const lines = [ | ||
| 'The following data will be submitted for troubleshooting:', | ||
| '- Feedback note and metadata (`session_id`, `request_id`, active model, CLI version, OS, shell)', |
There was a problem hiding this comment.
Disclose that up to 50 request IDs are submitted
For sessions with more than one recorded model request, this notice says only request_id is submitted, but collectFeedbackRequestInfo also sends a request_ids array containing up to 50 historical IDs. Users can therefore consent believing only the latest request identifier is included when identifiers from many earlier turns are sent; disclose the full list or submit only the singular field described here.
Useful? React with 👍 / 👎.
| ? undefined | ||
| : result.type === 'completed' | ||
| ? this.lastRequestId | ||
| : (errorRequestId ?? this.activeRequestTrace?.requestId); |
There was a problem hiding this comment.
Preserve header request IDs when streamed requests fail
When a streaming response emits a request-ID header and then ends with a non-status failure whose serialized error lacks details.requestId, such as a connection or empty-response error, AgentLoopRequestObserver.failRequest uses the header ID only for logging and then clears the mutable request trace. Both fallbacks here are consequently undefined, so turn.ended and the wire journal omit the failed request ID and later /feedback submissions cannot attach it; preserve the final LlmOutcome.requestId or snapshot the trace before clearing it.
Useful? React with 👍 / 👎.
| ? undefined | ||
| : result.type === 'completed' | ||
| ? this.lastRequestId | ||
| : (errorRequestId ?? this.activeRequestTrace?.requestId); |
There was a problem hiding this comment.
Preserve header request IDs when streamed requests fail
When a streaming response emits a request-ID header and then ends with a non-status failure whose serialized error lacks details.requestId, such as a connection or empty response, failRequest captures the header only for logging and then clears the mutable trace. This fallback is therefore undefined, so the resulting turn.ended record omits the request ID and /feedback cannot collect it; carry the failed outcome/header ID into the turn result before clearing the trace.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f983117bd4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const FEEDBACK_ATTACHMENT_OPTIONS: readonly ChoiceOption[] = [ | ||
| { value: 'none', label: 'No attachment', description: 'Text feedback only' }, | ||
| { | ||
| value: 'logs', | ||
| label: 'Logs only', | ||
| description: 'Upload wire events and diagnostic logs from this session', | ||
| label: 'Current session logs', | ||
| description: 'Upload the files listed below with your feedback', |
There was a problem hiding this comment.
Keep feedback usable before the first session exists
On a normal v2 startup, the TUI deliberately remains session-less until the first message (kimi-tui.ts:1297-1308), while /feedback remains always available (registry.ts:368-372). In that state the session ID is empty and no session directory can be resolved, but this picker now offers only attachment-bearing choices; after selection the fallback export uses id: '', so feedback submitted before the first prompt inevitably reports an attachment failure. Preserve a text-only choice for this state or create/require a session before showing these options.
AGENTS.md reference: AGENTS.md:L110-L112
Useful? React with 👍 / 👎.
| if (matchesKey(data, Key.pageUp) || matchesKey(data, Key.pageDown)) { | ||
| this.opts.onPreviewScroll?.(matchesKey(data, Key.pageUp) ? -1 : 1, true); | ||
| return; |
There was a problem hiding this comment.
Forward PageUp and PageDown without a preview scroller
PreviewChoicePickerComponent is also the base for the Tool Call Density and Thinking Display settings selectors, which do not provide onPreviewScroll. This new branch nevertheless returns unconditionally, so PageUp/PageDown no longer reach the underlying ChoicePickerComponent/SearchableList; for example, PageDown previously moved the Tool Call Density selection from Compact to Detailed but now does nothing. Consume these keys only when a preview-scrolling callback is present or handles them, and otherwise delegate to the picker.
AGENTS.md reference: AGENTS.md:L110-L112
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69769d589b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let preparedSession: PreparedFeedbackSessionArchive | undefined; | ||
| if (sessionDir !== undefined) { | ||
| try { | ||
| preparedSession = await prepareFeedbackSessionArchive(host); |
There was a problem hiding this comment.
Show progress before preparing large session archives
For sessions containing large attachments or task outputs, this await completes the full export and archiveFromExportedSession reads the entire resulting zip into memory before either the attachment picker or submission spinner appears. /feedback can therefore look frozen and consume archive-sized RAM even when the user ultimately cancels; previously the picker appeared before archive creation. Prepare it behind visible progress and hash the file as a stream rather than materializing the whole zip.
Useful? React with 👍 / 👎.
| attachmentFailed = await submitFeedbackWithAttachments( | ||
| host, | ||
| res.feedbackId, | ||
| level, | ||
| preparedSession, |
There was a problem hiding this comment.
Refresh the archive after an active turn settles
When /feedback is opened while a request is streaming or hung—the command is registered as always available—the session archive is snapshotted before the picker opens and this same snapshot is uploaded after an arbitrary delay. Any wire events or logs written while the dialog is open, including the failure the user is reporting, are omitted from session.zip even though request IDs are collected later; re-export after confirmation or prevent this flow while a turn is active.
Useful? React with 👍 / 👎.
| if (record.type === 'usage.record' || record.type === 'turn.ended') { | ||
| push(record.requestId ?? record.error?.details?.requestId); |
There was a problem hiding this comment.
Exclude prompt-prediction IDs from feedback metadata
When the prompt_prediction experimental feature is enabled, every completed turn can be followed by a side-channel model request whose usage.record has usageScope: 'prediction'. This condition accepts that record like an ordinary turn request, so after prediction finishes info.request_id points to the prediction rather than the main request the user is reporting; filter prediction-scoped usage records while retaining turn-scoped request IDs.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26ab1e1275
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const sessionDir = await resolveCurrentSessionDir(host); | ||
| let sessionFiles: readonly string[] | undefined; | ||
| if (sessionDir !== undefined) { | ||
| try { | ||
| sessionFiles = await listFeedbackSessionFiles(sessionDir); |
There was a problem hiding this comment.
Upload only the session files shown for consent
When an active turn or background task creates a session file while the attachment picker is open, this snapshot is all the user sees, but prepareAndUploadSessionArchive later calls exportSession, which recursively packages the then-current directory. Because the final code now intentionally exports after confirmation, a newly created plan, task output, or wire file can therefore be uploaded even though it was absent from the disclosure; bind the export to the displayed file set or re-list and reconfirm when it changes.
Useful? React with 👍 / 👎.
| export async function listFeedbackSessionFiles(sessionDir: string): Promise<readonly string[]> { | ||
| let entries; | ||
| try { | ||
| entries = await readdir(sessionDir, { recursive: true, withFileTypes: true }); |
There was a problem hiding this comment.
Prune file-history before recursive enumeration
For a long editing session with many file-history blobs, recursive readdir traverses and materializes every blob entry before the later filter removes them; file history stores a blob per recorded file version and has no per-session entry cap. Since handleFeedbackCommand awaits this before mounting the picker, merely opening /feedback can pause or consume substantial memory even if the user cancels, and a submitted report repeats the same traversal during export. Walk the tree while skipping file-history directories rather than filtering after recursive enumeration.
Useful? React with 👍 / 👎.
8904523 to
f8e1ceb
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8e1cebe00
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (sessionId === undefined) return true; | ||
| if (this.sessionIndex !== undefined && (await this.sessionIndex.get(sessionId)) === undefined) { | ||
| return true; |
There was a problem hiding this comment.
Report when no session archive is uploaded
When /feedback is invoked before the first session is created, or while its ID is not yet in the session index, these branches return true, which is interpreted as a successful session archive upload. The picker simultaneously says that session.zip will still be uploaded, so the command reports success even though the backend receives no diagnostics. Unlike the earlier attachment-failure path, the fresh implementation now silently treats the skipped upload as successful; either present this as a text-only submission or return an upload failure/skip status that the TUI can disclose.
AGENTS.md reference: AGENTS.md:L131-L133
Useful? React with 👍 / 👎.
| const level = input.attachmentLevel; | ||
| if (level === undefined || level === 'none') { | ||
| if (level === undefined) { | ||
| return { kind: 'ok', feedbackId: result.feedbackId }; |
There was a problem hiding this comment.
Preserve
none for existing feedback clients
A JavaScript caller or a client built against the previous exported FeedbackSubmitInput contract can still send attachmentLevel: 'none'; because this branch now exits only for undefined, that value reaches uploadAttachments, where every value other than 'logs' is handled as 'logs+codebase'. For an existing session or supplied workDir, upgrading therefore changes an explicit no-attachment submission into a silent upload of both session diagnostics and project files. Keep the runtime 'none' behavior, or reject it before any upload, even if the TUI no longer offers that option.
AGENTS.md reference: AGENTS.md:L123-L125
Useful? React with 👍 / 👎.
160b311 to
d620e0c
Compare
|
@codex review |
d620e0c to
3d7342e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d7342eaf7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| const summary = await this.index.get(input.sessionId); | ||
| if (summary === undefined) { | ||
| if (summary === undefined && input.includeGlobalLog !== true) { |
There was a problem hiding this comment.
Preserve missing-session errors for ordinary exports
When a user runs kimi export <missing-or-typoed-id> without --no-include-global-log, this condition now bypasses SESSION_NOT_FOUND because the CLI enables global-log inclusion by default (apps/kimi-code/src/cli/sub/export.ts:125-128). The command consequently prints a successful ZIP path even though the archive contains only the manifest/global log rather than the requested session. Keep the missing-session error for the public export path and use a feedback-specific global-log export for the pre-session case.
AGENTS.md reference: AGENTS.md:L131-L133
Useful? React with 👍 / 👎.
| const lastRequestId = | ||
| event.requestId ?? | ||
| (event.error?.details?.['requestId'] as string | undefined) ?? | ||
| state.lastRequestId; |
There was a problem hiding this comment.
Validate fallback request IDs before attribution
When a failed turn has a non-string error.details.requestId, which is permitted because error details are Record<string, unknown>, this assertion stores that value as lastRequestId; the subsequent commit passes it to noteActiveRequest, which calls .trim() and throws. A non-LLM Error2 or restored event using the same detail key can therefore break TurnEnded dispatch or disable attribution replay; accept the fallback only when it is a non-empty string.
Useful? React with 👍 / 👎.
commit: |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa946090c7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| session === undefined | ||
| ? undefined | ||
| : (direction) => { | ||
| scroll = Math.max(0, Math.min(maxScroll, scroll + direction * 5)); |
There was a problem hiding this comment.
Keep preview paging on five-file boundaries
When the session file count is not divisible by five, clamping to files.length - 5 creates overlapping, asymmetric pages: with 12 files, moving forward from offset 5 lands at 7 (showing items 8–12), and moving back then lands at 2 rather than returning to offset 5. This makes the advertised next/previous-page controls inconsistent; clamp to page-aligned offsets or track a page index instead.
Useful? React with 👍 / 👎.
… text-only option
…sion ids The global-log-only fallback exists for feedback submissions without an active session (empty id). Scoping it to empty ids restores the 40401 envelope that kap-server's export route promises for unknown sessions.
fa94609 to
fac67ef
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fac67efc88
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export type { | ||
| FeedbackAttachmentLevel, | ||
| FeedbackAvailability, | ||
| FeedbackSessionPreview, | ||
| FeedbackSubmitInput, |
There was a problem hiding this comment.
Preserve the existing feedback SDK exports
For existing SDK consumers, this replacement removes the exported KimiAuth*Feedback* types while the same commit also deletes KimiAuthFacade.submitFeedback, createFeedbackUploadUrl, and completeFeedbackUpload; integrations using harness.auth therefore stop compiling or fail at runtime after what is released only as a CLI patch. Preserve compatibility shims or declare and version this as a breaking API change instead of replacing the public contract.
AGENTS.md reference: AGENTS.md:L122-L124
Useful? React with 👍 / 👎.
Requirement or Bug
用户在 TUI 执行
/feedback提交问题时,过去默认首选项是No attachment(仅发一句话文本,缺少排查所需的会话日志和模型调用request_id),且附件选择界面未说明具体会上传哪些文件;同时引擎在 HTTP 请求失败结束回合时会丢失当跳requestId。本 PR 移除 TUI 纯文本无附件选项,确认前列出当前 session 目录里的文件,同时在引擎层与SessionExportService中补齐主会话最近一次request_id采集。Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
基于 #4875 的
IFeedbackService,将会话文件列表预览和主会话最近一次request_id采集收敛在SessionExportService与FeedbackService内部完成,TUI 只负责展示availability.session并支持翻页。requestId:AgentLoopRequestObserver.failRequest先取outcomeRequestId ?? apiRequestId(error) ?? observation.currentRequestId,写回请求 trace 并清理活跃显示 ID;turn.ended和api_error均读取该 trace。SessionRequestAttributionService.noteActiveRequest与RequestMetadataTracker记录最近一次轮次请求的lastRequestId(天然排除source.type !== 'turn'的prediction请求,并在恢复历史会话时重放TurnEnded的requestId)。FeedbackService仅通过ISessionExportService获取会话预览与request_id:IFeedbackService.availability(modelAlias, sessionId)调用SessionExportService.preview(sessionId)(先执行flushLiveSession再枚举文件、跳过file-history)返回{ sessionId, sessionDir, files }。FeedbackService.submit从SessionExportService.preview读取最近一次requestId填入info: { request_id }。SessionExportService.export在includeGlobalLog: true时仍打包manifest.json与全局日志生成session.zip。flowchart LR Headers["响应头 / 错误上的 requestId"] --> Attribution["SessionRequestAttributionService.lastRequestId"] Restore["RequestMetadataTracker<br/>(TurnEnded 恢复重放)"] --> Attribution Attribution --> Preview["SessionExportService.preview<br/>(flush + 跳过 file-history)"] Preview --> Availability["IFeedbackService.availability"] Availability --> Picker["TUI 附件确认弹窗"] Picker --> Submit["IFeedbackService.submit"] Preview -->|requestId| Submit Submit --> Export["SessionExportService.export"]阅读指南:
packages/agent-core-v2/src/app/auth/feedbackService.ts:看availability返回会话文件预览、submit填入{ request_id }。packages/agent-core-v2/src/app/sessionExport/{sessionExportService.ts,zip.ts}:看preview、目录遍历跳过file-history以及未落盘会话导出。packages/agent-core-v2/src/agent/loop/{requestObservation.ts,turnProjection.ts,requestMetadata.ts}与requestAttributionService.ts:看失败请求 ID 与最近一次轮次lastRequestId的记录。apps/kimi-code/src/tui/commands/prompts.ts与choice-picker.ts:看弹窗文件列表渲染与翻页。Screenshots / Recordings
附件选择弹窗改动前后对比:
Behavior Changes and Affected Users
/feedback(及别名/bug)附件选项No attachment、Logs only、Logs + codebase三项,可仅提交纯文本而不上传会话日志No attachment,必选当前会话日志(默认选中)或再加项目代码(远端会话只有当前会话日志);FeedbackService仍兼容编程调用传入attachmentLevel: 'none'session.zip但此前用/feedback提交纯文本的 TUI 用户Esc取消后改用 GitHub Issues。changeset 已声明移除 TUI 纯文本选项/feedback确认前的文件披露与session.zip导出SessionExportService.preview列出 flush 后的会话文件(排除file-history);未创建会话时仍打包manifest.json与全局日志Esc仍可取消/feedback选择Session logs + project code时的 Git 仓库扫描git ls-files路径仅过滤敏感文件,已跟踪的dist/build/node_modules文件仍会进repo.zipscanWithGit同步过滤isIgnoredDirName目录段,与弹窗披露文案一致/feedback提交体inforequest_idFeedbackService.submit中自动从主 agent 最近一次非prediction轮次请求提取requestId,填入info: { request_id }/feedback接收端与所有客户端info时以传入值为准;无 ID 时不传turn.ended.requestId和api_error.request_idrequestIdoutcome.requestId ?? apiRequestId(error) ?? trace.requestId写回 trace,回合结束读 traceturn.ended的 SDK/客户端及遥测受影响模块与测试覆盖:
@moonshot-ai/agent-core-v2:feedback.test.ts覆盖availability会话预览、request_id注入及attachmentLevel: 'none'兼容;sessionExport.test.ts覆盖preview(排除file-history、提取最近一次requestId)及无会话时的全局日志导出;loop.test.ts覆盖失败回合turn.ended.requestId。@moonshot-ai/kimi-code:feedback-input-dialog.test.ts、choice-picker.test.ts、kimi-tui-message-flow.test.ts覆盖弹窗文件列表披露、翻页及availability.session透传。验证详情
packages/oauth、packages/node-sdk、packages/agent-core-v2、apps/kimi-code相关 14 个测试文件共 1024 项测试全部通过。typecheck、lint:imports、gen:wire-manifest、oxlint --type-aware零差异/零错误。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.