Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Replay mode #9

Merged
merged 8 commits into from
May 24, 2024
Merged

Replay mode #9

merged 8 commits into from
May 24, 2024

Conversation

franktip
Copy link
Collaborator

@franktip franktip commented May 2, 2024

Adding a replay mode to LLMorpheus to make it possible to replay executions. Documentation has been updated and a test has been added.

Copy link
Collaborator

@max-schaefer max-schaefer left a comment

Choose a reason for hiding this comment

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

I don't know the code very well, but at a high level this looks fine.

I do wonder about all the stuff in test/input, though. For example, do we really want to check in a copy of the source code of zip-a-folder? Wouldn't it be better to check it out from its own repo on demand?

README.md Outdated Show resolved Hide resolved
@@ -7,6 +7,7 @@ import { Prompt } from "../prompt/Prompt";
import { PromptSpec } from "../prompt/PromptSpec";
import { SourceLocation } from "../util/SourceLocation";
import { charAtPosition, nextPosition, prevPosition } from "../util/code-utils";
import { Completion } from "../prompt/Completion";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this import?

src/model/ReplayModel.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@jon-bell jon-bell left a comment

Choose a reason for hiding this comment

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

I don't know the code very well, but at a high level this looks fine.

I do wonder about all the stuff in test/input, though. For example, do we really want to check in a copy of the source code of zip-a-folder? Wouldn't it be better to check it out from its own repo on demand?

This is probably better from a flakiness perspective (you don't want your tests to start to fail when the repo goes away or the commit you used is deleted, which does sometimes happen....). Agreed that including the project in the repo is a bit weird, though - the only better solution that I would suggest is creating a small testing project with a few tests just for this purpose, and including that in the repo.

franktip and others added 2 commits May 3, 2024 08:04
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
@franktip
Copy link
Collaborator Author

franktip commented May 3, 2024

I agree with your comments about not including zip-a-folder's source and that it's better to avoid the potential flakiness associated with downloading it as the tests run. I will work on replacing zip-a-folder with a small test project. Thanks!

@franktip
Copy link
Collaborator Author

I rewrote the test to use a simple example project and removed the dependence on zip-a-folder. I also rewrote several other tests to avoid a dependency on other projects. Please let me know if you have any further comments.

@jon-bell
Copy link
Collaborator

LGTM

@franktip franktip merged commit 833be19 into main May 24, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants