@@ -83,20 +83,25 @@ func (s *composeService) ensureModels(ctx context.Context, project *types.Projec
8383 config .Name = name
8484 }
8585 eg .Go (func () error {
86+ w := progress .ContextWriter (gctx )
8687 if ! slices .Contains (availableModels , config .Model ) {
87- err = s .pullModel (gctx , dockerModel , config , quietPull )
88+ err = s .pullModel (gctx , dockerModel , config , quietPull , w )
8889 if err != nil {
8990 return err
9091 }
9192 }
92- return s .configureModel (gctx , dockerModel , config )
93+ err = s .configureModel (gctx , dockerModel , config , w )
94+ if err != nil {
95+ return err
96+ }
97+ w .Event (progress .CreatedEvent (config .Name ))
98+ return nil
9399 })
94100 }
95101 return eg .Wait ()
96102}
97103
98- func (s * composeService ) pullModel (ctx context.Context , dockerModel * manager.Plugin , model types.ModelConfig , quietPull bool ) error {
99- w := progress .ContextWriter (ctx )
104+ func (s * composeService ) pullModel (ctx context.Context , dockerModel * manager.Plugin , model types.ModelConfig , quietPull bool , w progress.Writer ) error {
100105 w .Event (progress.Event {
101106 ID : model .Name ,
102107 Status : progress .Working ,
@@ -145,7 +150,12 @@ func (s *composeService) pullModel(ctx context.Context, dockerModel *manager.Plu
145150 return err
146151}
147152
148- func (s * composeService ) configureModel (ctx context.Context , dockerModel * manager.Plugin , config types.ModelConfig ) error {
153+ func (s * composeService ) configureModel (ctx context.Context , dockerModel * manager.Plugin , config types.ModelConfig , w progress.Writer ) error {
154+ w .Event (progress.Event {
155+ ID : config .Name ,
156+ Status : progress .Working ,
157+ Text : "Configuring" ,
158+ })
149159 // configure [--context-size=<n>] MODEL [-- <runtime-flags...>]
150160 args := []string {"configure" }
151161 if config .ContextSize > 0 {
0 commit comments