Conversation
|
| args[10] = false // startTask | ||
| const instance = new Cline(...args) | ||
|
|
||
| let task | ||
|
|
||
| if (args[6] || args[7]) { | ||
| task = instance.startTask(args[6], args[7]) | ||
| } else if (args[8]) { |
There was a problem hiding this comment.
These hardcoded indexes feel pretty fragile / easy for us to forget about next time we add a param to the constructor. Think there's anything we could do to keep them in sync? Maybe a comment at the very least?
There was a problem hiding this comment.
The "right" solution seems like using an actual type. I can do that as a follow-up right now; most of the new Cline() calls are in tests so it should be pretty safe.
There was a problem hiding this comment.
Also, this is only used by tests at the moment, so I don't think we're risking breaking much in the meantime.
Description
We need a way to await Cline tasks and abort them when necessary for our tests.
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Enhances
Clineclass with task initialization and abandonment handling, updates tests for image handling and API retries, and removes a test timeout.create()method toClinefor task initialization, allowing tasks to be started without immediately executing them.abortTask()to handleisAbandonedparameter, marking tasks as abandoned.startTaskflag.Cline.test.tsto useCline.create()for task initialization.Cline.test.ts.Cline.test.ts.applyGitFallbacktests inedit-strategies.test.ts.This description was created by
for 40a86b1. It will automatically update as commits are pushed.