diff --git a/frontend/app/src/components/bots/BotMessageContext.svelte b/frontend/app/src/components/bots/BotMessageContext.svelte
index 32426f30aa..1c23532a2c 100644
--- a/frontend/app/src/components/bots/BotMessageContext.svelte
+++ b/frontend/app/src/components/bots/BotMessageContext.svelte
@@ -1,25 +1,35 @@
{#if first && !isProposal && !isPrize}
- {#if botContext !== undefined}
-
- {:else}
-
-
- {senderDisplayName}
-
-
- {#if sender !== undefined && multiUserChat}
-
-
-
-
- {/if}
-
- {/if}
+
+
+ {senderDisplayName}
+
+
+ {#if sender !== undefined && multiUserChat}
+
+
+
+
+ {/if}
+
{#if senderTyping}
@@ -804,10 +804,21 @@
}
}
+ .bot-context {
+ position: absolute;
+ top: -7px;
+ left: $avatar-width;
+
+ @include mobile() {
+ left: $avatar-width-mob;
+ }
+ }
+
.message {
display: flex;
justify-content: flex-start;
margin-bottom: $sp2;
+ position: relative;
.avatar-col {
flex: 0 0 $avatar-width;
@@ -862,6 +873,10 @@
border: var(--currentChat-msg-bd);
box-shadow: var(--currentChat-msg-sh);
+ &.bot {
+ margin-top: $sp4;
+ }
+
&.proposal {
max-width: 800px;
width: 100%;
diff --git a/frontend/openchat-agent/src/services/externalBot/externalBot.ts b/frontend/openchat-agent/src/services/externalBot/externalBot.ts
index ba83c5fec7..936967f486 100644
--- a/frontend/openchat-agent/src/services/externalBot/externalBot.ts
+++ b/frontend/openchat-agent/src/services/externalBot/externalBot.ts
@@ -17,8 +17,8 @@ const ApiBotResponse = Type.Union([
Success: Type.Object({
message: Type.Optional(
Type.Object({
- message_id: Type.String(),
- message_content: MessageContent,
+ id: Type.BigInt(),
+ content: MessageContent,
}),
),
}),
@@ -92,10 +92,10 @@ function externalBotResponse(value: ApiBotResponse): BotCommandResponse {
if ("Success" in value) {
return {
kind: "success",
- placeholder: mapOptional(value.Success.message, ({ message_id, message_content }) => {
+ placeholder: mapOptional(value.Success.message, ({ id, content }) => {
return {
- messageId: BigInt(message_id),
- messageContent: messageContent(message_content, ""),
+ messageId: BigInt(id),
+ messageContent: messageContent(content, ""),
};
}),
};