Ask the daemon as the prompt hook does, until it answers: one still opening its index says it is busy.
(root: string)
| 170 | |
| 171 | /** Ask the daemon as the prompt hook does, until it answers: one still opening its index says it is busy. */ |
| 172 | async function askAsTheHook(root: string): Promise<DaemonExplore> { |
| 173 | const deadline = Date.now() + 30_000; |
| 174 | for (;;) { |
| 175 | const answer = await exploreViaDaemon(root, 'how does placeOrder work', 15_000); |
| 176 | if (answer.status !== 'unavailable' || Date.now() > deadline) return answer; |
| 177 | await new Promise((resolve) => setTimeout(resolve, 200)); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | describe.runIf(POSIX)('the prompt hook reaches the daemon of a project whose folder others can write to (#3417)', () => { |
| 182 | it('reaches it on the temp-directory socket when .codegraph/ is group-writable', async () => { |
no test coverage detected