Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

codegate-version prompt does not work with Copilot #339

Description

@danbarr

The proxy integration for Copilot is not handling the codegate-version prompt.

Copilot responds with a generic interpretation like this:

Image

Activity

  1. added this to the milestone on Dec 14, 2024
  2. self-assigned this
    on Dec 17, 2024
  3. yrobla commented on Dec 17, 2024

    @yrobla
    Contributor

    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.0

    that 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"}
    
  4. yrobla commented on Dec 17, 2024

    @yrobla
    Contributor

    We need to fix it later... for the comment codegate-version command is not supported by Copilot

  5. removed their assignment
    on Dec 17, 2024
  6. self-assigned this
    on Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions