mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 06:50:26 +00:00
chore: cleanup
This commit is contained in:
parent
8ce0966987
commit
ed96ae9d45
4 changed files with 2 additions and 19 deletions
|
|
@ -414,7 +414,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|||
const rawText = rawParts.map((p) => ("content" in p ? p.content : "")).join("")
|
||||
|
||||
const atMatch = rawText.substring(0, cursorPosition).match(/@(\S*)$/)
|
||||
// Slash commands only trigger when / is at the start of input
|
||||
const slashMatch = rawText.match(/^\/(\S*)$/)
|
||||
|
||||
if (atMatch) {
|
||||
|
|
@ -675,7 +674,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|||
|
||||
if (text.startsWith("/")) {
|
||||
const [cmdName, ...args] = text.split(" ")
|
||||
const commandName = cmdName.slice(1) // Remove leading "/"
|
||||
const commandName = cmdName.slice(1)
|
||||
const customCommand = sync.data.command.find((c) => c.name === commandName)
|
||||
if (customCommand) {
|
||||
sdk.client.session.command({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue