Skip to content

Conversation

@thedadams
Copy link
Contributor

No description provided.

function RunFile() {
const [script, _setScript] = useState<string>(
useSearchParams().get('file') ?? tildy
useSearchParams().get('file') ?? ''
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this is really all I wanted to do. However, this caused a bunch of errors to start popping up on launch, staring with the getMe stuff.

Most of the other changes are resolving the errors that popped up as a result.

setThread(newThread.meta.id);
setSelectedThreadId(newThread.meta.id);
setWorkspaceDir(newThread.meta.workspace);
setWorkspaceDir(newThread.meta.workspace).then();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm what is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove. This was just a to get rid of a squiggly line that was bothering me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

const newThread = await createThread(
script,
scriptDisplayName ?? defaultScriptName,
script !== '' ? script : tildy,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be script ? script : tildy? Are you specifially checking undefined option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@ryanhopperlowe ryanhopperlowe Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's already merged, but a slightly better solution could be script || tildy. in JavaScript '' is a falsy value

No need for change though

Signed-off-by: Donnie Adams <donnie@acorn.io>
@thedadams thedadams merged commit 4a596e3 into gptscript-ai:main Aug 28, 2024
@thedadams thedadams deleted the stop-flashing-tildy branch August 28, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants