> ## Documentation Index
> Fetch the complete documentation index at: https://agent.minimaxi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 工作区与项目上下文

> 为任务选择本地项目目录，让 Agent 理解文件结构、代码约定和运行环境。

<div className="code-docs">
  工作区是 MiniMax Code 理解本地项目的入口。选择项目目录后，Agent 可以在该目录内读取文件、执行命令、生成产物并汇报变更。

  <img src="https://mintcdn.com/agent-cn/BK6oKQ5dsiqXZ-jT/images/code/workspace-picker.png?fit=max&auto=format&n=BK6oKQ5dsiqXZ-jT&q=85&s=e309428d035e4a67db6c0daa9bb1889b" alt="工作区选择器" className="code-screenshot" width="2798" height="1704" data-path="images/code/workspace-picker.png" />

  ## 什么时候需要工作区

  * 让 Agent 修改已有代码项目
  * 让 Agent 阅读仓库结构并解释实现
  * 运行项目测试、构建或脚本
  * 根据项目文件生成文档、报告或页面

  ## 使用方式

  <Steps>
    <Step title="选择项目目录">
      在新建任务或输入框下方选择工作区。
    </Step>

    <Step title="引用文件">
      在输入框中使用 @ 引用具体文件，帮助 Agent 聚焦相关上下文。
    </Step>

    <Step title="审查结果">
      任务执行后，通过 Files、Changes 或 Terminal 面板查看产物和命令结果。
    </Step>
  </Steps>

  <Warning>
    只选择与任务相关的项目目录。工作区越准确，Agent 越容易定位代码和执行正确命令。
  </Warning>
</div>
