Skip to content

Commit f3fab5a

Browse files
tae2089claude
andcommitted
fix: use rag.description viper key and add CLI config fallback for --desc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2b83cc2 commit f3fab5a

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

cmd/ccg/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func runServe(deps *cli.Deps, cfg cli.ServeConfig) error {
157157
Logger: deps.Logger,
158158
Cache: cache,
159159
RagIndexDir: viper.GetString("rag.index_dir"),
160-
RagProjectDesc: viper.GetString("description"),
160+
RagProjectDesc: viper.GetString("rag.description"),
161161
}
162162

163163
srv := mcpserver.NewServer(mcpDeps)

internal/cli/ragindex.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88

99
"github.com/spf13/cobra"
10+
"github.com/spf13/viper"
1011

1112
"github.com/imtaebin/code-context-graph/internal/ragindex"
1213
)
@@ -25,6 +26,11 @@ func newRagIndexCmd(deps *Deps) *cobra.Command {
2526
return fmt.Errorf("database not initialized")
2627
}
2728

29+
// --desc 플래그가 없으면 viper config에서 읽음
30+
if projectDesc == "" {
31+
projectDesc = viper.GetString("rag.description")
32+
}
33+
2834
b := &ragindex.Builder{
2935
DB: deps.DB,
3036
OutDir: resolveOutDir(outDir),

0 commit comments

Comments
 (0)