From b910e85ea1a413e3470e281a6090d9e948aaf31a Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:00:54 +0100 Subject: [PATCH] Squashed commit of the following: commit 0f8a653b85f6b634f6a39632e912ce77af74167a Merge: c6bd286 5ea2448 Author: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Thu Nov 28 17:54:43 2024 +0100 Merge pull request #638 from madeindjs/WF-45 feat(ui): use `BuilderSelect` for handlers + implement Design System - WF-45 commit c6bd286d97f63f853bd0dd63e73183f4545136bf Merge: c789209 4998ace Author: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Thu Nov 28 10:03:36 2024 +0100 Merge pull request #654 from mmikita95/fix-pytest-warnings fix: register `set_token` mark to avoid pytest warnings commit c7892098e1de6391d3a3cfcfff90969d9288d622 Merge: 8774f9b 93a4f6e Author: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Thu Nov 28 10:01:53 2024 +0100 Merge pull request #622 from mmikita95/chore-serialize-non-empty-content chore: serialize tool calls messages with non-empty content commit 8774f9bdc91c5284ce048615e263c5e9816766f6 Merge: ec53f21 a8f42de Author: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Wed Nov 27 09:30:02 2024 +0100 Merge pull request #646 from writer/WF-123-fix-examples-versions fix(WF-123): template apps have incorrect version after generation commit 4998ace9d1a2f7460437cf25dee58f8da2f046d5 Author: mmikita95 Date: Wed Nov 27 10:20:04 2024 +0300 fix: register `set_token` mark to avoid pytest warnings commit 5ea244855f0dbc38a0048154837eea14c29567c5 Author: Alexandre Rousseau Date: Mon Nov 18 21:33:27 2024 +0100 feat(ui): use `BuilderSelect` for handlers + implement Design System - WF-45 commit a8f42dea7d5c0157a2d12b9a7038a00a85d4e918 Author: Mateusz Russak Date: Fri Nov 22 23:24:36 2024 +0100 fix: tests commit efcb814d11a928b3a077bc5cd20453d7c08ab48e Author: Mateusz Russak Date: Fri Nov 22 23:10:25 2024 +0100 fix: linter error commit a93b102a24b8659cbfe4ace3e32668f85d077fa1 Author: Mateusz Russak Date: Fri Nov 22 22:16:46 2024 +0100 fix(WF-123): Fix writer versions in examples commit 93a4f6ed024fae073f043e3be7f82cf10956352d Author: Mikita Makiej <157150795+mmikita95@users.noreply.github.com> Date: Mon Nov 18 12:47:27 2024 +0300 fix: also include empty non-`None` content as failing condition commit bb3683a25c1063482990705a6a6c536bc0a897d3 Author: Mikita Makiej <157150795+mmikita95@users.noreply.github.com> Date: Mon Nov 18 11:46:52 2024 +0300 fix: unfinished docstring commit 2f96977eb1270ae4a9d1bf6c33abbcefb2bb71db Author: mmikita95 Date: Mon Nov 18 10:51:13 2024 +0300 chore: update `_is_serialized` commit d646732b8316a97923bec748900e0a9ba877a1e1 Author: mmikita95 Date: Fri Nov 8 17:34:02 2024 +0400 chore: serialize tool calls messages with non-empty content --- apps/ai-starter/pyproject.toml | 15 - apps/default/pyproject.toml | 15 - apps/hello/pyproject.toml | 15 - apps/pdg-tutorial/pyproject.toml | 15 - apps/quickstart/pyproject.toml | 15 - apps/text-demo/pyproject.toml | 15 - package-lock.json | 58 ++++ pytest.ini | 1 + src/ui/package.json | 1 + src/ui/src/builder/BuilderSelect.vue | 264 ++++++++---------- .../builder/settings/BuilderFieldsAlign.vue | 4 +- .../builder/settings/BuilderFieldsPadding.vue | 4 +- .../builder/settings/BuilderFieldsWidth.vue | 4 +- .../settings/BuilderSettingsHandlers.vue | 112 ++++---- src/ui/src/composables/useFocusWithin.ts | 55 ++++ src/ui/src/wds/WdsDropdownMenu.vue | 189 +++++++++++++ src/writer/ai.py | 12 +- src/writer/command_line.py | 6 + tests/backend/test_cli.py | 6 - 19 files changed, 510 insertions(+), 296 deletions(-) delete mode 100644 apps/ai-starter/pyproject.toml delete mode 100644 apps/default/pyproject.toml delete mode 100644 apps/hello/pyproject.toml delete mode 100644 apps/pdg-tutorial/pyproject.toml delete mode 100644 apps/quickstart/pyproject.toml delete mode 100644 apps/text-demo/pyproject.toml create mode 100644 src/ui/src/composables/useFocusWithin.ts create mode 100644 src/ui/src/wds/WdsDropdownMenu.vue diff --git a/apps/ai-starter/pyproject.toml b/apps/ai-starter/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/ai-starter/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/default/pyproject.toml b/apps/default/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/default/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/hello/pyproject.toml b/apps/hello/pyproject.toml deleted file mode 100644 index f1775894f..000000000 --- a/apps/hello/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-hello" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/pdg-tutorial/pyproject.toml b/apps/pdg-tutorial/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/pdg-tutorial/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/quickstart/pyproject.toml b/apps/quickstart/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/quickstart/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/apps/text-demo/pyproject.toml b/apps/text-demo/pyproject.toml deleted file mode 100644 index cc093aa90..000000000 --- a/apps/text-demo/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "writer-framework-default" -version = "0.1.0" -description = "" -authors = ["Your Name "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10.0" -writer = {version = "^0.6.0"} - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/package-lock.json b/package-lock.json index b04d0d651..d7a8628c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2587,6 +2587,63 @@ "dev": true, "license": "MIT" }, + "node_modules/@floating-ui/core": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", + "dependencies": { + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.12.tgz", + "integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==", + "dependencies": { + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==" + }, + "node_modules/@floating-ui/vue": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@floating-ui/vue/-/vue-1.1.5.tgz", + "integrity": "sha512-ynL1p5Z+woPVSwgMGqeDrx6HrJfGIDzFyESFkyqJKilGW1+h/8yVY29Khn0LaU6wHBRwZ13ntG6reiHWK6jyzw==", + "dependencies": { + "@floating-ui/dom": "^1.0.0", + "@floating-ui/utils": "^0.2.8", + "vue-demi": ">=0.13.0" + } + }, + "node_modules/@floating-ui/vue/node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/@fontsource-variable/material-symbols-outlined": { "version": "5.0.34", "resolved": "https://registry.npmjs.org/@fontsource-variable/material-symbols-outlined/-/material-symbols-outlined-5.0.34.tgz", @@ -22903,6 +22960,7 @@ "version": "0.0.0", "dependencies": { "@apache-arrow/ts": "^15.0.2", + "@floating-ui/vue": "^1.1.5", "@fontsource-variable/material-symbols-outlined": "^5.0.34", "@fontsource/poppins": "^5.0.14", "@googlemaps/js-api-loader": "^1.16.6", diff --git a/pytest.ini b/pytest.ini index dba8024cb..270fe7e75 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,4 @@ [pytest] markers = explicit: mark a test to be run only when explicitly specified + set_token: provides a Writer API token mock for the test \ No newline at end of file diff --git a/src/ui/package.json b/src/ui/package.json index aaffca429..5bfa9560b 100644 --- a/src/ui/package.json +++ b/src/ui/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@apache-arrow/ts": "^15.0.2", + "@floating-ui/vue": "^1.1.5", "@fontsource-variable/material-symbols-outlined": "^5.0.34", "@fontsource/poppins": "^5.0.14", "@googlemaps/js-api-loader": "^1.16.6", diff --git a/src/ui/src/builder/BuilderSelect.vue b/src/ui/src/builder/BuilderSelect.vue index 19439813c..d454a3171 100644 --- a/src/ui/src/builder/BuilderSelect.vue +++ b/src/ui/src/builder/BuilderSelect.vue @@ -1,190 +1,170 @@ + + diff --git a/src/ui/src/builder/settings/BuilderFieldsAlign.vue b/src/ui/src/builder/settings/BuilderFieldsAlign.vue index e77a5e2ed..b45d97ef2 100644 --- a/src/ui/src/builder/settings/BuilderFieldsAlign.vue +++ b/src/ui/src/builder/settings/BuilderFieldsAlign.vue @@ -42,9 +42,9 @@
diff --git a/src/ui/src/builder/settings/BuilderFieldsPadding.vue b/src/ui/src/builder/settings/BuilderFieldsPadding.vue index d0b4baf72..bf4c9dfc8 100644 --- a/src/ui/src/builder/settings/BuilderFieldsPadding.vue +++ b/src/ui/src/builder/settings/BuilderFieldsPadding.vue @@ -42,9 +42,9 @@
All diff --git a/src/ui/src/builder/settings/BuilderFieldsWidth.vue b/src/ui/src/builder/settings/BuilderFieldsWidth.vue index 160defde8..89f99e43c 100644 --- a/src/ui/src/builder/settings/BuilderFieldsWidth.vue +++ b/src/ui/src/builder/settings/BuilderFieldsWidth.vue @@ -42,9 +42,9 @@
{{ eventType }} - +
+ +