Skip to content

Fix local profile title to honor config.yaml name#11078

Open
siewcapital wants to merge 2 commits intocontinuedev:mainfrom
Siew-s-Capital:fix/local-config-display-name-11061
Open

Fix local profile title to honor config.yaml name#11078
siewcapital wants to merge 2 commits intocontinuedev:mainfrom
Siew-s-Capital:fix/local-config-display-name-11061

Conversation

@siewcapital
Copy link

@siewcapital siewcapital commented Mar 5, 2026

Summary

  • load ~/.continue/config.yaml for the default local profile title
  • use the parsed name field when present, with fallback to Local Config
  • preserve existing behavior for workspace override assistant files

Tests

  • added core/config/profile/LocalProfileLoader.test.ts covering:
    • default profile picks up name from local config
    • fallback when config file is missing
    • fallback when config has no name
    • override assistant content takes precedence without reading disk

Closes #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.

  • Bug Fixes
    • Local profile: parse default config.yaml and set title from its name; fall back to “Local Config” when missing or unnamed; honor workspace override content without reading disk.
    • IntelliJ: normalize Windows file URIs and encode special characters to correctly handle paths with spaces or square brackets.

Written for commit 7daf16e. Summary will update on new commits.

@siewcapital siewcapital requested a review from a team as a code owner March 5, 2026 15:05
@siewcapital siewcapital requested review from Patrick-Erichsen and removed request for a team March 5, 2026 15:05
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +57 to +59
if (this.overrideAssistantFile?.content) {
return this.overrideAssistantFile.content;
}
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 5, 2026

Choose a reason for hiding this comment

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

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>
Suggested change
if (this.overrideAssistantFile?.content) {
return this.overrideAssistantFile.content;
}
if (this.overrideAssistantFile) {
return this.overrideAssistantFile.content;
}
Fix with Cubic

}

private fun normalizeAndEncodeFilePath(rawPath: String): String {
val decodedPath = URLDecoder.decode(rawPath, StandardCharsets.UTF_8)
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 5, 2026

Choose a reason for hiding this comment

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

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>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Local Config display name ignores config.yaml name field

1 participant