This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-07 00:59:19 -05:00
1 parent feb27a682f
commit 1b9a346991
3 files changed
+3 -11

No files matched your search

@@ -939,7 +939,7 @@
}
});
const slashCommandQuery = $derived(inputText.trim().toLowerCase());
const slashCommandQuery = $derived(inputText.trimStart().toLowerCase());
const slashCommandIds = $derived.by(() => {
if (!slashCommandQuery.startsWith('/')) return [];
const ids: string[] = [];
@@ -979,7 +979,7 @@
$effect(() => {
const query = slashCommandQuery;
const requestId = ++slashSkillsRequestId;
if (!query.startsWith('/') || !workspace) {
if (!query.startsWith('/') || /\s/.test(query.slice(1)) || !workspace) {
slashSkillSuggestions = [];
return;
}
@@ -299,9 +299,7 @@
const streaming = $derived(allMessages.some((m) => m.role === 'assistant' && !m.done));
const isLanding = $derived(allMessages.length === 0 && !chatId);
const hasChatContent = $derived(
activePath.some(
({ msg }) => msg.role === 'user' && msg.content.trim() && !msg.content.trim().startsWith('/')
)
activePath.some(({ msg }) => msg.role === 'user' && msg.content.trim())
);
const workspaceDisplayName = $derived(getPathDisplayName(workspace, 'workspace'));
const displayChatTitle = $derived(chatTitle || firstUserMessageTitle() || workspaceDisplayName);
@@ -722,10 +720,6 @@
let text = inputText.trim();
if (!text || !selectedModel) return;
if (sending) return;
if (!hasChatContent && text.startsWith('/') && text !== '/plan') {
toast.error('Only /plan is available before this chat has content');
return;
}
if (hasChatContent && text === '/compact') {
await handleManualCompact();
return;
-2
View File
@@ -172,8 +172,6 @@ def _build_skill_create_prompt(user_request: str) -> str:
def _message_has_real_content(message: dict) -> bool:
text = _plain_message_text(message.get("content")).strip()
if message.get("role") == "user" and text.startswith("/"):
return False
return bool(
text or message.get("tool_calls") or message.get("reasoning_items") or message.get("output")
)