ztjhz / BetterChatGPT

An amazing UI for OpenAI's ChatGPT (Website + Windows + MacOS + Linux)
http://bettergpt.chat/
Creative Commons Zero v1.0 Universal
8.19k stars 2.77k forks source link

Smooth chat streaming output #510

Open guolinke opened 11 months ago

mariodian commented 6 months ago

This won't build because types are missing.

src/hooks/useSubmit.ts:103:11 - error TS7034: Variable 'messageQueue' implicitly has type 'any[]' in some locations where its type cannot be determined.

103       let messageQueue = [];
              ~~~~~~~~~~~~

src/hooks/useSubmit.ts:108:34 - error TS7005: Variable 'messageQueue' implicitly has an 'any[]' type.

108             let messageContent = messageQueue.shift();
                                     ~~~~~~~~~~~~

src/hooks/useSubmit.ts:130:33 - error TS7006: Parameter 'stream' implicitly has an 'any' type.

130       async function readStream(stream) {
                                    ~~~~~~

Found 3 errors in the same file, starting at: src/hooks/useSubmit.ts:103
animalnots commented 5 months ago

Great idea! It's definitely smoother, but there is still some room for improvement to match the fluidity of ChatGPT.