From e215953e57a542173f4749abeb1a1df88d460f9a Mon Sep 17 00:00:00 2001 From: Anant Dole Date: Fri, 6 Sep 2024 11:22:51 +0100 Subject: [PATCH 1/5] Fixing custom components error for dev docs --- docs/framework/custom-components.mdx | 70 ++++++++++++++-------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/docs/framework/custom-components.mdx b/docs/framework/custom-components.mdx index 23152de51..a37c26417 100644 --- a/docs/framework/custom-components.mdx +++ b/docs/framework/custom-components.mdx @@ -7,10 +7,10 @@ It's possible to extend Framework with custom component templates. They're developed using Vue 3 and TypeScript. Once transpiled, they can be used by copying them to the `extensions/` folder of any project. - Custom components behave exactly like built-in ones. They are just as - performant, can contain other components, and offer the same the Builder - experience. They only differ from built-in components in the way that they're - bundled and imported. + Custom components behave exactly like built-in ones. They are just as + performant, can contain other components, and offer the same the Builder + experience. They only differ from built-in components in the way that they're + bundled and imported. ## Architecture @@ -101,39 +101,41 @@ The code above will make Bubble Message available in the Builder. ### Run a local server - - To get started, clone the [Framework - repository](https://github.com/writer/writer-framework) from GitHub. - - - To develop custom templates in a developer-friendly way, ensure you have a - front-end development server with instant reload capabilities. The front-end - code for Framework is located in the `ui` folder. With Node and npm - installed on your system, run `npm install` to install dependencies. Then, - start the server with support for custom component templates using `npm run - custom.dev`. ```sh cd ui npm install # "custom.dev" links templates in - "custom_components/" # "dev" runs the server without them npm run custom.dev - ``` - - - The command `npm run custom.dev` starts a front-end server, which requires a - back-end to function fully. Start Framework via command line, specifying the - option `--port 5000`, to provide a back-end on that port. It's recommended - to create a new app for testing the template you're developing. ```sh writer - create customtester writer edit customtester --port 5000 ``` - - - You should now be able to access Framework via the URL provided by Vite, - e.g. `http://localhost:5174`. In the Builder's _Toolkit_, you should see the - sample component, _Balloon Message_. Add it to your tester application. - + + To get started, clone the [Framework + repository](https://github.com/writer/writer-framework) from GitHub. + + + To develop custom templates in a developer-friendly way, ensure you have a + front-end development server with instant reload capabilities. The front-end + code for Framework is located in the `ui` folder. With Node and npm + installed on your system, run `npm install` to install dependencies. Then, + start the server with support for custom component templates using `npm run + custom.dev`. + + ```sh cd ui npm install # "custom.dev" links templates in + "custom_components/" # "dev" runs the server without them npm run custom.dev + ``` + + + The command `npm run custom.dev` starts a front-end server, which requires a + back-end to function fully. Start Framework via command line, specifying the + option `--port 5000`, to provide a back-end on that port. It's recommended + to create a new app for testing the template you're developing. ```sh writer + create customtester writer edit customtester --port 5000 ``` + + + You should now be able to access Framework via the URL provided by Vite, + e.g. `http://localhost:5174`. In the Builder's _Toolkit_, you should see the + sample component, _Balloon Message_. Add it to your tester application. + ### Create a new component - You can also have a look at the built-in component templates, since their - syntax is equivalent. They can be found in the `ui/src/components/` folder. + You can also have a look at the built-in component templates, since their + syntax is equivalent. They can be found in the `ui/src/components/` folder. Go to `ui/src/custom_components/` and open the Vue single-file components, i.e. the `.vue` files. These files contain comments that will help you get started. Try editing @@ -154,8 +156,8 @@ import BubbleMessageAdvanced from "./BubbleMessageAdvanced.vue"; // Export an object with the ids and the templates as default export default { - bubblemessage: BubbleMessage, - bubblemessageadvanced: BubbleMessageAdvanced, + bubblemessage: BubbleMessage, + bubblemessageadvanced: BubbleMessageAdvanced, }; ``` From 0dd42fc606c58b0b8c2b3e471ea1874fb87bd514 Mon Sep 17 00:00:00 2001 From: Mikita Makiej <157150795+mmikita95@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:45:24 +0300 Subject: [PATCH 2/5] chore: bump completion default model Upgrade `palmyra-x-002-instruct` to `palmyra-x-003-instruct` as per WF-65 --- src/writer/ai.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/writer/ai.py b/src/writer/ai.py index 6ce94e142..5984cf621 100644 --- a/src/writer/ai.py +++ b/src/writer/ai.py @@ -164,7 +164,7 @@ def use_completion_model(cls) -> str: :returns: Name for the completion model. """ - return "palmyra-x-002-instruct" + return "palmyra-x-003-instruct" @classmethod def acquire_client(cls) -> Writer: @@ -1040,4 +1040,4 @@ def init(token: Optional[str] = None): """ return WriterAIManager(token=token) -apps = Apps() \ No newline at end of file +apps = Apps() From 7deabd2b1e64c1350104159ec1fb8cc195a5ad48 Mon Sep 17 00:00:00 2001 From: Mikita Makiej <157150795+mmikita95@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:08:44 +0300 Subject: [PATCH 3/5] chore: bump chat model --- src/writer/ai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/writer/ai.py b/src/writer/ai.py index 5984cf621..ce54ec368 100644 --- a/src/writer/ai.py +++ b/src/writer/ai.py @@ -155,7 +155,7 @@ def use_chat_model(cls) -> str: :returns: Name for the chat model. """ - return "palmyra-x-002-32k" + return "palmyra-x-004" @classmethod def use_completion_model(cls) -> str: From 06b2704db636f44354412fc37923186d8bd0ff25 Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Wed, 18 Sep 2024 08:54:02 +0000 Subject: [PATCH 4/5] chore: Change header spacing --- src/ui/src/renderer/sharedStyles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/src/renderer/sharedStyles.css b/src/ui/src/renderer/sharedStyles.css index 639056f77..dbd04efbc 100644 --- a/src/ui/src/renderer/sharedStyles.css +++ b/src/ui/src/renderer/sharedStyles.css @@ -8,7 +8,7 @@ h4 { h1 { font-size: 1.5rem; - letter-spacing: 0.1875rem; + letter-spacing: 0; font-weight: 600; line-height: 162.5%; } From 1375d948fe7a8611ed3605a51dbc66e18d01cdb4 Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:17:35 +0000 Subject: [PATCH 5/5] chore: Version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4ea7296ec..0859e39dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "writer" -version = "0.7.4" +version = "0.7.5" description = "An open-source, Python framework for building feature-rich apps that are fully integrated with the Writer platform." authors = ["Writer, Inc."] readme = "README.md"