mirror of
https://github.com/awizemann/scarf.git
synced 2026-05-10 10:36:35 +00:00
fix: Hide false external memory provider warning on fresh installs
The config.yaml uses YAML empty string literal (provider: '') which the parser reads as the literal string '' rather than an empty string. Strip surrounding quotes before checking so '' and "" are treated as empty. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,10 @@ final class MemoryViewModel {
|
|||||||
var userCharCount: Int { userContent.count }
|
var userCharCount: Int { userContent.count }
|
||||||
|
|
||||||
var hasExternalProvider: Bool {
|
var hasExternalProvider: Bool {
|
||||||
!memoryProvider.isEmpty && memoryProvider != "file"
|
let stripped = memoryProvider
|
||||||
|
.trimmingCharacters(in: .whitespaces)
|
||||||
|
.trimmingCharacters(in: CharacterSet(charactersIn: "'\""))
|
||||||
|
return !stripped.isEmpty && stripped != "file"
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasMultipleProfiles: Bool { !profiles.isEmpty }
|
var hasMultipleProfiles: Bool { !profiles.isEmpty }
|
||||||
|
|||||||
Reference in New Issue
Block a user