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

File navigaiton for aiconfig editor #168

Merged
merged 2 commits into from
Nov 27, 2023
Merged

File navigaiton for aiconfig editor #168

merged 2 commits into from
Nov 27, 2023

Conversation

suyoglastmileai
Copy link
Contributor

@suyoglastmileai suyoglastmileai commented Nov 10, 2023

@suyoglastmileai suyoglastmileai changed the title WIP File navigaiton for aiconfig editor File navigaiton for aiconfig editor Nov 10, 2023
@suyoglastmileai
Copy link
Contributor Author

Navigate from root directory (this is not currently configurable via CLI, but is good enough for testing)

AiconfigNavigation.mov

@suyoglastmileai suyoglastmileai marked this pull request as ready for review November 10, 2023 21:14
Copy link
Contributor

@rholinshead rholinshead left a comment

Choose a reason for hiding this comment

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

Accepting to unblock, just minor thing on excluding files from the response instead of showing & disabling them

console.log(res);
}, [path]);
const newFiles = res.files.map((file: EditorFile) => {
const disabled = !file.isDirectory && file.extension !== ".json";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably just filter these out from the response itself?

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 think it's useful to view the files otherwise people will get confused that the directories aren't showing everything

(file: EditorFile) => {
// If directory, then change path & also update the url route to add to history
// If random file, should not be able to select
// If aiconfig.json file, then open editor - can't actually detect yet, so will just try to parse
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, this is another place the load schema validation would help; #291

cli/aiconfig-editor/pages/api/files.ts Dismissed Show dismissed Hide dismissed
@suyoglastmileai suyoglastmileai merged commit a3fa3ea into main Nov 27, 2023
6 checks passed
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