Fixed garbage collection of aborted tasks; handle if run from root directory then don’t read/write; fixed scroll to bottom; fix other small bugs

This commit is contained in:
Saoud Rizwan
2024-07-09 23:44:20 -04:00
parent 9867a6a597
commit 7170d2a2e8
8 changed files with 101 additions and 26 deletions

View File

@@ -256,7 +256,6 @@ const ChatRow: React.FC<ChatRowProps> = ({ message }) => {
<CodeBlock
code={output}
language="shell-session"
path="src/components/WelcomeView.tsx/src/components/WelcomeView.tsx"
/>
</>
)}
@@ -295,19 +294,24 @@ const ChatRow: React.FC<ChatRowProps> = ({ message }) => {
}
}
// we need to return null here instead of in getContent since that way would result in padding being applied
if (message.say === "api_req_finished") {
return null // Don't render anything for this message type
}
if (message.type === "ask" && message.ask === "completion_result" && message.text === "") {
return null // Don't render anything for this message type
}
return (
<div
style={{
padding: "10px 5px 10px 20px",
padding: "10px 20px 10px 20px",
}}>
{renderContent()}
{isExpanded && message.say === "api_req_started" && (
<div style={{ marginTop: "10px" }}>
<CodeBlock code={JSON.stringify(JSON.parse(message.text || "{}").request)} language="json" />
<CodeBlock code={JSON.stringify(JSON.parse(message.text || "{}").request, null, 2)} language="json" />
</div>
)}
</div>