-
Notifications
You must be signed in to change notification settings - Fork 0
Initial commit, add base structure, vue frontend #1
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
Open
maxtaube
wants to merge
17
commits into
5.x-dev
Choose a base branch
from
ID-35-create-AIProviders-plugin
base: 5.x-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
24af743
Initial commit, add base structure, vue frontend
maxtaube a5289c9
update ui, extract vue component, extract types
maxtaube 72853c6
Add AI provider prompt completion, Add API and service methods
maxtaube 9b3bbb8
remove AIProviderException, add docs
maxtaube 96197b1
Add AIRequest object, rework provider completion API,
maxtaube ef60846
Add JSON response mode and managed provider safeguards
maxtaube 115519c
Support restricted AI providers and allowlisted provider selection
maxtaube dad8371
fix max tokens for openai
brenthoneybone 93b01b2
Add custom-endpoint model selection and rework connection testing
maxtaube 66e0559
Add multi-turn conversation API for AskMatomo compatibility
maxtaube 636957f
add thinking toggle support, ui fixes, use built-in headline componen…
maxtaube d100496
remove untracked files
maxtaube c8f618b
fix translation keys, remove unused keys, add debug meta logging in d…
maxtaube df04223
fix request timeout, return when provider not added, update tests, us…
maxtaube 7957c85
expose isManaged through service
brenthoneybone f94e483
add cd/cd test pipeline, add buildvue.yml, add eslintrc.js
maxtaube 673549f
fix return hints, remove json sanitization, fix css inconsistencies, …
maxtaube File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = { | ||
| rules: { | ||
| // This plugin's Vue SFCs use the `<script setup>`-first ordering | ||
| // (script before template), so the default tag-order check does not apply. | ||
| 'vue/component-tags-order': 'off', | ||
| }, | ||
| }; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| name: Vue build check | ||
|
|
||
| on: pull_request | ||
|
|
||
| permissions: | ||
| actions: read | ||
| checks: read | ||
| contents: read | ||
| deployments: none | ||
| issues: read | ||
| packages: none | ||
| pull-requests: read | ||
| repository-projects: none | ||
| security-events: none | ||
| statuses: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| PLUGIN_NAME: AIProviders | ||
|
|
||
| jobs: | ||
| buildvue: | ||
| name: Vue build check | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| lfs: false | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up PHP | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 | ||
| with: | ||
| php-version: '8.1' | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '16' | ||
|
|
||
| - name: Check out github-action-tests repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| repository: matomo-org/github-action-tests | ||
| ref: main | ||
| path: github-action-tests | ||
|
|
||
| - name: Check out Matomo for plugin builds | ||
| run: ${{ github.workspace }}/github-action-tests/scripts/bash/checkout_matomo.sh | ||
| env: | ||
| PLUGIN_NAME: ${{ env.PLUGIN_NAME }} | ||
| WORKSPACE: ${{ github.workspace }} | ||
| ACTION_PATH: ${{ github.workspace }}/github-action-tests | ||
| MATOMO_TEST_TARGET: maximum_supported_matomo | ||
|
|
||
| - name: Install Composer dependencies | ||
| run: composer install --ignore-platform-reqs --no-progress | ||
| working-directory: matomo | ||
|
|
||
| - name: Install npm dependencies | ||
| run: npm install --no-audit --no-fund | ||
| working-directory: matomo | ||
|
|
||
| - name: Write minimal Matomo config | ||
| run: | | ||
| cat <<'EOF' > config/config.ini.php | ||
| [General] | ||
| always_load_commands_from_plugin=CoreVue | ||
|
|
||
| [Development] | ||
| enabled = 1 | ||
| EOF | ||
| working-directory: matomo | ||
|
|
||
| - name: Build Vue artifacts | ||
| run: php ./console vue:build ${{ env.PLUGIN_NAME }} | ||
| working-directory: matomo | ||
|
|
||
| - name: Verify dist matches committed artifacts | ||
| run: | | ||
| # Replace the plugin checkout's dist with the freshly built one. | ||
| # rsync --delete picks up any tracked file the build no longer | ||
| # produces. | ||
| rsync -a --delete matomo/plugins/${{ env.PLUGIN_NAME }}/vue/dist/ vue/dist/ | ||
|
|
||
| # git respects .gitignore — generated artifacts the plugin | ||
| # intentionally ignores (e.g. *.map, *.common.js, | ||
| # *.development.*) won't be staged here, so they don't cause | ||
| # false-positive drift. | ||
| git add -A vue/dist/ | ||
|
|
||
| if ! git diff --cached --quiet -- vue/dist/; then | ||
| echo "::error::Vue dist files are out of date." | ||
| echo "" | ||
| echo "Drift summary:" | ||
| git diff --cached --stat -- vue/dist/ | ||
| echo "" | ||
| echo "Please run './console vue:build ${{ env.PLUGIN_NAME }}' locally and commit the resulting changes under vue/dist/." | ||
| exit 1 | ||
| fi | ||
| echo "Vue dist is up to date." |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Action for running tests | ||
| # This file has been automatically created. | ||
| # To recreate it you can run this command | ||
| # ./console generate:test-action --plugin="AIProviders" --php-versions="7.2,8.4" | ||
|
|
||
| name: Plugin AIProviders Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
| push: | ||
| branches: | ||
| - '**.x-dev' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| actions: read | ||
| checks: none | ||
| contents: read | ||
| deployments: none | ||
| issues: read | ||
| packages: none | ||
| pull-requests: read | ||
| repository-projects: none | ||
| security-events: none | ||
| statuses: none | ||
|
|
||
| concurrency: | ||
| group: php-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| PluginTests: | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php: [ '7.2', '8.4' ] | ||
| target: ['minimum_required_matomo', 'maximum_supported_matomo'] | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| lfs: true | ||
| persist-credentials: false | ||
| - name: Run tests | ||
| uses: matomo-org/github-action-tests@main | ||
| with: | ||
| plugin-name: 'AIProviders' | ||
| php-version: ${{ matrix.php }} | ||
| test-type: 'PluginTests' | ||
| matomo-test-branch: ${{ matrix.target }} | ||
| artifacts-pass: ${{ secrets.ARTIFACTS_PASS }} | ||
| upload-artifacts: ${{ matrix.php == '7.2' && matrix.target == 'maximum_supported_matomo' }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| .DS_Store | ||
| .idea/ | ||
| /node_modules | ||
| tests/System/processed/*xml | ||
| /vue/dist/demo.html | ||
| /vue/dist/*.common.js | ||
| /vue/dist/*.map | ||
| /vue/dist/*.development.* | ||
| .codex | ||
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Some of the ignored files have already been committed and should be removed to prevent them from not being updated.