feat: per-agent tools toggle and better python scratchpad
Add ToolSelector for enabling sandboxed python per agent, drop unsafe filesystem/bash tools, bundle fetchUrl with web search, and return Monty's last expression value so agents need not print.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
python: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:python': [value: boolean];
|
||||
}>();
|
||||
|
||||
const anyEnabled = computed(() => props.python);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Dropdown dropdownClass="text-sm" placement="top">
|
||||
<template #default="{ toggle, setRef }">
|
||||
<button :ref="setRef" @click="toggle"
|
||||
class="flex items-center justify-center h-8.5 w-8.5 @hover:bg-[var(--color-hover)] rounded-lg transition-colors duration-200 ease-[cubic-bezier(0.5,_1,_0.89,_1)]">
|
||||
<span class="pointer-events-none i-mynaui-archive text-5 transition-colors duration-200"
|
||||
:class="anyEnabled ? 'text-[var(--color-accent)]' : 'text-[var(--text-secondary)]'"></span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<template #dropdown>
|
||||
<div class="flex flex-col gap-1 p-1 min-w-48">
|
||||
<label
|
||||
class="flex items-start gap-3 rounded-xl px-3 py-2.5 text-left cursor-pointer transition-colors duration-150 @hover:bg-[var(--color-hover)]"
|
||||
:class="python ? 'bg-[var(--color-active)]' : ''">
|
||||
<input type="checkbox" :checked="python"
|
||||
@change="emit('update:python', ($event.target as HTMLInputElement).checked)"
|
||||
class="mt-0.5 w-4 h-4 rounded border-[var(--color-border)] bg-transparent text-[var(--color-accent)] focus:ring-[var(--color-accent)] focus:ring-offset-0 cursor-pointer shrink-0" />
|
||||
<div class="flex flex-col gap-0.5">
|
||||
<span class="text-sm font-medium"
|
||||
:class="python ? 'text-[var(--text-primary)]' : 'text-[var(--text-secondary)]'">
|
||||
Python
|
||||
</span>
|
||||
<span class="text-xs leading-snug"
|
||||
:class="python ? 'text-[var(--text-secondary)]' : 'text-[var(--text-dim)]'">
|
||||
Run code in a sandbox
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
</Dropdown>
|
||||
</template>
|
||||
Reference in New Issue
Block a user