Skip to content

Commit 95005c8

Browse files
release(minor): Small Release
### New Features - External API support for knowledge base search **[PRO]** - Customizable similarity threshold - Option to export messages **[PRO]** - Option to delete threads - Show connectivity errors in the dashboard - NPS survey added - New chatbot icons **[PRO]** ### Improvements - Compatibility with PHP 7.4 or higher (Previously 8.1+) - Add support for more OpenAI models - Dashboard charts for usage statistics - Optimize memory consumption for chat endpoint - Reduced payload size on data endpoint - Improved time to calculate the cosine similarity score - Consistent chat style options across themes - Quick actions for adding/removing posts to knowledge base - Better UX while waiting for bot's response - Hide chat and show dashboard notice when knowledge base is empty - Better explanation for Enable Chat options (global vs. specific pages) - Lowered UI gaps in the messages page - License key notice redirects to activation page ### Bug Fixes - Fixed handling of OpenAI status - Fixed warning on early translation function calls - Fixed missing embeddings in FAQ
2 parents 36b6b1c + ed89797 commit 95005c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+13235
-6941
lines changed

.eslintrc

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,21 @@
11
{
22
"env": {
33
"browser": true,
4-
"es2021": true
54
},
6-
"extends": "wordpress",
5+
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
76
"parserOptions": {
87
"ecmaFeatures": {
98
"jsx": true
109
},
11-
"ecmaVersion": 2021,
10+
"ecmaVersion": "latest",
1211
"sourceType": "module"
1312
},
1413
"ignorePatterns": [ "node_modules", "assets" ],
1514
"rules": {
16-
"indent": [
17-
"error",
18-
"tab"
19-
],
2015
"linebreak-style": [
2116
"error",
2217
"unix"
2318
],
24-
"quotes": [
25-
"error",
26-
"single"
27-
],
28-
"semi": [
29-
"error",
30-
"always"
31-
],
32-
"prefer-destructuring": [
33-
"warn",
34-
{
35-
"array": false,
36-
"object": true
37-
},
38-
{
39-
"enforceForRenamedProperties": false
40-
}
41-
],
4219
"array-bracket-spacing": [
4320
"warn",
4421
"always",
@@ -62,5 +39,11 @@
6239
"objectsInObjects": false
6340
}
6441
],
42+
"@wordpress/i18n-text-domain": [
43+
"error",
44+
{
45+
"allowedTextDomain": "hyve-lite"
46+
}
47+
]
6548
}
6649
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
applyTo: "**/*.{js,jsx,ts,tsx}"
3+
---
4+
5+
# JavaScript & React Standards for WordPress Plugins
6+
7+
You are a world expert WordPress developer in developing AI Chat Bot apps.
8+
9+
## Coding Style
10+
11+
- Follow WordPress JavaScript Coding Standards.
12+
- Check for `null` & `undefined` values.
13+
14+
## WordPress & React
15+
16+
- Use `@wordpress/element` for React components (`import { useState } from '@wordpress/element'`).
17+
- Keep components small, modular, and in PascalCase.
18+
19+
## Data & State
20+
21+
- Use `@wordpress/data` or context for shared state.
22+
- Validate and sanitize all user input.
23+
- Use nonces and capability checks when communicating with REST API.
24+
25+
## Security
26+
27+
- Never trust user input; sanitize and escape data before display.
28+
- Avoid `dangerouslySetInnerHTML` unless required, and sanitize if used.
29+
30+
## Performance
31+
32+
- Memoize expensive computations with `useMemo`/`useCallback`.
33+
34+
## Documentation
35+
36+
- Use JSDoc/TSDoc for functions and components. Use types compatible with TypeScript for JSDoc.
37+
- Document component props and API usage.
38+
39+
## Internationalization (i18n)
40+
41+
- Use `@wordpress/i18n` for all user-facing strings.
42+
- Always set the correct text domain (`'hyve-lite'`)
43+
- Add context for translators when using `sprintf` or string templates via `// translators:`
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
applyTo: "**/*.php"
3+
---
4+
5+
# PHP & WordPress Standards
6+
7+
You are a world expert WordPress backend developer in Chat Bot AI apps.
8+
9+
## Coding Style
10+
11+
- Use WordPress PHP and PSR-12 coding standards.
12+
13+
## Best Practices
14+
15+
- Sanitize, escape, and validate data using WordPress functions.
16+
- Prefer `preg_` (PCRE) over POSIX regex; never use `/e`, use `preg_replace_callback`.
17+
18+
## Security
19+
20+
- Check user capabilities and nonces.
21+
- Sanitize all data.
22+
23+
## Performance
24+
25+
- Use the Transients API for caching.
26+
- Minimize database queries, memory footprint and computation.
27+
28+
## PHPStan & Docs
29+
30+
- Add concise PHPDocs with param/return types for PHPStan compatibility (level 10).
31+
32+
## i18n
33+
34+
- Use WordPress i18n functions with the `'hyve-lite'` text domain.
35+
- In `sprintf` context, add translators comments via `// translators:`
36+
37+
## Structure
38+
39+
- Vector Embeddings are either saved in WordPress DB or Qdrant.
40+
- We use OpenAI for responses and Embeddings generation.

.github/workflows/create-buld-url.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
steps:
1717
- name: Check out source files
1818
uses: actions/checkout@v4
19+
- name: Setup PHP version
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: "7.4"
23+
extensions: simplexml
1924
- name: Install composer deps
2025
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
2126
- name: Install npm deps

.github/workflows/deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ jobs:
1717
mkdir $HOME/.ssh
1818
echo "$SSH_KEY" > "$HOME/.ssh/key"
1919
chmod 600 "$HOME/.ssh/key"
20+
- name: Setup PHP version
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: "7.4"
24+
extensions: simplexml
2025
- name: Install composer deps
2126
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
2227
- name: Install npm deps
@@ -29,4 +34,4 @@ jobs:
2934
uses: 10up/action-wordpress-plugin-deploy@master
3035
env:
3136
SVN_PASSWORD: ${{ secrets.SVN_THEMEISLE_PASSWORD }}
32-
SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }}
37+
SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }}

.github/workflows/e2e-tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test E2E
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review]
6+
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
11+
name: Playwright with WP Env
12+
steps:
13+
- uses: actions/checkout@master
14+
with:
15+
persist-credentials: false
16+
- name: Setup Node 20 with cache
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: "npm"
21+
- name: Setup PHP version
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: "7.4"
25+
extensions: simplexml
26+
- name: Install NPM dependencies
27+
run: |
28+
npm install -g npm
29+
npm ci
30+
env:
31+
CI: true
32+
- name: Install composer dependencies
33+
run: |
34+
composer install --prefer-dist --no-progress --no-suggest
35+
- name: Build plugin
36+
run: |
37+
npm run build
38+
- name: Install Playwright
39+
run: |
40+
npx playwright install
41+
- name: Setup WP Env
42+
run: |
43+
npm run wp-env start
44+
- name: Run tests
45+
run: |
46+
npm run test:playwright
47+
- name: Archive test results
48+
if: failure()
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: e2e-playwright-results
52+
path: artifacts
53+
retention-days: 1
54+
if-no-files-found: ignore

.github/workflows/test-php.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup PHP version
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: "8.1"
16+
php-version: "7.4"
1717
extensions: simplexml
1818
- name: Checkout source code
1919
uses: actions/checkout@v4
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup PHP version
3535
uses: shivammathur/setup-php@v2
3636
with:
37-
php-version: "8.1"
37+
php-version: "7.4"
3838
extensions: simplexml, mysql
3939
- name: Checkout source code
4040
uses: actions/checkout@v4
@@ -59,7 +59,7 @@ jobs:
5959
- name: Setup PHP version
6060
uses: shivammathur/setup-php@v2
6161
with:
62-
php-version: "8.1"
62+
php-version: "7.4"
6363
extensions: simplexml, mysql
6464
tools: phpunit-polyfills
6565
- name: Checkout source code

.wp-env.override.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"core": null,
3+
"plugins": [ "." ],
4+
"config": {
5+
"WP_DEBUG": true,
6+
"WP_DEBUG_DISPLAY": true,
7+
"FS_METHOD": "direct",
8+
"E2E_TESTING": true
9+
},
10+
"phpVersion": "7.4",
11+
"lifecycleScripts": {
12+
"afterStart": "bash bin/e2e-tests.sh"
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)