summaryrefslogtreecommitdiff
path: root/internal/appconfig/config_load.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-20 18:27:35 +0300
committerPaul Buetow <paul@buetow.org>2026-05-20 18:27:35 +0300
commit83caeb9bcdc4a5eafda937807cd42ea8455948a6 (patch)
treef2258d2d77bfb3f9186bbc457cecdfe17877b891 /internal/appconfig/config_load.go
parent005c262d09314cd43285af33dc6f1afef0621714 (diff)
Add YouSearch (You.com Research API) provider integration
Amp-Thread-ID: https://ampcode.com/threads/T-019e45ff-4976-750c-b2e6-121d0e5991ef Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/appconfig/config_load.go')
-rw-r--r--internal/appconfig/config_load.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/appconfig/config_load.go b/internal/appconfig/config_load.go
index aa169bc..3ed1654 100644
--- a/internal/appconfig/config_load.go
+++ b/internal/appconfig/config_load.go
@@ -205,6 +205,7 @@ func rejectLegacyKeys(raw map[string]any) error {
knownTables := map[string]struct{}{
"general": {}, "logging": {}, "completion": {}, "triggers": {}, "inline": {},
"chat": {}, "provider": {}, "models": {}, "openai": {}, "ollama": {}, "prompts": {},
+ "yousearch": {},
}
for k := range raw {
if _, isTable := knownTables[k]; isTable {
@@ -269,6 +270,7 @@ func applyProviderSections(fc *fileConfig, out *App) {
applyOpenRouterSection(fc, out)
applyOllamaSection(fc, out)
applyAnthropicSection(fc, out)
+ applyYouSearchSection(fc, out)
}
func applyPromptSections(fc *fileConfig, out *App) {
@@ -430,6 +432,16 @@ func applyAnthropicSection(fc *fileConfig, out *App) {
out.mergeProviderFields(&tmp)
}
+func applyYouSearchSection(fc *fileConfig, out *App) {
+ if fc.YouSearch == (sectionYouSearch{}) {
+ return
+ }
+ tmp := App{ProviderConfig: ProviderConfig{
+ YouSearchResearchEffort: fc.YouSearch.ResearchEffort,
+ }}
+ out.mergeProviderFields(&tmp)
+}
+
func applyPromptCompletion(fc *fileConfig, out *App) {
if fc.Prompts.Completion == (sectionPromptsCompletion{}) {
return