Skip to content
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

[WIP] Clean up unnecessary duplicate of aiconfig editor #705

Closed
wants to merge 8 commits into from
Closed

Conversation

@saqadri
Copy link
Contributor Author

saqadri commented Jan 2, 2024

Got the local editor running inside VSCode as a VSCode extension:

second_try_3.mov

Changes required are relatively minimal. Not planning to land this diff stack yet, mostly to show the experience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ignore changes in this directory. Mostly to understand how VSCode custom text editors work. Original sample: https://github.com/microsoft/vscode-extension-samples/tree/main/custom-editor-sample

@saqadri saqadri changed the title [WIP] Clean up unnecessary duplicate of aiconfig editor [WIP][donotland] Clean up unnecessary duplicate of aiconfig editor Jan 2, 2024
* - Loading scripts and styles in a custom editor.
* - Synchronizing changes between a text document and a custom editor.
*/
export class CatScratchEditorProvider
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 rename and clean up, but this is what instantiates the custom text editor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ignore this. This is just to set up a web view panel with React -- https://github.com/microsoft/vscode-webview-ui-toolkit-samples/tree/main/frameworks/hello-world-react-cra.

This can be safely deleted

Successfully loads the local editor as a VSCode webview
Now that our actual local-editor works, no need to use the sample webview-ui to test the extension
Get the aiconfig from the VSCode textdocument:

* The extension sends an `update` request to the webview when the TextDocument changes.

* The webview handles that by updating the state of the AIConfig, which will trigger a re-render.
Delete an older experiment of a vscode extension.

Main difference about this is it uses webpack for the build step but that's most likely unnecessary for our case.
Update content security policy to allow external images to render
@saqadri saqadri changed the title [WIP][donotland] Clean up unnecessary duplicate of aiconfig editor [WIP] Clean up unnecessary duplicate of aiconfig editor Jan 12, 2024
This was referenced Jan 29, 2024
Copy link
Contributor

@jonathanlastmileai jonathanlastmileai left a comment

Choose a reason for hiding this comment

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

We should delete if not needed, but can you rebase and if possible make minimal changes to do this? Thanks

@saqadri saqadri closed this Feb 21, 2024
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.

2 participants