Skip to content

Commit

Permalink
chore: merge develop back into main (#148)
Browse files Browse the repository at this point in the history
* chore: replaced property decorator for state where boolean

* chore: update the import

* chore: update vite config

* chore: create a barrel for all exports

* chore: add a teaser type

* chore: add a barrel for core modules

* chore: update global config according to teaser type

* chore: move teaserlist styles to own file

* chore: rename main styles import to chat

* chore: remove default questions from main component

* chore: create teaserlist component

* chore: handle teaser click event on teaserlist

* chore: handle teaserlist click on chat component

* chore: remove debugging statements

* chore: add tab component

* chore: add tab component styles

* chore: decouple tab component (thought process)

* chore: add tab component to bundle

* chore: change name of function to generic

* chore: update styles from main restyling

* chore: update styles for teaserlist

* chore: add event cancellation from main

* chore: add latest changes

* fix: merge conflicts on error styles

* chore: fix eslint errors

* chore: refactor voice input into it's own component

* chore: refactor tab component to be generic

* chore: refactor markdown preview to it's own component

* fix: fix follow up question click

* test: add test for followup questions

* test: iterate through all follow up questions

* chore: use the imports for lit elements

* feat: add support for pdf rendering in document-previewer

* chore: correct teaserlist filename

* chore: make tab content children of tab content

* chore: move citations to their own component

* chore: refactor the chat-thread-list into it's own component

* fix: correct the action button disable

* chore: refactor action buttons to it's own component

* fix: exported name for chat-action

* chore: delete old style file

* chore: run github actions on develop

* docs: update README.md with additional security measures

* fix: fix typo

Co-authored-by: Yohan Lasorsa <[email protected]>

* fix(indexer): incorrect path on Windows (#141)

* chore: cleanup unused webapp files.

* fix: show which citation is being viewed across the chat-threads.

* chore: refactor teaser list to be use passed in values

* chore: clean up the styles

* chore: cleanup tabs and teaser list

* chore: move type to dev dependency

* fix: use correct fields for developer settings

* fix: tests to work with the correct overrides

* fix: ask uses the prompt-template-* overrides only when it's not empty

---------

Co-authored-by: Shibani <[email protected]>
Co-authored-by: Shibani Basava (from Dev Box) <[email protected]>
Co-authored-by: Yohan Lasorsa <[email protected]>
  • Loading branch information
4 people authored Dec 4, 2023
1 parent 793314b commit 176f3b1
Show file tree
Hide file tree
Showing 57 changed files with 2,135 additions and 2,060 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/azure-dev-validation.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Validate AZD template
on:
push:
branches: [main]
branches: [main, develop]
paths:
- 'infra/**'
pull_request:
branches: [main]
branches: [main, develop]
paths:
- 'infra/**'

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/azure-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: Deploy on Azure
on:
workflow_dispatch:
push:
# Run when commits are pushed to mainline branch (main or master)
# Run when commits are pushed to mainline branch (main)
# Set this to the mainline branch you are using
branches:
- main
- master

# GitHub Actions workflow to deploy to Azure using azd
# To configure required secrets for connecting to Azure, simply run `azd pipeline config`
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Playwright Tests
on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]
branches: [main, develop]
jobs:
test:
timeout-minutes: 60
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ To then limit access to a specific set of users or groups, you can follow the st

### Additional security considerations

We recommend deploying additional security mechanisms. When applicable, consider setting up a [VNet](https://learn.microsoft.com/azure/virtual-network/virtual-networks-overview) or setting up a [Proxy Policy](https://learn.microsoft.com/azure/api-management/proxy-policy).
We recommend deploying additional security mechanisms. When applicable, consider setting up a [VNet](https://learn.microsoft.com/azure/virtual-network/virtual-networks-overview) or setting up a [Proxy Policy](https://learn.microsoft.com/en-us/azure/api-management/proxy-policy).

### Enabling CORS for an alternate frontend

Expand Down
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/chat-component/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ <h1>Welcome to this Azure OpenAI JavaScript Chat Sample</h1>
}
}
</style>
<script type="module" src="/src/main.ts"></script>
<script type="module" src="/src/index.ts"></script>
</body>
</html>
1 change: 1 addition & 0 deletions packages/chat-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"marked": "^9.1.5"
},
"devDependencies": {
"@types/dom-speech-recognition": "^0.0.4",
"@types/dompurify": "^3.0.3",
"rimraf": "^5.0.1",
"typescript": "^5.2.2",
Expand Down
41 changes: 41 additions & 0 deletions packages/chat-component/src/components/chat-action-button.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { LitElement, html } from 'lit';
import { customElement, property } from 'lit/decorators.js';

import { styles } from '../styles/chat-action-button.js';
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';

export interface ChatActionButton {
label: string;
svgIcon: string;
isDisabled: boolean;
id: string;
}

@customElement('chat-action-button')
export class ChatActionButtonComponent extends LitElement {
static override styles = [styles];

@property({ type: String })
label = '';

@property({ type: String })
svgIcon = '';

@property({ type: Boolean })
isDisabled = false;

@property({ type: String })
actionId = '';

@property({ type: String })
tooltip: string | undefined = undefined;

override render() {
return html`
<button title="${this.label}" data-testid="${this.actionId}" ?disabled="${this.isDisabled}">
<span>${this.tooltip ?? this.label}</span>
${unsafeSVG(this.svgIcon)}
</button>
`;
}
}
Loading

0 comments on commit 176f3b1

Please sign in to comment.