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

fix: parsing promptList text and breadcrumb #177

Merged
merged 3 commits into from
Jan 23, 2025
Merged

fix: parsing promptList text and breadcrumb #177

merged 3 commits into from
Jan 23, 2025

Conversation

peppescg
Copy link
Collaborator

Following some issues with copilot, I tried to checked some specific use cases:

  • tagged file
  • highlighted snippet
  • fallback text
Screenshot 2025-01-22 at 18 20 10 Screenshot 2025-01-22 at 18 20 19

@peppescg peppescg linked an issue Jan 22, 2025 that may be closed by this pull request
@coveralls
Copy link
Collaborator

coveralls commented Jan 22, 2025

Pull Request Test Coverage Report for Build 12926923723

Details

  • 17 of 19 (89.47%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 69.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/utils.ts 16 18 88.89%
Totals Coverage Status
Change from base Build 12926693891: 0.2%
Covered Lines: 628
Relevant Lines: 809

💛 - Coveralls

alex-mcgovern
alex-mcgovern previously approved these changes Jan 22, 2025
kantord
kantord previously approved these changes Jan 23, 2025
@peppescg peppescg dismissed stale reviews from kantord and alex-mcgovern via b18d187 January 23, 2025 10:11
// there some edge cases in copilot where the prompts are not correctly parsed. In this case is better to show the filepath
if (compareCode || filePath) {
if (filePath)
return `Prompt on file${filePath[0]?.trim().toLocaleLowerCase()}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return `Prompt on file${filePath[0]?.trim().toLocaleLowerCase()}`;
return `Prompt on file: ${filePath[0]?.trim().toLocaleLowerCase()}`;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The reason why I didn't add the colon is because it is already included in the filepath from AI, so it would be redundant. The same for code snippet

Screenshot 2025-01-23 at 11 16 07

return `Prompt on file${filePath[0]?.trim().toLocaleLowerCase()}`;

if (compareCode)
return `Prompt from snippet ${compareCode[0]?.trim().toLocaleLowerCase()}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return `Prompt from snippet ${compareCode[0]?.trim().toLocaleLowerCase()}`;
return `Prompt from snippet: ${compareCode[0]?.trim().toLocaleLowerCase()}`;

"render code with file path",
{
message: "<file> ```tsx // filepath: /tests/my-test.tsx import",
expected: /Prompt on file\/\/ filepath: \/tests\/my-test.tsx/i,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
expected: /Prompt on file\/\/ filepath: \/tests\/my-test.tsx/i,
expected: /Prompt on file: \/\/ filepath: \/tests\/my-test.tsx/i,

@peppescg peppescg merged commit 6da034d into main Jan 23, 2025
8 checks passed
@peppescg peppescg deleted the issues/174 branch January 23, 2025 10:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breadcrumb parsing issue
4 participants