-
Notifications
You must be signed in to change notification settings - Fork 16
Support multiple deployments #222
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
Merged
Merged
Conversation
This file contains hidden or 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
7c484d8
to
429e7a4
Compare
Mostly trying to reduce the direct uses of the local model in favor of passing in arguments so they will be easier to test (specifically askToken is pure now). Mention use of the local model in the functions where that is the case and where they use the model I use it for all things (rather than just the URL but pass in the token for example) since everything we need is already in the model. Also rename/suffix some functions to/with connect to match the button. Remove the progress updates to the indicator since they are indeterminate.
This also lets us set a custom environment variable to track JetBrains sessions.
429e7a4
to
9eaeb0f
Compare
Currently if you launch the Coder plugin from Gateway and it automatically picks up a token from the config or from your last launch but it is invalid it will open a browser window for a new token which I think could be jarring. We should only open a browser window when the user explicitly wants that by pressing connect for example.
Wide enough to see the whole token at once.
d8530c8
to
59527b0
Compare
johnstcn
reviewed
Apr 17, 2023
Also add trailing newline when appending to file. Just a bit nicer, for example when you cat the file. If we are replacing a block at the end and there is no newline then we will preserve that; no newlines are added when replacing.
6acdc94
to
a631a4e
Compare
johnstcn
reviewed
Apr 18, 2023
Comment on lines
+353
to
+365
workspaces | input | output | remove | ||
["foo", "bar"] | null | "multiple-workspaces" | "blank" | ||
["foo-bar"] | "blank" | "append-blank" | "blank" | ||
["foo-bar"] | "blank-newlines" | "append-blank-newlines" | "blank" | ||
["foo-bar"] | "existing-end" | "replace-end" | "no-blocks" | ||
["foo-bar"] | "existing-end-no-newline" | "replace-end-no-newline" | "no-blocks" | ||
["foo-bar"] | "existing-middle" | "replace-middle" | "no-blocks" | ||
["foo-bar"] | "existing-middle-and-unrelated" | "replace-middle-ignore-unrelated" | "no-related-blocks" | ||
["foo-bar"] | "existing-only" | "replace-only" | "blank" | ||
["foo-bar"] | "existing-start" | "replace-start" | "no-blocks" | ||
["foo-bar"] | "no-blocks" | "append-no-blocks" | "no-blocks" | ||
["foo-bar"] | "no-related-blocks" | "append-no-related-blocks" | "no-related-blocks" | ||
["foo-bar"] | "no-newline" | "append-no-newline" | "no-blocks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ 👨🍳 🤌
johnstcn
approved these changes
Apr 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This takes inspiration from the VS Code extension (use a prefix and write to the config file directly from the plugin).
I could see an argument being made that this functionality should really be in the Coder CLI itself but since the VS Code plugin already takes this route I went the same. I am open to doing it the other way though.
I tested connecting manually on Linux and Windows.