Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not print [object Object] when enhancing prompt #132

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2806a65
Create bug_report.yml
apai4 Oct 3, 2024
4cf007b
fix: update README.md (#3)
samdenty Oct 3, 2024
dfebd40
Update README.md
kc0tlh Oct 3, 2024
3181d50
Update README.md
kc0tlh Oct 3, 2024
72df4b8
Update README.md
kc0tlh Oct 3, 2024
36f219f
Update README.md
kc0tlh Oct 3, 2024
84c5da8
Update README.md
kc0tlh Oct 3, 2024
dbef8c1
Create MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
efac3a7
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
bf65a7e
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
85d2b6f
feat: add readme image (#4)
samdenty Oct 3, 2024
5580ab9
fix: typo
samdenty Oct 3, 2024
14da2f0
fix: remove duplicated bug_report template
samdenty Oct 3, 2024
9a1ab23
fix: update links
samdenty Oct 3, 2024
8840d00
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
fc82dda
Rename README.md to CONTRIBUTING.md
kc0tlh Oct 3, 2024
292e923
Rename MAIN-FOLDER-README.md to README.md
kc0tlh Oct 3, 2024
c85fd80
Update README.md
kc0tlh Oct 3, 2024
506ed1d
Update CONTRIBUTING.md
kc0tlh Oct 3, 2024
aa6148f
Update CONTRIBUTING.md
kc0tlh Oct 3, 2024
537389e
Update README.md
kc0tlh Oct 3, 2024
6694e14
Update README.md (#7)
buntured Oct 3, 2024
f6d79c5
fix: add screen recordings section to bug_report.yml
samdenty Oct 3, 2024
6a9cb78
fix(browser-extensions): don't render directly in body
samdenty Oct 4, 2024
bfe7e12
fix: do not print [object Object] when enhancing prompt
yoelcabo Oct 7, 2024
3e4ba87
Create MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
0ec2c5e
feat: add readme image (#4)
samdenty Oct 3, 2024
ddf568f
fix: typo
samdenty Oct 3, 2024
aea23d3
fix: remove duplicated bug_report template
samdenty Oct 3, 2024
146b57b
fix: update links
samdenty Oct 3, 2024
2463498
Update MAIN-FOLDER-README.md
kc0tlh Oct 3, 2024
51928f6
Rename README.md to CONTRIBUTING.md
kc0tlh Oct 3, 2024
8dddc64
Rename MAIN-FOLDER-README.md to README.md
kc0tlh Oct 3, 2024
7908388
chore: update readme
kc0tlh Oct 3, 2024
34b3abb
chore: update contributing guide
kc0tlh Oct 3, 2024
4fcb108
chore: update contributing guide
kc0tlh Oct 3, 2024
a76dc50
chore: update readme
kc0tlh Oct 3, 2024
ec0d1f1
chore: update readme (#7)
buntured Oct 3, 2024
d656686
fix: add screen recordings section to bug_report.yml
samdenty Oct 3, 2024
3a0336e
fix(browser-extensions): don't render directly in body
samdenty Oct 4, 2024
5a600e5
Merge branch 'main' into fix/object-Object
d3lm Oct 7, 2024
35d9e82
Merge branch 'main' into fix/object-Object
d3lm Oct 7, 2024
7420bbb
Merge branch 'main' into fix/object-Object
samdenty Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app/routes/api.enhancer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {

const transformStream = new TransformStream({
transform(chunk, controller) {
const processedChunk = decoder
.decode(chunk)
.split('\n')
.filter((line) => line !== '')
.map(parseStreamPart)
.map((part) => part.value)
.join('');

controller.enqueue(encoder.encode(processedChunk));
const decodedChunk = decoder.decode(chunk);
const parts = decodedChunk.split('\n').filter((line) => line !== '');
for (const part of parts) {
const parsed = parseStreamPart(part);
if (parsed.type === 'text') {
controller.enqueue(encoder.encode(parsed.value));
}
// Non-text chunks are ignored
}
},
});

Expand Down