-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: truncate tagToString
to max filename len
#5632
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
Conversation
✅ Deploy Preview for continuedev canceled.
|
@sestinj I don't believe this should break any existing indexes since it only uses the new logic if the tagName would have thrown an error using the old logic. But worth a sanity check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- tests
- trim from end instead of start
- move the constant
@@ -4,7 +4,7 @@ import { RunResult } from "sqlite3"; | |||
|
|||
import { IContinueServerClient } from "../../continueServer/interface.js"; | |||
import { Chunk, IndexTag, IndexingProgressUpdate } from "../../index.js"; | |||
import { DatabaseConnection, SqliteDb, tagToString } from "../refreshIndex.js"; | |||
import { DatabaseConnection, SqliteDb } from "../refreshIndex.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing to do in your PR here, but reminder that we should add prettier as a CI step to resolve these messy diffs
Description
Resolves #5594
Summary by mrge
Updated the tagToString function to truncate long strings, making sure table names and identifiers stay within safe filename limits. This prevents errors from overly long paths, especially in dev containers.