From c9f0dd328b8333e73dbd472f89df033806e29f9f Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Mon, 7 Apr 2025 15:15:00 -0700 Subject: [PATCH 1/9] feat: Add Q&A entries for Cody troubleshooting and status This commit introduces new question and answer entries to `answers.json` to address common Cody issues and provide information on its status. The changes include: - Added a Q&A entry for resolving the "Starting Cody..." hang in PhpStorm on Ubuntu 24.04, including troubleshooting steps related to JCEF, system packages, and IDE logs. - Added a Q&A entry providing a link to the Sourcegraph status page for monitoring Cody and other services, as well as information on maintenance announcements. --- answers.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/answers.json b/answers.json index 9421c06..0c10b43 100644 --- a/answers.json +++ b/answers.json @@ -77,4 +77,14 @@ "url": "https://github.com/sourcegraph/jetbrains/issues/3225", "title": "GoLand on macOS repeatedly prompts for Cody login despite successful authentication.", "answer": "To resolve this, please ensure that GoLand is configured to use the native macOS Keychain for storing passwords. This allows the application to securely remember your login credentials. To check this setting, navigate to **Settings** (or **Preferences** on macOS) > **Appearance & Behavior** > **System Settings** > **Passwords** and verify that the option **'In native Keychain'** is selected. If it's not, select it and restart GoLand." +}, +{ + "url": "https://www.reddit.com/r/sourcegraph/comments/1jr9tzh/stuck_at_starting_cody_in_phpstorm/", + "title": "As the Title says I'm stuck at \"Starting Cody...\" in PhpStorm.", + "answer": "To resolve the \"Starting Cody...\" hang in PhpStorm on Ubuntu 24.04, try these additional troubleshooting steps: Verify JCEF (Java Chromium Embedded Framework) is properly enabled with correct VM options, ensure all required system packages are installed (libnss3, libatk-bridge2.0-0t64, libxss1, libgbm1, libasound2t64), and check your IDE logs for specific errors. If problems persist, try resetting the IDE cache or reinstalling the Cody plugin." +}, +{ + "url": "https://community.sourcegraph.com/t/is-there-a-status-board-for-cody/2537", + "title": "Is there a status board for Cody?", + "answer": "Yes, Sourcegraph maintains a status page for monitoring Cody and other services. You can check the status page at 'Sourcegraph Status' which shows maintenance events and service availability. During outages, Sourcegraph also posts announcements about scheduled maintenance that may affect service here: https://sourcegraphstatus.com/" }] \ No newline at end of file From 797b60e2c5cc58f5b1d338cc9c361acf6a8beadb Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Mon, 7 Apr 2025 15:18:06 -0700 Subject: [PATCH 2/9] fix: Update Q&A entry for rate limit issues and 403 error This commit updates the answer for rate limit issues caused by model switching and reorders the Q&A entries to maintain logical grouping. The changes include: - Updated the answer for rate limit issues to provide more context and a clearer solution, including information about 'problematic code' and incorrect flagging/banning of users. - Swapped the order of the rate limit and 403 error Q&A entries to group related issues together. --- answers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/answers.json b/answers.json index 0c10b43..fb54d6a 100644 --- a/answers.json +++ b/answers.json @@ -26,10 +26,10 @@ { "url": "https://community.sourcegraph.com/t/hitting-limits-due-to-model-switching/2200", "title": "Resolving rate limit issues caused by model switching", - "answer": "If you've encountered rate limit issues due to frequent model switching, and have been informed it's related to 'problematic code', we recommend the following steps: First, ensure your Cody plugin or extension is updated to the latest stable version. Then, try logging out and back into your Sourcegraph account. This should resolve the issue and prevent future occurrences." + "url": "https://community.sourcegraph.com/t/error-403-workspaces-forbidden-user-is-banned/2438", + "answer": "If you encounter rate limit issues due to frequent model switching, update your Cody plugin/extension to the latest stable version. Then, log out and log back into your Sourcegraph account to resolve the issue. This solution addresses problems related to what Sourcegraph identified as 'problematic code' that caused some users to be incorrectly flagged or banned." }, { - "url": "https://community.sourcegraph.com/t/error-403-workspaces-forbidden-user-is-banned/2438", "title": "Error: 403 workspaces forbidden user is banned", "answer": "Please contact support@sourcegraph.com via e-mail for further clarification." }, From eaffbc78f3febee4b40f908a76e4211a906304f2 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 29 Apr 2025 11:02:49 -0700 Subject: [PATCH 3/9] feat: Add Q&A entry for ignoring files/folders in Cody This commit introduces a new question and answer entry to `answers.json` to address the ability to ignore files and folders within Cody, specifically for JetBrains IDEs. The changes include: - Added a Q&A entry explaining the current lack of a built-in file/folder ignore feature for JetBrains IDEs in Cody for Pro users. It clarifies that while documentation mentions an ignore feature for Enterprise users, this functionality is not yet available for Pro users. The entry also notes that the feature has been requested and is under consideration by the product team, advising users to monitor future updates. --- answers.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/answers.json b/answers.json index fb54d6a..4518c9f 100644 --- a/answers.json +++ b/answers.json @@ -87,4 +87,9 @@ "url": "https://community.sourcegraph.com/t/is-there-a-status-board-for-cody/2537", "title": "Is there a status board for Cody?", "answer": "Yes, Sourcegraph maintains a status page for monitoring Cody and other services. You can check the status page at 'Sourcegraph Status' which shows maintenance events and service availability. During outages, Sourcegraph also posts announcements about scheduled maintenance that may affect service here: https://sourcegraphstatus.com/" +}, +{ + "url": "https://community.sourcegraph.com/t/how-to-ignore-files-folders/2622", + "title": "How to ignore files/folders in Cody", + "answer": "Currently, Cody does not have a built-in file/folder ignore feature for JetBrains IDEs. While the documentation mentions an ignore feature for Enterprise users, this is not available for Pro users at this time. The feature has been requested and tagged for the product team's consideration. Pro users seeking similar functionality should monitor future updates as this has been identified as a desired feature." }] \ No newline at end of file From 9e1e975f196cf0abd868f5a910dbd632432cf446 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Thu, 1 May 2025 15:06:11 -0700 Subject: [PATCH 4/9] feat: Add Q&A entry for customizing Cody in Visual Studio This commit introduces a new question and answer entry to `answers.json` to guide users on how to customize Cody in Visual Studio. The changes include: - Added a Q&A entry explaining how to customize Cody in Visual Studio using `cody.chat.preInstruction` instead of `instructions` in the configuration file. It also mentions that the Visual Studio extension is still in the experimental phase and that configuration keys may differ between IDE extensions. --- answers.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/answers.json b/answers.json index 4518c9f..1f1883d 100644 --- a/answers.json +++ b/answers.json @@ -92,4 +92,9 @@ "url": "https://community.sourcegraph.com/t/how-to-ignore-files-folders/2622", "title": "How to ignore files/folders in Cody", "answer": "Currently, Cody does not have a built-in file/folder ignore feature for JetBrains IDEs. While the documentation mentions an ignore feature for Enterprise users, this is not available for Pro users at this time. The feature has been requested and tagged for the product team's consideration. Pro users seeking similar functionality should monitor future updates as this has been identified as a desired feature." +}, +{ + "url": "https://community.sourcegraph.com/t/how-to-customize-cody/2651", + "title": "How to customize Cody in Visual Studio", + "answer": "For customizing Cody in Visual Studio, use 'cody.chat.preInstruction' instead of 'instructions' in your configuration file. The Visual Studio extension is still in experimental phase, so some features may not work as expected. When configuring Cody, ensure you're using the correct configuration keys as they differ between IDE extensions." }] \ No newline at end of file From 0e700469c555160d192bf75c690dbe2f5c6035a4 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Thu, 8 May 2025 11:03:49 -0700 Subject: [PATCH 5/9] feat: Add Q&A entry for login error "Failed to saving state to session" --- answers.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/answers.json b/answers.json index 1f1883d..96fbdd0 100644 --- a/answers.json +++ b/answers.json @@ -97,4 +97,9 @@ "url": "https://community.sourcegraph.com/t/how-to-customize-cody/2651", "title": "How to customize Cody in Visual Studio", "answer": "For customizing Cody in Visual Studio, use 'cody.chat.preInstruction' instead of 'instructions' in your configuration file. The Visual Studio extension is still in experimental phase, so some features may not work as expected. When configuring Cody, ensure you're using the correct configuration keys as they differ between IDE extensions." +}, +{ + "url": "https://www.reddit.com/r/sourcegraph/comments/1khiig3/how_to_deal_with_login_error_failed_to_saving/", + "title": "How to deal with login error 'Failed to saving state to session'", + "answer": "This error is typically due to a service interruption or network issue on our end. Please check the status page https://sourcegraphstatus.com/ for any updates or outages." }] \ No newline at end of file From 8367cfb1eb9cc887f903a12ebbc93ec1dd5d3750 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Fri, 9 May 2025 10:45:30 -0700 Subject: [PATCH 6/9] fix: Remove duplicate URL entry in answers.json The `url` key was duplicated in the "Resolving rate limit issues caused by model switching" entry, causing an error. This commit removes the duplicate entry. --- answers.json | 1 - 1 file changed, 1 deletion(-) diff --git a/answers.json b/answers.json index 96fbdd0..f080604 100644 --- a/answers.json +++ b/answers.json @@ -26,7 +26,6 @@ { "url": "https://community.sourcegraph.com/t/hitting-limits-due-to-model-switching/2200", "title": "Resolving rate limit issues caused by model switching", - "url": "https://community.sourcegraph.com/t/error-403-workspaces-forbidden-user-is-banned/2438", "answer": "If you encounter rate limit issues due to frequent model switching, update your Cody plugin/extension to the latest stable version. Then, log out and log back into your Sourcegraph account to resolve the issue. This solution addresses problems related to what Sourcegraph identified as 'problematic code' that caused some users to be incorrectly flagged or banned." }, { From 84600bfcff6b6b600038a0daeeeca20ea68e1663 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Fri, 9 May 2025 10:47:37 -0700 Subject: [PATCH 7/9] feat: Add Q&A entry for resolving 'symf failed' error in VS Code --- answers.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/answers.json b/answers.json index f080604..61cccad 100644 --- a/answers.json +++ b/answers.json @@ -18,6 +18,11 @@ "title": "Security considerations when using custom API keys and model configurations", "answer": "When utilizing your own API key and model configuration with Cody and `cody.dev.models`, the requests are primarily routed directly to your designated provider. While some background processing may occur to gather context and transmit telemetry data, the core prompt and request are designed to be sent to your deployment. This architecture aims to ensure that sensitive data remains within your control, minimizing exposure to external systems." }, +{ + "url": "https://community.sourcegraph.com/t/failed-to-retrieve-search-context-evalerror-symf-failed/2667", + "title": "Resolving 'symf failed' error in VS Code", + "answer": "If you encounter the error 'Failed to retrieve search context: EvalError: symf failed' in VS Code, try deleting your chat history. This can sometimes resolve the issue without needing to restart the IDE. This error may occur on new chats until the history is cleared." +}, { "url": "https://community.sourcegraph.com/t/vscode-extension-not-working-in-ssh-remote-connection/1834", "title": "Troubleshooting Sourcegraph VS Code extension in SSH remote connections", From 5198a346ed5273a01568d45195e1f5089c5501ad Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 13 May 2025 09:57:45 -0700 Subject: [PATCH 8/9] feat: Rename memory.md to AGENT.md and remove README.md The `memory.md` file has been renamed to `AGENT.md` to better reflect its purpose. The `README.md` file was removed as it is no longer needed. --- .sourcegraph/memory.md => AGENT.md | 0 README.md | 48 ------------------------------ 2 files changed, 48 deletions(-) rename .sourcegraph/memory.md => AGENT.md (100%) delete mode 100644 README.md diff --git a/.sourcegraph/memory.md b/AGENT.md similarity index 100% rename from .sourcegraph/memory.md rename to AGENT.md diff --git a/README.md b/README.md deleted file mode 100644 index 33e4132..0000000 --- a/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# About - -This repo generates a JSON file with answers to questions on Sourcegraph's community forum [that are solved](https://community.sourcegraph.com/search?q=status%3Asolved). It uses Amp to generate [the JSON file](https://raw.githubusercontent.com/sourcegraph-community/forum-answers-for-docs/refs/heads/main/answers.json). - -## How does it work? - -Amp uses `memory.md` so all you need to do is paste the url in the text box and `command+return`. This will automatically append a new JSON object to the bottom of the file. - -## Prompts - -### Amp - -``` -I want you to go to this page: https://community.sourcegraph.com/t/updating-cody-search-index-hangs-forever/2275 - -Grab the title: "Updating Cody search index… hangs forever" - -then the answer: "I have been on this for two weeks. Now, I believe it is not directly related to Cody. I had Python Extension deactivated, and activating it fixed the problem." - -Then create a json file with the following json schema: -* url -* title -* answer - -Going forward I will give you a url, and you will append the next json object to the bottom of answers.json -``` - -#### This will produce a JSON file with the following schema - -```json -{ - "url": "https://community.sourcegraph.com/t/updating-cody-search-index-hangs-forever/2275", - "title": "Updating Cody search index… hangs forever", - "answer": "I have been on this for two weeks. Now, I believe it is not directly related to Cody. I had Python Extension deactivated, and activating it fixed the problem." -} -``` - -#### Clean up question & answer - -``` -The questions ("title") and "answer" are from a forum so the grammar and context might be off. rewrite these faqs and keep the json format. -``` - -## Publish - -- Git commit -- Git push -- Git merge From fc7b87c1480c7d9c52dc579a6ad4b8bc9bd0a719 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 13 May 2025 09:58:21 -0700 Subject: [PATCH 9/9] Add: Handling disallowed special tokens in code files --- answers.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/answers.json b/answers.json index 61cccad..12f42bb 100644 --- a/answers.json +++ b/answers.json @@ -1,4 +1,10 @@ -[{ +[ +{ + "url": "https://community.sourcegraph.com/t/disallowed-special-token-found-im-start/2717", + "title": "Handling disallowed special tokens in code files", + "answer": "When working with code that contains special tokens like '<|im_start|>' that are interpreted as prompt injection attempts, these tokens cannot be directly included in the context. This is a security guardrail implemented by design to prevent prompt injection. Currently, there is no built-in escaping mechanism to allow these tokens to be processed normally. Consider manually modifying your files to use alternative representations if you need to work with these tokens in your codebase." +}, +{ "url": "https://community.sourcegraph.com/t/how-to-change-account-login-method/2498", "title": "Changing account login method from Google to Sourcegraph", "answer": "To switch your login method from Google to Sourcegraph, use the Sourcegraph Enterprise login option despite being a Pro user. After logging out, select the Enterprise option, enter https://sourcegraph.com as the URL and use your access token. This method works for cloud customers who need custom URLs and for Sourcegraph Gateway instances."