-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assistant Plus #1091
Draft
disconcision
wants to merge
24
commits into
dev
Choose a base branch
from
plus
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Assistant Plus #1091
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disconcision
added
assistant
Part of the Hazel Assistant project
in-development
for PRs that remain in development
labels
Aug 26, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
assistant
Part of the Hazel Assistant project
in-development
for PRs that remain in development
needs-merge
for PRs that need a merge from dev
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LLM completions Instructions:
(StoreKey "OpenAI" "<your-openai-key")
OR(StoreKey "AZURE4" "<your-azure-key")
in any editor, select it, then press Cmd/Ctrl-E, which will parse and execute the selection as an UpdateAction. Azure keys can be added similarly; see code.Partially complete features
Planning:
Rough Notes on syntax issues
from Form.re:
TODO(andrew): weird examples
insert '=' in 'let a><|!true' (get bad op '=!')
insert '-' in 1+|1 (get bad op '+-')
should we allow '=>' or '->' or '|' inside operators? currently implictly yes
from Molds.re
Maybe more advanced token allow logic:
Goal: Try to preserve the prefix-validity of tokens as much as possible
when inserting/deleting characters, but allow the creation of prefix-
invalid tokens as a fallthrough. Always be willing to split on insert
to maintain prefix-validity, but allow the creation of prefix-invalid
tokens for deletes which would otherwise be no-ops.
Or: if insert/delete results in a thing which is no longer a prefix
of a valid token, then we split it into the largest prefix of
a valid token and up to two more tokens; if there are two, one is
a single character (doesn't quite work for delete; we can't guarantee
the existence of such a split eg if lang consists of single "yo", deleting
the "y" leaves no possible prefixes)
for this to be nice if we could establish that the split
must always occur at the caret; otherwise it might be confusing.
precondition: caret is either inside a token, or between two tokens
any tokens are prefix-valid
insert between case: attempt to append to left, then the right, otherwise new
(so everything always prefix-valid)
insert inside case: attempt to insert. otherwise go to between case
(so everything always prefix-valid)
delete from right: can't effect prefix-validity
delete from left/inside: ??? allow create prefix-invalid ???
delete-merge (when delete an intervening seg, pushing two tokens together):
if the result is a valid token, great; otherwise ??? allow create prefix-invalid ???
from Select: (smart select)
Maybe a better logic for this: Next
reasonable enclosure. Define 'enclosures' of a token to
be terms and tiles that include that token. Then for a
given token, itsenclosures are totally ordered by inclusion.
Doubleclicking gives the minimum enclosure, triple-clicking
gives the second-most minimum enclosure, which will be
(check) either the current term, the parent tile, or the
parent term. But would need to be careful to force that
the original tile is included; e.g. in an Ap the parent
tile doesn't include the funpos.