bigbigeggs
3.43D
V2EX  ›  问与答

大家使用 opencode 的时候,多个项目、跨项目大家是怎么使用的

  •  
  •   bigbigeggs · May 12 · 1853 views
    This topic created in 181 days ago, the information mentioned may be changed or developed.

    比如我现在有多个项目,让 opencode 怎么识别,有没有像 vscode 的 workspace 那种方式?

    我现在是在多个项目的父目录打开 opencode ,但实际上他会把父目录当成一个普通的目录文件,而不是 git 仓库 我 @文件的时候是不行的,包括项目的一些索引,他都不会生成

    想请加下站内的大佬,用 opencode 怎么解决多个项目的问题的

    4 replies  •  2026-05-12 13:42:49 +08:00
    teaguexiao
    1
    多项目我一般是每个项目单独开一个终端跑 opencode ,不在父目录启动。各项目独立上下文,也不会互相污染。
    cxh116
    cxh116
    May 12
    2
    在单一项目启动 opencode ,再在需求里 @ 绝对目录的其它项目,要求 AI 引入其它项目上下文。
    a33291
    a33291
    May 12
    3
    改造成 monorepo?
    bigbigeggs
    bigbigeggs
    OP
    May 12
    4
    @cxh116 差不多,我现在是在父目录,@每个项目的绝对路径,AI 也可以读取到,但还是感觉没有 vscode workspace 好用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4519 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 03:40 · PVG 11:40 · LAX 19:40 · JFK 22:40
    ♥ Do have faith in what you're doing.