Repository navigation
codegate-version prompt does not work with Copilot #339
Description
Activity
I looked and added some debugging, and there is some problem with repetitive calls when we do a shortcut:
in process body from copilot i process body step is <codegate.pipeline.secrets.secrets.CodegateSecrets object at 0x11a9aa690> {"event": "Loaded 61 signature groups", "level": "info", "timestamp": "2024-12-17T12:18:30.3dZ", "module": "signatures", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/pipeline/secrets/signatures.py"} {"event": "Compiled 148 regex patterns", "level": "info", "timestamp": "2024-12-17T12:18:30.3dZ", "module": "signatures", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/pipeline/secrets/signatures.py"} {"event": "Total secrets redacted since last assistant message: 0", "level": "info", "timestamp": "2024-12-17T12:18:30.3dZ", "module": "secrets", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/pipeline/secrets/secrets.py"} step is <codegate.pipeline.version.version.CodegateVersion object at 0x11a9aa840> in shortcut Codegate version: 0.1.0 /Users/yolanda/Library/Caches/pypoetry/virtualenvs/codegate-Xtb3B9Ks-py3.12/lib/python3.12/site-packages/aiosqlite/core.py:115: DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes result = function() {"event": "Recorded context in DB. Output chunks: 4. Alerts: 1.", "level": "info", "timestamp": "2024-12-17T12:18:31.3dZ", "module": "connection", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/db/connection.py"} in process body from copilot i process body step is <codegate.pipeline.secrets.secrets.CodegateSecrets object at 0x11a9de090> {"event": "Total secrets redacted since last assistant message: 0", "level": "info", "timestamp": "2024-12-17T12:18:31.3dZ", "module": "secrets", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/pipeline/secrets/secrets.py"} step is <codegate.pipeline.version.version.CodegateVersion object at 0x11a9de2d0> in shortcut Codegate version: 0.1.0that is being called two times... and even with that , the pipeline continues and generates a totally different result:
Codegate version: 0.1.0 13:30:33 - LiteLLM:INFO: utils.py:2777 - LiteLLM completion() model= gpt-4o; provider = openai {"event": "\nLiteLLM completion() model= gpt-4o; provider = openai", "level": "info", "timestamp": "2024-12-17T12:30:33.3dZ", "module": "utils", "pathname": "/Users/yolanda/Library/Caches/pypoetry/virtualenvs/codegate-Xtb3B9Ks-py3.12/lib/python3.12/site-packages/litellm/utils.py"} {"event": "HTTP Request: POST https://api.enterprise.githubcopilot.com/chat/completions \"HTTP/1.1 200 OK\"", "level": "info", "timestamp": "2024-12-17T12:30:35.3dZ", "module": "_client", "pathname": "/Users/yolanda/Library/Caches/pypoetry/virtualenvs/codegate-Xtb3B9Ks-py3.12/lib/python3.12/site-packages/httpx/_client.py"} {"event": "Extracted packages: []", "level": "info", "timestamp": "2024-12-17T12:30:35.3dZ", "module": "extractor", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/llm_utils/extractor.py"} {"event": "Found 0 libraries in the storage engine", "level": "info", "timestamp": "2024-12-17T12:30:35.3dZ", "module": "output", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/pipeline/extract_snippets/output.py"} {"event": "Recorded context in DB. Output chunks: 384. Alerts: 2.", "level": "info", "timestamp": "2024-12-17T12:30:35.3dZ", "module": "connection", "pathname": "/Users/yolanda/development/codegate-upstream/src/codegate/db/connection.py"}We need to fix it later... for the comment
codegate-versioncommand is not supported by Copilot
The proxy integration for Copilot is not handling the
codegate-versionprompt.Copilot responds with a generic interpretation like this: