Improvem tool names for options and config

This commit is contained in:
Siddharth Ganesan
2026-01-13 10:32:15 -08:00
parent 2c250edb6a
commit f2a9bf49d5
4 changed files with 12 additions and 6 deletions

View File

@@ -16,12 +16,12 @@ import type { useMentionMenu } from '../../hooks/use-mention-menu'
* Top-level slash command options
*/
const TOP_LEVEL_COMMANDS = [
{ id: 'fast', label: 'fast' },
{ id: 'plan', label: 'plan' },
{ id: 'debug', label: 'debug' },
{ id: 'fast', label: 'fast' },
{ id: 'superagent', label: 'superagent' },
{ id: 'deploy', label: 'deploy' },
{ id: 'research', label: 'research' },
{ id: 'deploy', label: 'deploy' },
{ id: 'superagent', label: 'superagent' },
] as const
/**

View File

@@ -413,7 +413,7 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
// Arrow navigation in slash menu
if (showSlashMenu) {
const TOP_LEVEL_COMMANDS = ['plan', 'debug', 'fast', 'superagent', 'deploy', 'research']
const TOP_LEVEL_COMMANDS = ['fast', 'plan', 'debug', 'research', 'deploy', 'superagent']
const WEB_COMMANDS = ['search', 'read', 'scrape', 'crawl']
const ALL_COMMANDS = [...TOP_LEVEL_COMMANDS, ...WEB_COMMANDS]

View File

@@ -1,5 +1,6 @@
import { createLogger } from '@sim/logger'
import { FileCode, Loader2, MinusCircle, XCircle } from 'lucide-react'
import { getBlock } from '@/blocks/registry'
import {
BaseClientTool,
type BaseClientToolMetadata,
@@ -39,7 +40,9 @@ export class GetBlockConfigClientTool extends BaseClientTool {
},
getDynamicText: (params, state) => {
if (params?.blockType && typeof params.blockType === 'string') {
const blockName = params.blockType.replace(/_/g, ' ')
// Look up the block config to get the human-readable name
const blockConfig = getBlock(params.blockType)
const blockName = (blockConfig?.name ?? params.blockType.replace(/_/g, ' ')).toLowerCase()
const opSuffix = params.operation ? ` (${params.operation})` : ''
switch (state) {

View File

@@ -1,5 +1,6 @@
import { createLogger } from '@sim/logger'
import { ListFilter, Loader2, MinusCircle, XCircle } from 'lucide-react'
import { getBlock } from '@/blocks/registry'
import {
BaseClientTool,
type BaseClientToolMetadata,
@@ -37,7 +38,9 @@ export class GetBlockOptionsClientTool extends BaseClientTool {
},
getDynamicText: (params, state) => {
if (params?.blockId && typeof params.blockId === 'string') {
const blockName = params.blockId.replace(/_/g, ' ')
// Look up the block config to get the human-readable name
const blockConfig = getBlock(params.blockId)
const blockName = (blockConfig?.name ?? params.blockId.replace(/_/g, ' ')).toLowerCase()
switch (state) {
case ClientToolCallState.success: