Feature Request: allow the host application to supply files and documents as session context

未关闭
#2,681 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
java

调研方向

Issue 中没有指出任何文件、测试或入口点。首先定位会话创建和后续轮次的 API,然后追踪资源将如何被摄取和报告。完成的标准是:附加的文本和二进制资源无需向仓库提交 commit 即可正常工作,并且不受支持、过大或无法访问的资源会产生可采取行动的结果。

由索引模型根据 Issue 内容生成。

描述

Problem

A session can be given a prompt and a repository. It cannot be given the surrounding material that motivated the work: a specification, a design document, a log file, a crash dump, a screenshot, or a prior conversation transcript. That material typically lives outside source control and should not be committed to the repository merely to make the agent aware of it.

Today the only reliable workaround is to paste the content into the prompt, which loses fidelity and structure for anything that is not plain text, or to commit the file to the repository, which pollutes history with transient artifacts.

What is missing

  • No API for attaching arbitrary files or binary content to a session as first-class resources.
  • No way to supply an external transcript or prior conversation as additional grounding.
  • No feedback about which supplied resources were actually read, skipped, or rejected.

Proposed behavior

  • Session creation and subsequent turns accept a list of context resources, each with content or a resolvable reference, a MIME type, and a display name.
  • Supplied resources are available to the agent for reading and are distinguishable from repository files.
  • The session reports, per resource, whether it was ingested successfully; failures state the reason, such as unsupported type, size limit, or missing permission.
  • Size and count limits are documented and enforced predictably.

Example scenario

A caller supplies a design document and two log files alongside a prompt asking the agent to determine whether the implementation matches the design and to explain a failure visible in the logs.

Acceptance criteria

  • Files and binary content can be attached to a session without committing them to the repository.
  • Attached resources are readable by the agent and reported in the session result.
  • Ingestion failures are explicit and actionable.

Related

  • #2349 — attachments silently ignored in one command path; this request covers the general capability.
主要语言
Java
星标
10.5k
派生
1.5k
平均合并
1 天 12 小时
30 天内合并 PR
133

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/copilot-sdk 的其他 Issue

查看 github/copilot-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。