Skip to content

Commit

Permalink
Fix: make sure script id is always set (#422)
Browse files Browse the repository at this point in the history
Signed-off-by: Daishan Peng <[email protected]>
  • Loading branch information
StrongMonkey authored Sep 4, 2024
1 parent 81ca1d7 commit 9d46166
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions components/chat/chatBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,11 @@ const ChatBar = ({
document.getElementById('chatInput')?.focus();
}
if (event.key === 'ArrowUp') {
event.preventDefault();
const catalogStart = document.getElementById(`catalog-item-0`);
if (commandsOpen) {
event.preventDefault();
commandsRef.current?.focusCommands();
} else if (catalogStart) {
event.preventDefault();
commandsRef.current?.focusCatalog();
} else {
setUserMessagesIndex((prevIndex) => {
Expand Down
2 changes: 1 addition & 1 deletion server/app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const mount = async (
// Here we need to pass a fake GPTSCRIPT_THREAD_ID so that knowledge tool doesn't error out. Because it will always look for GPTSCRIPT_THREAD_ID in the env
// It should not import anything from the env. This is the case where you chat in Edit Assistant page where thread is not enabled.
'GPTSCRIPT_THREAD_ID=' + (threadID ? threadID : '0'),
'GPTSCRIPT_SCRIPT_ID=' + scriptID,
'GPTSCRIPT_SCRIPT_ID=' + (scriptID ? scriptID : '0'),
],
};

Expand Down

0 comments on commit 9d46166

Please sign in to comment.