Skip to content

Commit aadff74

Browse files
committed
chore: upgrade dependencies and refactor logging system
- Updated `github.com/coding-hui/wecoding-sdk-go` from `v0.8.7` to `v0.8.8`. - Updated `github.com/Masterminds/semver/v3` from `v3.2.0` to `v3.3.1`. - Updated `github.com/Masterminds/sprig/v3` from `v3.2.3` to `v3.3.0`. - Updated `github.com/huandu/xstrings` from `v1.3.3` to `v1.5.0`. - Updated `github.com/mitchellh/copystructure` from `v1.0.0` to `v1.2.0`. - Updated `github.com/mitchellh/reflectwalk` from `v1.0.0` to `v1.0.2`. - Updated `github.com/sashabaranov/go-openai` from `v1.26.1` to `v1.37.0`. - Updated `github.com/shopspring/decimal` from `v1.2.0` to `v1.4.0`. - Updated `github.com/spf13/cast` from `v1.5.1` to `v1.7.1`. - Updated multiple `golang.org/x` dependencies to newer versions. - Added `DesignModel` and `CodingModel` fields to the `AutoCoder` struct. - Removed the `assert.go` file and its associated debug assertions. - Refactored the logging system to support JSON and YAML formats with buffered writes. - Added new test cases for the logging system. - Introduced configuration options for the logger, including formatter and buffer size. Signed-off-by: codiing-hui <wecoding@yeah.net>
1 parent a3f8a63 commit aadff74

File tree

8 files changed

+545
-109
lines changed

8 files changed

+545
-109
lines changed

go.mod

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0
2222
github.com/coding-hui/common v0.8.7
2323
github.com/coding-hui/go-prompt v0.2.8
24-
github.com/coding-hui/wecoding-sdk-go v0.8.7
24+
github.com/coding-hui/wecoding-sdk-go v0.8.8
2525
github.com/erikgeiser/promptkit v0.9.0
2626
github.com/fatih/color v1.18.0
2727
github.com/ghodss/yaml v1.0.0
@@ -45,8 +45,8 @@ require (
4545
require (
4646
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
4747
github.com/Masterminds/goutils v1.1.1 // indirect
48-
github.com/Masterminds/semver/v3 v3.2.0 // indirect
49-
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
48+
github.com/Masterminds/semver/v3 v3.3.1 // indirect
49+
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
5050
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
5151
github.com/andybalholm/cascadia v1.3.3 // indirect
5252
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
@@ -66,7 +66,7 @@ require (
6666
github.com/gosuri/uitable v0.0.4 // indirect
6767
github.com/h2non/filetype v1.1.3 // indirect
6868
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
69-
github.com/huandu/xstrings v1.3.3 // indirect
69+
github.com/huandu/xstrings v1.5.0 // indirect
7070
github.com/imdario/mergo v0.3.11 // indirect
7171
github.com/inconshreveable/mousetrap v1.1.0 // indirect
7272
github.com/json-iterator/go v1.1.12 // indirect
@@ -76,9 +76,9 @@ require (
7676
github.com/mattn/go-sqlite3 v1.14.24 // indirect
7777
github.com/mattn/go-tty v0.0.7 // indirect
7878
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
79-
github.com/mitchellh/copystructure v1.0.0 // indirect
79+
github.com/mitchellh/copystructure v1.2.0 // indirect
8080
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
81-
github.com/mitchellh/reflectwalk v1.0.0 // indirect
81+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
8282
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
8383
github.com/modern-go/reflect2 v1.0.2 // indirect
8484
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
@@ -95,21 +95,21 @@ require (
9595
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
9696
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
9797
github.com/rivo/uniseg v0.4.7 // indirect
98-
github.com/sashabaranov/go-openai v1.26.1 // indirect
99-
github.com/shopspring/decimal v1.2.0 // indirect
98+
github.com/sashabaranov/go-openai v1.37.0 // indirect
99+
github.com/shopspring/decimal v1.4.0 // indirect
100100
github.com/sirupsen/logrus v1.9.3 // indirect
101-
github.com/spf13/cast v1.5.1 // indirect
101+
github.com/spf13/cast v1.7.1 // indirect
102102
github.com/yargevad/filepathx v1.0.0 // indirect
103103
github.com/yuin/goldmark v1.7.4 // indirect
104104
github.com/yuin/goldmark-emoji v1.0.3 // indirect
105-
golang.org/x/crypto v0.32.0 // indirect
106-
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
107-
golang.org/x/net v0.33.0 // indirect
108-
golang.org/x/sync v0.10.0 // indirect
109-
golang.org/x/sys v0.29.0 // indirect
110-
golang.org/x/term v0.28.0 // indirect
111-
golang.org/x/text v0.21.0 // indirect
112-
golang.org/x/tools v0.26.0 // indirect
105+
golang.org/x/crypto v0.33.0 // indirect
106+
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
107+
golang.org/x/net v0.35.0 // indirect
108+
golang.org/x/sync v0.11.0 // indirect
109+
golang.org/x/sys v0.30.0 // indirect
110+
golang.org/x/term v0.29.0 // indirect
111+
golang.org/x/text v0.22.0 // indirect
112+
golang.org/x/tools v0.30.0 // indirect
113113
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
114114
gopkg.in/yaml.v2 v2.4.0 // indirect
115115
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect

go.sum

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ
1212
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
1313
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
1414
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
15+
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
1516
github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=
1617
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
18+
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
1719
github.com/PuerkitoBio/goquery v1.10.1 h1:Y8JGYUkXWTGRB6Ars3+j3kN0xg1YqqlwvdTV8WTFQcU=
1820
github.com/PuerkitoBio/goquery v1.10.1/go.mod h1:IYiHrOMps66ag56LEH7QYDDupKXyo5A8qrjIx3ZtujY=
1921
github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78=
@@ -76,6 +78,8 @@ github.com/coding-hui/go-prompt v0.2.8 h1:SjoClQQmsRxytxn2o3OaUB4V/PNOk8NPjPHpqN
7678
github.com/coding-hui/go-prompt v0.2.8/go.mod h1:ZZeEnbY5BcUJ7xBpRM2iPp8GJr5+lxRU4l0Tcd8bvW0=
7779
github.com/coding-hui/wecoding-sdk-go v0.8.7 h1:gVsLnVjr8b3ctcK2Mk4olT3iEVJTBnLQnyrzeVkeJ9c=
7880
github.com/coding-hui/wecoding-sdk-go v0.8.7/go.mod h1:toOoHe4zsHNBbGyEf+31NnvvEyihrBOw5zpLod6JbzY=
81+
github.com/coding-hui/wecoding-sdk-go v0.8.8 h1:fSR4c+05tfn0bfbZG2SKKxTcocBGirnTWF6K96nCCKk=
82+
github.com/coding-hui/wecoding-sdk-go v0.8.8/go.mod h1:nWank9mlVeuHG2UEhHo/HwGr0p/ZnH4/3a5mjpLOOBw=
7983
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
8084
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
8185
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
@@ -130,6 +134,7 @@ github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSo
130134
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
131135
github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4=
132136
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
137+
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
133138
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
134139
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
135140
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -173,12 +178,14 @@ github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwX
173178
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
174179
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
175180
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
181+
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
176182
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
177183
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
178184
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
179185
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
180186
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
181187
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
188+
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
182189
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
183190
github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=
184191
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -235,14 +242,17 @@ github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNl
235242
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
236243
github.com/sashabaranov/go-openai v1.26.1 h1:B5plrmc/r7hKgYX69oT2VSt5w0O6u9BJYTjB8lNCesI=
237244
github.com/sashabaranov/go-openai v1.26.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
245+
github.com/sashabaranov/go-openai v1.37.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
238246
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
239247
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
248+
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
240249
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
241250
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
242251
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
243252
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
244253
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
245254
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
255+
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
246256
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
247257
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
248258
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
@@ -280,15 +290,18 @@ golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v
280290
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
281291
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
282292
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
293+
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
283294
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY=
284295
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
296+
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo=
285297
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
286298
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
287299
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
288300
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
289301
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
290302
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
291303
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
304+
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
292305
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
293306
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
294307
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
@@ -301,6 +314,7 @@ golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
301314
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
302315
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
303316
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
317+
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
304318
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
305319
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
306320
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -310,6 +324,7 @@ golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
310324
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
311325
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
312326
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
327+
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
313328
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
314329
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
315330
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -332,6 +347,7 @@ golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
332347
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
333348
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
334349
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
350+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
335351
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
336352
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
337353
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -344,6 +360,7 @@ golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
344360
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
345361
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
346362
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
363+
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
347364
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
348365
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
349366
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
@@ -355,6 +372,7 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
355372
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
356373
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
357374
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
375+
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
358376
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
359377
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
360378
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
@@ -363,6 +381,8 @@ golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58
363381
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
364382
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
365383
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
384+
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
385+
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
366386
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
367387
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
368388
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

internal/options/config.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ type Config struct {
124124

125125
// AutoCoder is the configuration for the auto coder.
126126
type AutoCoder struct {
127-
PromptPrefix string `yaml:"prompt-prefix" env:"PROMPT_PREFIX"`
128-
EditFormat string `yaml:"edit-format" env:"EDIT_FORMAT"`
129-
CommitPrefix string `yaml:"commit-prefix" env:"COMMIT_PREFIX"`
130-
AutoCommit bool `yaml:"auto-commit" env:"AUTO_COMMIT" default:"true"`
127+
PromptPrefix string `yaml:"prompt-prefix" env:"PROMPT_PREFIX"`
128+
EditFormat string `yaml:"edit-format" env:"EDIT_FORMAT"`
129+
CommitPrefix string `yaml:"commit-prefix" env:"COMMIT_PREFIX"`
130+
AutoCommit bool `yaml:"auto-commit" env:"AUTO_COMMIT" default:"true"`
131+
DesignModel string `yaml:"design-model" env:"DESIGN_MODEL"`
132+
CodingModel string `yaml:"coding-model" env:"CODING_MODEL"`
131133
}
132134

133135
// Model represents the LLM model used in the API call.

internal/options/config_template.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ auto-coder:
6060
edit-format: diff
6161
commit-prefix: auto-coder
6262
auto-commit: true
63+
# Model for design phase (defaults to main model if empty)
64+
design-model: ""
65+
# Model for coding phase (defaults to main model if empty)
66+
coding-model: ""
6367
# {{ index .Help "apis" }}
6468
apis:
6569
openai:

internal/util/debug/assert.go

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)