Dax Raad 8 months ago
parent
commit
299a74061a
2 changed files with 13 additions and 11 deletions
  1. 1 0
      packages/opencode/src/config/config.ts
  2. 12 11
      packages/opencode/src/session/index.ts

+ 1 - 0
packages/opencode/src/config/config.ts

@@ -57,6 +57,7 @@ export namespace Config {
         })
         .optional(),
       mcp: z.record(z.string(), Mcp).optional(),
+      models: z.record(z.string(), Provider.Model.array()).optional(),
     })
     .strict()
 

+ 12 - 11
packages/opencode/src/session/index.ts

@@ -239,17 +239,18 @@ export namespace Session {
           },
           {
             type: "text",
-            text: `Here is some useful information about the environment you are running in:
-<env>
-Working directory: ${app.path.cwd}
-Is directory a git repo: ${app.git ? "yes" : "no"}
-Platform: ${process.platform}
-Today's date: ${new Date().toISOString()}
-</env>
-<project>
-${app.git ? await ListTool.execute({ path: app.path.cwd }, { sessionID: input.sessionID }).then((x) => x.output) : ""}
-</project>
-            `,
+            text: [
+              `Here is some useful information about the environment you are running in:`,
+              `<env>`,
+              `Working directory: ${app.path.cwd}`,
+              `Is directory a git repo: ${app.git ? "yes" : "no"}`,
+              `Platform: ${process.platform}`,
+              `Today's date: ${new Date().toISOString()}`,
+              `</env>`,
+              `<project>`,
+              `${app.git ? await ListTool.execute({ path: app.path.cwd }, { sessionID: input.sessionID }).then((x) => x.output) : ""}`,
+              `</project>`,
+            ].join("\n"),
           },
         ],
         metadata: {