diff --git a/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts b/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts index 2673c81bd..3502bb9df 100644 --- a/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts +++ b/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts @@ -15,6 +15,9 @@ export const SlashCommand = Node.create({ addOptions() { return { suggestion: { + allow: ({ editor }) => + // the first character is "/". we want to avoid slash commands when there is a space after it + editor.getText().at(1) !== " ", char: "/", pluginKey: new PluginKey(this.name), startOfLine: true, diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 0741903dc..7b05087d8 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -3,7 +3,7 @@ import { ChatBubbleOvalLeftIcon, } from "@heroicons/react/24/outline"; import { Editor, JSONContent } from "@tiptap/react"; -import { InputModifiers, ChatHistoryItem } from "core"; +import { ChatHistoryItem, InputModifiers } from "core"; import { renderChatMessage } from "core/util/messageContent"; import { useCallback, @@ -136,7 +136,6 @@ export function Chat() { !e.shiftKey ) { void dispatch(cancelStream()); - if (isInEdit) ideMessenger.post("rejectDiff", {}); } }; window.addEventListener("keydown", listener); diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 76c7b9410..8ede0e55f 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -291,6 +291,7 @@ export const sessionSlice = createSlice({ if (state.history.length < 2) { return; } + const lastUserOrToolIdx = findLastIndex( state.history, (item) => item.message.role === "tool" || item.message.role === "user", @@ -317,7 +318,14 @@ export const sessionSlice = createSlice({ } if (validAssistantMessageIdx === -1) { - state.history = state.history.slice(0, lastUserOrToolIdx + 1); + const lastMsg = state.history[lastUserOrToolIdx]; + const lastRole = lastMsg.message.role as "user" | "tool"; + if (lastRole === "user") { + state.mainEditorContentTrigger = lastMsg.editorState; + state.history = state.history.slice(0, lastUserOrToolIdx); + } else { + state.history = state.history.slice(0, lastUserOrToolIdx + 1); + } } else { state.history = state.history.slice(0, validAssistantMessageIdx + 1); } diff --git a/packages/shared-release.config.js b/packages/shared-release.config.js index a587ebbd0..8063d6937 100644 --- a/packages/shared-release.config.js +++ b/packages/shared-release.config.js @@ -21,14 +21,8 @@ export default function createReleaseConfig(packageName) { "@semantic-release/release-notes-generator", "@semantic-release/changelog", "@semantic-release/npm", - [ - "@semantic-release/git", - { - assets: ["CHANGELOG.md", "package.json"], - message: `chore(release): @continuedev/${packageName}@\${nextRelease.version} [skip ci]`, - }, - ], + // Removed @semantic-release/git plugin to avoid pushing to main "@semantic-release/github", ], }; -} +} \ No newline at end of file