From 174fdce7d8230a12f879874cf7121698d91e678c Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Wed, 21 May 2025 23:27:24 -0700 Subject: [PATCH] feat: Update feedback mechanism to use /bug command - Replaces the previous email-based feedback with a /bug command in the system prompt. --- .../core/__snapshots__/prompts.test.ts.snap | 28 +++++++++---------- packages/server/src/core/prompts.ts | 6 ++-- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/packages/server/src/core/__snapshots__/prompts.test.ts.snap b/packages/server/src/core/__snapshots__/prompts.test.ts.snap index 1deb809f..37093f13 100644 --- a/packages/server/src/core/__snapshots__/prompts.test.ts.snap +++ b/packages/server/src/core/__snapshots__/prompts.test.ts.snap @@ -67,8 +67,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # Outside of Sandbox @@ -219,8 +219,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # Outside of Sandbox @@ -366,8 +366,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # Sandbox @@ -513,8 +513,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # MacOS Seatbelt @@ -660,8 +660,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # Outside of Sandbox @@ -807,8 +807,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # Outside of Sandbox @@ -954,8 +954,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the 'save_memory' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to gemini-code-dev@google.com. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. # Outside of Sandbox diff --git a/packages/server/src/core/prompts.ts b/packages/server/src/core/prompts.ts index 94195255..a7381976 100644 --- a/packages/server/src/core/prompts.ts +++ b/packages/server/src/core/prompts.ts @@ -18,8 +18,6 @@ import process from 'node:process'; import { execSync } from 'node:child_process'; import { MemoryTool, GEMINI_CONFIG_DIR } from '../tools/memoryTool.js'; -const contactEmail = 'gemini-code-dev@google.com'; - export function getCoreSystemPrompt(userMemory?: string): string { // if GEMINI_SYSTEM_MD is set (and not 0|false), override system prompt from file // default path is .gemini/system.md but can be modified via custom path in GEMINI_SYSTEM_MD @@ -105,8 +103,8 @@ Rigorously adhere to existing project conventions when reading or modifying code - **Remembering Facts:** Use the '${MemoryTool.Name}' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information that belongs in project-specific \`GEMINI.md\` files. If unsure whether to save something, you can ask the user, "Should I remember that for you?" ## Interaction Details -- **Help Command:** The user can use '/help' to display help information. -- **Feedback:** Direct feedback to ${contactEmail}. +- **Help Command:** The user can use '/help' to display help information. +- **Feedback:** To report a bug or provide feedback, please use the /bug command. ${(function () { // Determine sandbox status based on environment variables