()
| 241 | Busy: c.busy.Load(), |
| 242 | Model: c.cfg.APIModel, |
| 243 | CWD: c.cfg.CWD, |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | func (c *SessionController) Submit(ctx context.Context, input string) error { |
| 248 | if strings.TrimSpace(input) == "" { |
| 249 | return errors.New("empty input") |
| 250 | } |
| 251 | if !c.busy.CompareAndSwap(false, true) { |
| 252 | return errors.New("session_busy") |
| 253 | } |
no test coverage detected