瀏覽代碼

Merge branch 'master' into imprv/roo-code-like-replacing

Yuki Takei 11 月之前
父節點
當前提交
ca721f6d3f
共有 2 個文件被更改,包括 18 次插入6 次删除
  1. 15 3
      .roo/mcp.json
  2. 3 3
      apps/app/src/features/openai/server/routes/edit/index.ts

+ 15 - 3
.roo/mcp.json

@@ -2,8 +2,20 @@
   "mcpServers": {
     "fetch": {
       "command": "uvx",
-      "args": ["mcp-server-fetch"],
-      "alwaysAllow": ["fetch"]
+      "args": [
+        "mcp-server-fetch"
+      ],
+      "alwaysAllow": [
+        "fetch"
+      ]
+    },
+    "context7": {
+      "type": "streamable-http",
+      "url": "https://mcp.context7.com/mcp",
+      "alwaysAllow": [
+        "resolve-library-id",
+        "get-library-docs"
+      ]
     }
   }
-}
+}

+ 3 - 3
apps/app/src/features/openai/server/routes/edit/index.ts

@@ -110,13 +110,13 @@ function instruction(withMarkdown: boolean): string {
   Respond with a JSON object in the following format:
   {
     "contents": [
-      { "message": "Your brief message about the upcoming change or proposal.\n\n" },
+      { "message": "Your brief message about the upcoming changes or proposals.\n\n" },
       {
         "search": "exact existing content",
         "replace": "new content",
         "startLine": 42  // REQUIRED: line number (1-based) where search begins
       },
-      { "message": "Additional explanation if needed" },
+      { "message": "Additional explanation if needed." },
       {
         "search": "another exact content",
         "replace": "replacement content",
@@ -128,7 +128,7 @@ function instruction(withMarkdown: boolean): string {
   }
 
   The array should contain:
-  - [At the beginning of the list] A "message" object that has your brief message about the upcoming change or proposal. Be sure to add two consecutive line feeds ('\n\n') at the end.
+  - [At the beginning of the list] A "message" object that has your brief message about the upcoming change or proposal. Be sure that should be written in the present or future tense and add two consecutive line feeds ('\n\n') at the end.
   - Objects with a "message" key for explanatory text to the user if needed.
   - Edit objects with "search" (exact existing content), "replace" (new content), and "startLine" (1-based line number, REQUIRED) fields.
   - [At the end of the list] A "message" object that contains your friendly message explaining that the operation was completed and what changes were made.