You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using hook in a component useEffect(() => {...}, []) but the hook is executed before the component is finished rendering. Any way to trigger a function when the component is finished rendering?
The text was updated successfully, but these errors were encountered:
I am building an AI copilot for CLI. (similar to this but open sourced).
The user types a prompt, when the command is generated, the user can decide to execute the command or do some other actions. If the user decide to execute the command, I want to leave a final message before the command is executed so the user can scroll back and find useful information. Basically like this:
Before execution
Prompt: list all files
Generation: ls
> (1) execute
(2) edit
(3) discard
After execution
Prompt: list all files
Executed Command: ls
Execution Result:
- file 1
- file 2
...
So I want to execute the command with spawn only when the final message is finished rendering by ink
I tried using hook in a component
useEffect(() => {...}, [])
but the hook is executed before the component is finished rendering. Any way to trigger a function when the component is finished rendering?The text was updated successfully, but these errors were encountered: