Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ export default function EditEmbedModal({ embed, closeModal }) {
hint="Allow setting of the system prompt to override the workspace default."
defaultValue={embed.allow_prompt_override}
/>
<BooleanInput
name="allow_agent"
title="Enable Agent Support"
hint="Allow users to invoke AI agents using @agent commands."
defaultValue={embed.allow_agent}
/>

{error && <p className="text-red-400 text-sm">Error: {error}</p>}
<p className="text-white text-opacity-60 text-xs md:text-sm">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,17 @@ export default function EmbedRow({ embed }) {
href={paths.workspace.chat(embed.workspace.slug)}
target="_blank"
rel="noreferrer"
className="text-white flex items-center hover:underline"
className="text-white flex items-center hover:underline gap-x-2"
>
{embed.workspace.name}
{embed.allow_agent && (
<span
className="inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 border border-green-200"
title="Agent support enabled"
>
@
</span>
)}
</a>
</th>
<th scope="row" className="px-6 whitespace-nowrap">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function enforceSubmissionSchema(form) {
data.allow_temperature_override = false;
if (!data.hasOwnProperty("allow_prompt_override"))
data.allow_prompt_override = false;
if (!data.hasOwnProperty("allow_agent"))
data.allow_agent = false;
if (!data.hasOwnProperty("message_limit")) data.message_limit = 20;
return data;
}
Expand Down Expand Up @@ -91,6 +93,11 @@ export default function NewEmbedModal({ closeModal }) {
title="Enable Prompt Override"
hint="Allow setting of the system prompt to override the workspace default."
/>
<BooleanInput
name="allow_agent"
title="Enable Agent Support"
hint="Allow users to invoke AI agents using @agent commands. Requires the workspace to have agents configured."
/>

{error && <p className="text-red-400 text-sm">Error: {error}</p>}
<p className="text-white text-opacity-60 text-xs md:text-sm">
Expand Down Expand Up @@ -354,7 +361,7 @@ export const BooleanInput = ({ name, title, hint, defaultValue = null }) => {
<input
name={name}
type="checkbox"
onClick={() => setStatus(!status)}
onChange={() => setStatus(!status)}
checked={status}
className="peer sr-only pointer-events-none"
/>
Expand Down
Loading