Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mostly refactors on bee/toolcody #7341

Open
wants to merge 5 commits into
base: bee/toolcody
Choose a base branch
from
Open

Mostly refactors on bee/toolcody #7341

wants to merge 5 commits into from

Conversation

ykdojo
Copy link
Contributor

@ykdojo ykdojo commented Mar 5, 2025

Test plan

Manual testing

ykdojo added 5 commits March 4, 2025 10:54
This commit updates the descriptions of the tools used in the chat interface to provide more context and clarity.

The changes include:

-   Adding "Editing File:" prefix to the file path in the `edit_file` tool description.
-   Adding "Getting Diagnostics for:" prefix to the file name in the `get_diagnostic` tool description.
-   Adding "Retrieving File:" prefix to the file name in the `get_file` tool description.
-   Changing "Executing Terminal_Command" to "Executing Terminal Command" and adding "Executing Command:" prefix to the command in the `run_terminal_command` tool description.

These changes improve the user experience by providing more informative descriptions of the tools being used.
…to a dedicated `setChatAgent` function. This update improves readability and maintainability with clear `if` statements and introduces a constant `AGENTIC_KEYWORD` for better code clarity.
This commit refactors the logic for determining the agent name in `ChatController.ts`. The changes include:

-   Extracting the agent name determination logic into a dedicated `getAgentName` function.
-   Simplifying the logic within `getAgentName` to improve readability.
-   Using a more straightforward `if` condition to check for valid intents.

These changes improve the maintainability and readability of the code.
This commit renames the `setChatAgent` function to `getChatAgent` in `ChatController.ts`. This change improves the clarity and accuracy of the function's name, as it now better reflects its purpose of retrieving the chat agent.
@ykdojo ykdojo requested a review from abeatrix March 5, 2025 18:39
Copy link

github-actions bot commented Mar 5, 2025

‼️ Hey @sourcegraph/cody-security, please review this PR carefully as it introduces the usage of an unsafe_ function or abuses PromptString.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant