Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/docs/general/03-Element Selection/aielement.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,46 @@ AskUI-RemoveAIElement -NameFilter "logo" -AutoApproval
# Opens all AI Elements with the name 'logo'
AskUI-OpenAIElement -NameFilter "logo"
```

## Using AI Elements with Git

AI Elements can be version controlled and shared across team members using Git. Here's how to set it up:

### Current Behavior
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think

Suggested change
### Current Behavior
### Default Behavior

would be clearer

By default, AI Elements are stored in the Global AI Element Location under `~/.askui/SnippingTool/AIElement/<workspace-id>/`. This location is not version controlled by Git.

### Prerequisites
- Update askui to version 0.22.0 or higher:
```bash
npm install askui@latest
```

### Configuration Steps
1. Create a folder in your Git project called `<project>/ai-elements`
2. Update your `askui_example/helpers/askui-helper.ts`:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. Update your `askui_example/helpers/askui-helper.ts`:
2. Update your `<project>/helpers/askui-helper.ts`:


```typescript
beforeAll(async () => {
aui = await UiControlClient.build({
// ... existing configuration ...
aiElementArgs: {
additionalLocations: [
"./ai-elements/" // Add your local AI Element location here
]
}
});
});
```
Comment on lines +151 to +162
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would add more of the // ... existing configuration ... around the code to indicate everywhere where there may be other code and point out that the user has to find wherever UiControlClient.build is called and add it there


### Adding AI Elements to Git
1. Open `askui-shell`
2. Get the global AI Element location:
- Run `AskUI-ShowAIElement`
- Copy the path from the Image File
3. Open the path in File Explorer
4. Copy all files from the Global AI Element Location to your Project AI Element Location
5. Add and commit the files to Git
Comment on lines +165 to +171
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this would not be 100% clear to me as a user. I think adding example output of the command AskUI-ShowAIElement and maybe shell commands for copying or screenshots of file explorer may do some good so it is easier to follow.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes actually very true! I need to update this


### Current Limitations
- `AskUI-NewAIElement` command only stores elements in the Global AI Element Location. Manual copying is required
- `AskUI-*AIElement` commands are only compatible with the Global AI Element Location
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,46 @@ AskUI-RemoveAIElement -NameFilter "logo" -AutoApproval
# Opens all AI Elements with the name 'logo'
AskUI-OpenAIElement -NameFilter "logo"
```

## Using AI Elements with Git

AI Elements can be version controlled and shared across team members using Git. Here's how to set it up:

### Current Behavior
By default, AI Elements are stored in the Global AI Element Location under `~/.askui/SnippingTool/AIElement/<workspace-id>/`. This location is not version controlled by Git.

### Prerequisites
- Update askui to version 0.22.0 or higher:
```bash
npm install askui@latest
```

### Configuration Steps
1. Create a folder in your Git project called `<project>/ai-elements`
2. Update your `askui_example/helpers/askui-helper.ts`:

```typescript
beforeAll(async () => {
aui = await UiControlClient.build({
// ... existing configuration ...
aiElementArgs: {
additionalLocations: [
"./ai-elements/" // Add your local AI Element location here
]
}
});
});
```

### Adding AI Elements to Git
1. Open `askui-shell`
2. Get the global AI Element location:
- Run `AskUI-ShowAIElement`
- Copy the path from the Image File
3. Open the path in File Explorer
4. Copy all files from the Global AI Element Location to your Project AI Element Location
5. Add and commit the files to Git

### Current Limitations
- `AskUI-NewAIElement` command only stores elements in the Global AI Element Location. Manual copying is required
- `AskUI-*AIElement` commands are only compatible with the Global AI Element Location