mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
fix: slash command does not work (#207)
This commit is contained in:
2
src/view/download/index.tsx
vendored
2
src/view/download/index.tsx
vendored
@@ -69,7 +69,6 @@ export default function Download() {
|
||||
const downloadDir = await path.join(await chatRoot(), 'download');
|
||||
await fs.removeDir(downloadDir, { recursive: true });
|
||||
await handleRefresh();
|
||||
rowReset();
|
||||
message.success('All files have been cleared!');
|
||||
return;
|
||||
}
|
||||
@@ -88,6 +87,7 @@ export default function Download() {
|
||||
|
||||
const handleRefresh = async () => {
|
||||
await invoke('download_list', { pathname: CHAT_DOWNLOAD_JSON, dir: 'download' });
|
||||
rowReset();
|
||||
const data = await refreshJson();
|
||||
opInit(data);
|
||||
};
|
||||
|
||||
3
src/view/notes/index.tsx
vendored
3
src/view/notes/index.tsx
vendored
@@ -65,7 +65,6 @@ export default function Notes() {
|
||||
const notesDir = await path.join(await chatRoot(), 'notes');
|
||||
await fs.removeDir(notesDir, { recursive: true });
|
||||
await handleRefresh();
|
||||
rowReset();
|
||||
message.success('All files have been cleared!');
|
||||
return;
|
||||
}
|
||||
@@ -83,6 +82,7 @@ export default function Notes() {
|
||||
|
||||
const handleRefresh = async () => {
|
||||
await invoke('download_list', { pathname: CHAT_NOTES_JSON, dir: 'notes' });
|
||||
rowReset();
|
||||
const data = await refreshJson();
|
||||
opInit(data);
|
||||
};
|
||||
@@ -135,6 +135,7 @@ export default function Notes() {
|
||||
>
|
||||
<ReactMarkdown
|
||||
children={source}
|
||||
linkTarget="_blank"
|
||||
components={{
|
||||
code({node, inline, className, children, ...props}) {
|
||||
const match = /language-(\w+)/.exec(className || '')
|
||||
|
||||
Reference in New Issue
Block a user