Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

update test results for no tags by default #573

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/code_context_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,20 @@ def func_4(string):
mock_session_context.config.auto_context_tokens = 8000

code_message = await code_context.get_code_message(0, prompt="prompt")
assert mock_session_context.llm_api_handler.spice.count_tokens(code_message, "gpt-4", is_message=True) == 95 # Code
assert mock_session_context.llm_api_handler.spice.count_tokens(code_message, "gpt-4", is_message=True) == 85 # Code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the change from including tags like (search-result, user-included) in the code message output to a simplified version without these tags could make the output cleaner, it's important to consider if any downstream processes or users rely on these tags for context or filtering. If so, it would be beneficial to include a rationale or address potential impacts in the pull request description.

assert (
code_message
== """\
Code Files:

file_1.py (search-result, user-included)
file_1.py
1:def func_1(x, y):
2: return x + y
3:
4:def func_2():
5: return 3

file_2.py (search-result)
file_2.py
1:def func_3(a, b, c):
2: return a * b ** c
3:
Expand Down
2 changes: 1 addition & 1 deletion tests/code_file_manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def test_partial_files(mocker, mock_session_context):
"""\
Code Files:

dir/file.txt (user-included)
dir/file.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my previous comment, ensure that removing (user-included) from the code message doesn't negatively affect how users interact with or understand the output, especially in environments where clarity of source or inclusion reason might be significant.

1:I am a file
...
3:third
Expand Down
Loading