Fix local profile title to honor config.yaml name#11078
Fix local profile title to honor config.yaml name#11078siewcapital wants to merge 2 commits intocontinuedev:mainfrom
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
2 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="core/config/profile/LocalProfileLoader.ts">
<violation number="1" location="core/config/profile/LocalProfileLoader.ts:57">
P2: Override assistant files with empty content are treated as absent, causing unintended fallback to primary config.yaml and wrong title source.</violation>
</file>
<file name="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt">
<violation number="1" location="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt:43">
P2: URLDecoder.decode applies form-encoding semantics and turns '+' into spaces, so file URIs with literal '+' are rewritten to spaces when rebuilding the URI, changing the target path.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| if (this.overrideAssistantFile?.content) { | ||
| return this.overrideAssistantFile.content; | ||
| } |
There was a problem hiding this comment.
P2: Override assistant files with empty content are treated as absent, causing unintended fallback to primary config.yaml and wrong title source.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At core/config/profile/LocalProfileLoader.ts, line 57:
<comment>Override assistant files with empty content are treated as absent, causing unintended fallback to primary config.yaml and wrong title source.</comment>
<file context>
@@ -40,17 +41,29 @@ export default class LocalProfileLoader implements IProfileLoader {
}
+
+ private getProfileYamlContent(): string | undefined {
+ if (this.overrideAssistantFile?.content) {
+ return this.overrideAssistantFile.content;
+ }
</file context>
| if (this.overrideAssistantFile?.content) { | |
| return this.overrideAssistantFile.content; | |
| } | |
| if (this.overrideAssistantFile) { | |
| return this.overrideAssistantFile.content; | |
| } |
| } | ||
|
|
||
| private fun normalizeAndEncodeFilePath(rawPath: String): String { | ||
| val decodedPath = URLDecoder.decode(rawPath, StandardCharsets.UTF_8) |
There was a problem hiding this comment.
P2: URLDecoder.decode applies form-encoding semantics and turns '+' into spaces, so file URIs with literal '+' are rewritten to spaces when rebuilding the URI, changing the target path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt, line 43:
<comment>URLDecoder.decode applies form-encoding semantics and turns '+' into spaces, so file URIs with literal '+' are rewritten to spaces when rebuilding the URI, changing the target path.</comment>
<file context>
@@ -15,21 +17,33 @@ object UriUtils {
+ }
+
+ private fun normalizeAndEncodeFilePath(rawPath: String): String {
+ val decodedPath = URLDecoder.decode(rawPath, StandardCharsets.UTF_8)
+ return if (decodedPath.startsWith("/")) decodedPath else "/$decodedPath"
+ }
</file context>
Summary
~/.continue/config.yamlfor the default local profile titlenamefield when present, with fallback toLocal ConfigTests
core/config/profile/LocalProfileLoader.test.tscovering:namefrom local confignameCloses #11061
Summary by cubic
Make the default Local profile title use the name from local config.yaml, with safe fallbacks and override precedence preserved. Also harden IntelliJ URI parsing for Windows file URIs with spaces and square brackets; includes unit tests.
Written for commit 7daf16e. Summary will update on new commits.