Skip to content

Commit c488a55

Browse files
committed
feat: fix animation issue for sourcegraph -amp
1 parent 809e506 commit c488a55

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

chat/src/components/message-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default function MessageList({ messages }: MessageListProps) {
127127
{message.role !== "user" && message.content === "" ? (
128128
<LoadingDots />
129129
) : (
130-
message.content.trim()
130+
message.content.trimEnd()
131131
)}
132132
</div>
133133
</div>

lib/httpapi/setup.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ func SetupProcess(ctx context.Context, config SetupProcessConfig) (*termexec.Pro
3636
os.Exit(1)
3737
}
3838

39+
// Hack for sourcegraph amp to stop the animation.
40+
_, err = process.Write([]byte(" \b"))
41+
if err != nil {
42+
return nil, err
43+
}
44+
3945
// Handle SIGINT (Ctrl+C) and send it to the process
4046
signalCh := make(chan os.Signal, 1)
4147
signal.Notify(signalCh, os.Interrupt, syscall.SIGTERM)

0 commit comments

Comments
 (0)