Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix: update button click handler to include submit flag for composerFill

nirholasec69ee04c92a
diff --git a/chat/src/App.svelte b/chat/src/App.svelte
index 2fe71b13f..84f673762 100644
--- a/chat/src/App.svelte
+++ b/chat/src/App.svelte
@@ -1342,22 +1342,22 @@
data-sidebar="history"
class="{historyOpen
? ''
- : '-translate-x-full'} fixed top-0 z-[100] flex h-full w-[230px] flex-col border-r bg-white pl-3 pt-4 transition-transform duration-500 ease-in-out md:static md:translate-x-0"
+ : '-translate-x-full'} fixed top-0 z-[100] flex h-full w-[260px] flex-col border-r border-rule bg-paper pl-3 pt-4 transition-transform duration-500 ease-in-out md:static md:translate-x-0"
>
<div class="mb-1 pr-3">
<button
on:click={newConversation}
- class="flex w-full items-center rounded-[10px] border py-2.5 pl-3 pr-4 text-left text-sm font-medium hover:bg-gray-100"
+ class="manus-btn-primary flex w-full items-center justify-start gap-2 rounded-full px-4 py-2.5"
>
+ <span class="text-base font-medium leading-none">+</span>
New chat
- <Icon icon={feStar} strokeWidth={3} class="ml-auto h-3.5 w-3.5 text-slate-700" />
</button>
</div>
<ol
- class="flex list-none flex-col overflow-y-auto pb-3 pr-3 pt-5 scrollbar-invisible scrollbar-slim hover:scrollbar-white"
+ class="flex list-none flex-col overflow-y-auto pb-3 pr-3 pt-3 scrollbar-invisible scrollbar-slim hover:scrollbar-white"
>
{#each historyBuckets as { relativeDate, convos: historyConvos } (relativeDate)}
- <li class="mb-2 ml-3 text-xs font-medium text-slate-600 [&:not(:first-child)]:mt-6">
+ <li class="mb-1 ml-3 text-[11px] font-medium text-ink-soft [&:not(:first-child)]:mt-5">
{relativeDate}
</li>
{#each historyConvos as historyConvo (historyConvo.id)}
@@ -1379,8 +1379,8 @@
});
}}
class="{$convoId === historyConvo.id
- ? 'bg-gray-100'
- : ''} leading-0 w-full rounded-lg px-3 py-2 text-left text-sm group-hover:bg-gray-100"
+ ? 'bg-paper-deep'
+ : ''} flex h-9 w-full items-center rounded-md px-3 text-left text-sm text-ink hover:bg-paper-deep"
>
<span class="line-clamp-1">
{historyConvo.messages.length === 0
@@ -1408,12 +1408,12 @@
convos = convos;
deleteConversation(historyConvo);
}}
- class="z-1 absolute right-0 top-0 flex h-full w-12 rounded-br-lg rounded-tr-lg bg-gradient-to-l {$convoId ===
+ class="z-1 absolute right-0 top-0 flex h-full w-12 rounded-br-md rounded-tr-md bg-gradient-to-l {$convoId ===
historyConvo.id
- ? 'from-gray-100'
- : 'from-white group-hover:from-gray-100'} from-65% to-transparent pr-3 transition-opacity sm:from-gray-100 sm:opacity-0 sm:group-hover:opacity-100"
+ ? 'from-paper-deep'
+ : 'from-paper group-hover:from-paper-deep'} from-65% to-transparent pr-3 transition-opacity sm:from-paper-deep sm:opacity-0 sm:group-hover:opacity-100"
>
- <Icon icon={feTrash} class="m-auto mr-0 h-3 w-3 shrink-0 text-slate-700" />
+ <Icon icon={feTrash} class="m-auto mr-0 h-3 w-3 shrink-0 text-ink-soft" />
</button>
</li>
{/each}
@@ -1423,13 +1423,13 @@
<div class="settings-trigger-container -ml-3 mt-auto flex pb-3">
<button
data-trigger="settings"
- class="mx-3 flex flex-1 items-center gap-x-4 rounded-lg border border-slate-200 px-4 py-3 text-left text-sm font-medium hover:bg-gray-100"
+ class="mx-3 flex flex-1 items-center gap-x-4 rounded-lg border border-rule px-4 py-3 text-left text-sm font-medium hover:bg-paper-deep"
on:click={() => {
historyOpen = false;
}}
>
Settings
- <Icon icon={feSettings} class="ml-auto h-4 w-4 text-slate-700" />
+ <Icon icon={feSettings} class="ml-auto h-4 w-4 text-ink-soft" />
</button>
</div>
</aside>
@@ -1530,10 +1530,8 @@
}}
>
<ul
- class="{splitView
- ? 'rounded-br-lg border-r'
- : ''} mb-3 flex w-full !list-none flex-col divide-y divide-slate-200/50 border-b border-slate-200/50"
- >
+ class="max-w-[760px] mx-auto w-full px-6 !list-none flex flex-col {splitView ? 'rounded-br-lg border-r' : ''}"
+ >
{#each convo.messages as message, i (message.id)}
<Message
{message}
@@ -1563,6 +1561,7 @@
</ul>
</div>
+ <div class="pointer-events-none absolute bottom-[72px] inset-x-0 h-8 z-[98] bg-gradient-to-t from-paper to-transparent" />
<Composer
bind:generating
bind:convo
@@ -1730,4 +1729,12 @@
) {
@apply mb-0;
}
+
+ :global(.markdown.prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
+ @apply text-ink;
+ }
+
+ :global(.markdown.prose :where(pre):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
+ @apply bg-paper-deep border-rule;
+ }
</style>
diff --git a/chat/src/Input.svelte b/chat/src/Input.svelte
index 6189a1364..d1c23df0a 100644
--- a/chat/src/Input.svelte
+++ b/chat/src/Input.svelte
@@ -19,7 +19,8 @@
import { get } from 'svelte/store';
import { v4 as uuidv4 } from 'uuid';
import { readFileAsDataURL } from './util.js';
- import { anthropicAPIKey, controller, params, remoteServer, brandConfig, mode, composerFill, appPlatforms, designModel } from './stores.js';
+ import { anthropicAPIKey, controller, params, remoteServer, brandConfig, mode, composerFill, flowSecondary, appPlatforms, designModel } from './stores.js';
+ import { modeConfig } from './manus/flows/utilityFlowData.js';
import ToolPill from './ToolPill.svelte';
import ToolDropdown from './ToolDropdown.svelte';
import ModelSelector from './ModelSelector.svelte';
@@ -59,7 +60,10 @@
? 'Describe the app you want to build'
: $mode === 'design'
? 'Describe what you want to design'
- : 'Send a message…';
+ : ($mode && modeConfig[$mode]?.placeholder)
+ || 'Send a message…';
+
+ let secondaryOpen = null;
let designModelPickerOpen = false;
@@ -641,6 +645,47 @@ ${file.contents}
{/if}
</div>
{/if}
+ {#if $mode && modeConfig[$mode]}
+ {@const cfg = modeConfig[$mode]}
+ <button
+ class="manus-chip manus-chip-selected h-7 px-3 text-xs inline-flex items-center gap-1.5 shrink-0"
+ on:click={() => mode.set(null)}
+ >
+ <Icon icon={cfg.icon} class="w-3.5 h-3.5" />
+ {cfg.label}
+ </button>
+ {#if cfg.secondary}
+ {@const sec = cfg.secondary}
+ {@const currentVal = $flowSecondary[$mode] ?? sec.default}
+ <div class="relative">
+ <button
+ class="manus-chip h-7 px-3 text-xs inline-flex items-center gap-1.5 shrink-0"
+ on:click={() => { secondaryOpen = secondaryOpen === $mode ? null : $mode; }}
+ >
+ {sec.prefix}: {currentVal}
+ <Icon icon={feChevronDown} class="w-3 h-3" />
+ </button>
+ {#if secondaryOpen === $mode}
+ <button
+ class="fixed inset-0 z-20 cursor-default"
+ aria-hidden="true"
+ tabindex="-1"
+ on:click={() => (secondaryOpen = null)}
+ />
+ <div class="absolute left-0 bottom-full mb-2 bg-white border border-[#E5E3DC] rounded-xl shadow-pop z-30 min-w-[160px] py-1">
+ {#each sec.options as opt}
+ <button
+ class="block w-full px-4 py-2 text-sm text-left text-[#1A1A1A] hover:bg-[#F5F4EF] {currentVal === opt ? 'font-medium' : ''} first:rounded-t-xl last:rounded-b-xl"
+ on:click={() => { $flowSecondary = { ...$flowSecondary, [$mode]: opt }; secondaryOpen = null; }}
+ >
+ {opt}
+ </button>
+ {/each}
+ </div>
+ {/if}
+ </div>
+ {/if}
+ {/if}
<div id="tool-dropdown" class="contents">
<ToolPill icon={feTool} selected={toolsOpen} on:click={() => (toolsOpen = !toolsOpen)}>
Tools
diff --git a/chat/src/manus/Composer.svelte b/chat/src/manus/Composer.svelte
index fddffcd2c..7d002f602 100644
--- a/chat/src/manus/Composer.svelte
+++ b/chat/src/manus/Composer.svelte
@@ -276,8 +276,8 @@
}}
/>
-<div class="input-floating absolute bottom-4 left-1/2 z-[99] w-full -translate-x-1/2 px-5 ld:px-8">
- <div class="mx-auto flex w-full max-w-[680px] flex-col ld:max-w-[768px]">
+<div class="input-floating absolute bottom-4 left-1/2 z-[99] w-full -translate-x-1/2 px-6">
+ <div class="mx-auto flex w-full max-w-[760px] flex-col">
<!-- Composer card -->
<div
class="bg-white border border-[#E5E3DC] rounded-[20px] shadow-composer pt-5 px-5 pb-3"
diff --git a/chat/src/manus/EmptyState.svelte b/chat/src/manus/EmptyState.svelte
index da4cd1b98..a693bb91b 100644
--- a/chat/src/manus/EmptyState.svelte
+++ b/chat/src/manus/EmptyState.svelte
@@ -2,9 +2,10 @@
import { mode } from '../stores.js';
import SlidesFlow from './flows/SlidesFlow.svelte';
import DesignFlow from './flows/DesignFlow.svelte';
+ import UtilityFlows from './flows/UtilityFlows.svelte';
</script>
-<section class="w-full flex flex-col items-center px-6 pt-[18vh] md:pt-[22vh]">
+<section class="w-full flex flex-col items-center px-6 pt-[18vh] md:pt-[22vh] pb-32">
<h1 class="manus-hero text-center mb-9">What can I do for you?</h1>
<div class="w-full max-w-[760px]">
<slot name="composer" />
@@ -16,5 +17,9 @@
<SlidesFlow />
{:else if $mode === 'design'}
<DesignFlow />
+ {:else}
+ <div class="w-full max-w-[760px]">
+ <UtilityFlows />
+ </div>
{/if}
</section>
diff --git a/chat/src/manus/flows/SamplePromptGrid.svelte b/chat/src/manus/flows/SamplePromptGrid.svelte
index dbc1d4246..37c77eaa1 100644
--- a/chat/src/manus/flows/SamplePromptGrid.svelte
+++ b/chat/src/manus/flows/SamplePromptGrid.svelte
@@ -13,7 +13,7 @@
{#each prompts as prompt}
<button
class="relative bg-white border border-[#E5E3DC] rounded-xl p-4 h-[96px] text-left text-sm hover:bg-[#F5F4EF] transition-colors overflow-hidden"
- on:click={() => composerFill.set(prompt)}
+ on:click={() => composerFill.set({ text: prompt, submit: true })}
>
<span class="line-clamp-3 block pr-5">{prompt}</span>
<Icon
diff --git a/public/chat/index.html b/public/chat/index.html
index 86a388557..a821bbfdb 100644
--- a/public/chat/index.html
+++ b/public/chat/index.html
@@ -34,7 +34,7 @@
crossorigin="anonymous"
/>
<title>three.ws chat</title>
- <script type="module" crossorigin src="/chat/assets/index-qGh5zb5D.js"></script>
+ <script type="module" crossorigin src="/chat/assets/index-CsEUjPUW.js"></script>
<link rel="stylesheet" crossorigin href="/chat/assets/index-BBu-jFVK.css">
</head>
<body>