Repository navigation
Commit e70a018
fix(perf): skip models.dev refresh when running as attach client
When using `opencode attach` to connect to an already running server,
the client was still performing a models.dev refresh on every connection,
causing ~1 second delay. The server already has models cached, so the
attach client doesn't need to fetch them.
This change detects attach mode by checking process.argv and skips the
automatic refresh, reducing attach startup time from ~1.2s to <100ms.
Fixes anomalyco#10781
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 213c0e1 commit e70a018
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
0 commit comments