Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Cleanup
Tomas Valentada52c1666698
diff --git a/components/Editor/extensions/SlashCommand/Item.tsx b/components/Editor/extensions/ContextAutocomplete/Item.tsxsimilarity index 100%rename from components/Editor/extensions/SlashCommand/Item.tsxrename to components/Editor/extensions/ContextAutocomplete/Item.tsxdiff --git a/components/Editor/extensions/SlashCommand/index.tsx b/components/Editor/extensions/ContextAutocomplete/index.tsxsimilarity index 94%rename from components/Editor/extensions/SlashCommand/index.tsxrename to components/Editor/extensions/ContextAutocomplete/index.tsxindex f02305b92..0c34529f4 100644--- a/components/Editor/extensions/SlashCommand/index.tsx+++ b/components/Editor/extensions/ContextAutocomplete/index.tsx@@ -49,7 +49,7 @@ const items: CommandItem[] = [...inlineContextItems.map(createCommandItem),]-const SlashCommand: CommandList = forwardRef(({+const ContextAutocomplete: CommandList = forwardRef(({editor,range,}, ref) => {@@ -124,6 +124,6 @@ const SlashCommand: CommandList = forwardRef(({)})-SlashCommand.displayName = 'SlashCommand'+ContextAutocomplete.displayName = 'ContextAutocomplete'-export default SlashCommand+export default ContextAutocompletediff --git a/editor/extensions/contextAutocomplete.ts b/editor/extensions/contextAutocomplete.tsnew file mode 100644index 000000000..e30e032dc--- /dev/null+++ b/editor/extensions/contextAutocomplete.ts@@ -0,0 +1,16 @@+import ContextAutocomplete from 'components/Editor/extensions/ContextAutocomplete'++import { Command } from './command'++const ContextAutocompleteName = 'contextAutocomplete'++export default Command(ContextAutocomplete)+ .extend({+ name: ContextAutocompleteName,+ })+ .configure({+ suggestion: {+ char: '/',+ startOfLine: false,+ },+ })diff --git a/editor/extensions/slashCommand.ts b/editor/extensions/slashCommand.tsdeleted file mode 100644index 9bd3ea0bc..000000000--- a/editor/extensions/slashCommand.ts+++ /dev/null@@ -1,16 +0,0 @@-import SlashCommand from 'components/Editor/extensions/SlashCommand'--import { Command } from './command'--const SlashCommandName = 'slashCommand'--export default Command(SlashCommand)- .extend({- name: SlashCommandName,- })- .configure({- suggestion: {- char: '/',- startOfLine: false,- },- })diff --git a/hooks/useDocEditor.ts b/hooks/useDocEditor.tsindex 788b0e203..0a093106e 100644--- a/hooks/useDocEditor.ts+++ b/hooks/useDocEditor.ts@@ -8,7 +8,7 @@ import { StarterKit } from '@tiptap/starter-kit'import Placeholder from '@tiptap/extension-placeholder'import { keymap } from 'prosemirror-keymap'-import SlashCommand from 'editor/extensions/slashCommand'+import ContextAutocomplete from 'editor/extensions/contextAutocomplete'const extensions = [StarterKit.configure({@@ -29,7 +29,7 @@ const extensions = [Placeholder.configure({placeholder: 'All You Need Is English',}),- SlashCommand,+ ContextAutocomplete,]const schema = getSchema(extensions)