Skip to content

Commit c4f28ad

Browse files
committed
COD-529: Update instructions to use names
1 parent 4d7bb06 commit c4f28ad

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/codealive_mcp_server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
- Remember that context from previous messages is maintained in the same conversation
5555
5656
Flexible data source usage:
57-
- You can use a workspace ID as a single data source to search or chat across all its repositories at once
58-
- Alternatively, you can use specific repository IDs for more targeted searches
59-
- For complex queries, you can combine multiple repository IDs from different workspaces
57+
- You can use a workspace name as a single data source to search or chat across all its repositories at once
58+
- Alternatively, you can use specific repository names for more targeted searches
59+
- For complex queries, you can combine multiple repository names from different workspaces
6060
- Choose between workspace-level or repository-level access based on the scope of the query
6161
6262
Repository integration:
@@ -65,7 +65,7 @@
6565
you can suggest using CodeAlive's search and chat to understand the codebase
6666
- Data sources include repository URLs to help match with local git repositories
6767
- Workspaces include a list of repository IDs, allowing you to understand their composition
68-
- You can use repository IDs from workspaces to search or chat about specific repositories within a workspace
68+
- When searching or chatting, always use repository names from workspaces to target specific repositories
6969
7070
When analyzing search results:
7171
- Pay attention to file paths to understand the project structure

src/tests/test_parameter_normalization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def test_mixed_array_with_dicts(self):
5050
assert result == ["repo1", "repo2", "repo3", "workspace1"]
5151

5252
def test_dict_without_id(self):
53-
"""Test that dicts without 'id' field are skipped."""
53+
"""Test that dicts without 'id' field use 'name' field if present."""
5454
input_data = [
5555
"repo1",
56-
{"name": "some-repo", "type": "repository"}, # No 'id' field
56+
{"name": "some-repo", "type": "repository"}, # No 'id' field, but has 'name'
5757
"repo2"
5858
]
5959
result = normalize_data_source_names(input_data)
60-
assert result == ["repo1", "repo2"]
60+
assert result == ["repo1", "some-repo", "repo2"]
6161

6262
def test_empty_strings_preserved(self):
6363
"""Test that empty strings in arrays are preserved (might be intentional)."""

src/tools/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ async def codebase_consultant(
3333
3434
Args:
3535
question: What you want to know about the codebase
36-
Example: "How does the authentication system work?"
36+
Example: "How does the authentication system work?"
3737
3838
data_sources: Repository or workspace names to analyze. These names are
3939
resolved to IDs on the server side.
4040
Example: ["enterprise-platform", "workspace:payments-team"]
4141
4242
conversation_id: Continue a previous consultation session
43-
Example: "conv_6789f123a456b789c123d456"
43+
Example: "conv_6789f123a456b789c123d456"
4444
4545
Returns:
4646
Expert analysis and explanation addressing your question.

src/tools/datasources.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ async def get_data_sources(ctx: Context, alive_only: bool = True) -> str:
1919
2020
Args:
2121
alive_only: If True (default), returns only data sources in "Alive" state ready for use with chat.
22-
If False, returns all data sources regardless of processing state.
22+
If False, returns all data sources regardless of processing state.
2323
2424
Returns:
2525
A formatted list of available data sources with the following information for each:
26-
- id: Unique identifier for the data source, used in other API calls
27-
- name: Human-readable name of the repository or workspace
26+
- id: Unique identifier for the data source
27+
- name: Human-readable name of the repository or workspace, used in other API calls
2828
- description: Summary of the codebase contents to guide search and chat usage
2929
- type: The type of data source ("Repository" or "Workspace")
3030
- url: URL of the repository (for Repository type only)

0 commit comments

Comments
 (0)