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

Expand gitignore and fix line endings in AI chat template #5950

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

halter73
Copy link
Member

@halter73 halter73 commented Feb 21, 2025

After testing out dotnet new chat and running dotnet new gitignore habitually, I saw that the template already created one for me. I was happy to see that it did, but I was surprised that it didn't account for build artifacts. This PR appends the gitignore used by the default item template which you can find here. I also made the *.db exclusion narrower to apply just the ingestion cache SQLite database files, since even the default gitignore which includes a lot, doesn't assume you'd never want to check in a *.db file.

I also have autocrlf = true configured in my personal .gitconfig, and I saw the following warning when first adding files generated by this template:

PS C:\dev\temp\AIChat> dotnet new chat
The template "AI Chat with Custom Data" was created successfully.
PS C:\dev\temp\AIChat> git init
Initialized empty Git repository in C:/dev/temp/AIChat/.git/
PS C:\dev\temp\AIChat> git add -A
warning: in the working copy of 'AIChat.csproj', LF will be replaced by CRLF the next time Git touches it

I think this will be fixed by the .gitattributes change to use the default text=auto instead of text eol=lf for *.in files. As far as I can see, there are no other *.in files currently in the extensions repo, so this should be safe.

Microsoft Reviewers: Open in CodeFlow

There are no *.in scripts in this repo currently, and this should avoid
the following warning if you have autocrlf = true in your .gitconfig:

PS C:\dev\temp\AIChat> dotnet new chat
The template "AI Chat with Custom Data" was created successfully.
PS C:\dev\temp\AIChat> git init
Initialized empty Git repository in C:/dev/temp/AIChat/.git/
PS C:\dev\temp\AIChat> git add -A
warning: in the working copy of 'AIChat.csproj', LF will be replaced by CRLF the next time Git touches it
@RussKie
Copy link
Member

RussKie commented Feb 21, 2025

to use the default text=auto instead of text eol=lf for *.in files. As far as I can see, there are no other *.in files currently in the extensions repo, so this should be safe.

Some of these settings are artifacts from R9, which at some point in time was all in Unix line endings (despite never been worked on or run outside Windows).

@dotnet-comment-bot
Copy link
Collaborator

‼️ Found issues ‼️

Project Coverage Type Expected Actual
Microsoft.Extensions.AI Line 89 88.62 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

Project Expected Actual
Microsoft.Extensions.AI.Abstractions 82 83
Microsoft.Gen.MetadataExtractor 57 70

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=958533&view=codecoverage-tab

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.

3 participants