@gui-chat-plugin/switch-role 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s="switchRole";function p(e){const n=e.map(r=>r.id),o=e.map(r=>`'${r.id}' (${r.name})`).join(", ");return{type:"function",name:s,description:`Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior. Available roles: ${o}.`,parameters:{type:"object",properties:{role:{type:"string",enum:n,description:`The role to switch to. Options: ${o}`}},required:["role"]}}}const i={type:"function",name:s,description:"Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior.",parameters:{type:"object",properties:{role:{type:"string",description:"The role ID to switch to"}},required:["role"]}},a=`When users ask to change the role, personality, or behavior of the AI (e.g., 'switch to tutor role', 'change to listener role', 'be a teacher'), use the ${s} function. Note that switching roles will disconnect and reconnect the conversation.`;function l(e){return typeof e.app?.getRoles=="function"?e.app.getRoles():(console.warn("switchRole: context.app.getRoles() not available, returning empty roles"),[])}function u(e,n){return l(e).find(r=>r.id===n)}const c=async(e,n)=>{const{role:o}=n,r=l(e),h=r.map(t=>`${t.id} (${t.name})`).join(", ");try{const t=u(e,o);if(!t)return{message:`Invalid role: ${o}`,jsonData:{success:!1,error:"Invalid role",availableRoles:r},instructions:`Tell the user that '${o}' is not a valid role. Available roles are: ${h}.`};if(typeof e.app?.switchRole=="function")setTimeout(()=>{e.app?.switchRole?.(o)},0);else return console.error("switchRole: context.app.switchRole() not available"),{message:"Failed to switch role: switchRole API not available",jsonData:{success:!1,error:"switchRole API not available"},instructions:"Tell the user that the role switching feature is not available."};return{message:`Role switch to '${t.name}' initiated`,jsonData:{success:!0,role:o,roleName:t.name}}}catch(t){return console.error("ERR: exception in switchRole",t),{message:`Role switch error: ${t instanceof Error?t.message:"Unknown error"}`,jsonData:{success:!1,error:t instanceof Error?t.message:"Unknown error"},instructions:"Acknowledge that there was an error switching roles and ask the user to try again."}}},g={toolDefinition:i,execute:c,generatingMessage:"Switching role...",isEnabled:()=>!0,systemPrompt:a};exports.SYSTEM_PROMPT=a;exports.TOOL_DEFINITION=i;exports.TOOL_NAME=s;exports.createToolDefinition=p;exports.executeSwitchRole=c;exports.pluginCore=g;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugin-BBQs-nwi.cjs`);exports.SYSTEM_PROMPT=e.r,exports.TOOL_DEFINITION=e.i,exports.TOOL_NAME=e.a,exports.createToolDefinition=e.o,exports.executeSwitchRole=e.t,exports.pluginCore=e.n;
package/dist/core.js CHANGED
@@ -1,103 +1,2 @@
1
- const n = "switchRole";
2
- function u(e) {
3
- const s = e.map((r) => r.id), o = e.map((r) => `'${r.id}' (${r.name})`).join(", ");
4
- return {
5
- type: "function",
6
- name: n,
7
- description: `Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior. Available roles: ${o}.`,
8
- parameters: {
9
- type: "object",
10
- properties: {
11
- role: {
12
- type: "string",
13
- enum: s,
14
- description: `The role to switch to. Options: ${o}`
15
- }
16
- },
17
- required: ["role"]
18
- }
19
- };
20
- }
21
- const l = {
22
- type: "function",
23
- name: n,
24
- description: "Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior.",
25
- parameters: {
26
- type: "object",
27
- properties: {
28
- role: {
29
- type: "string",
30
- description: "The role ID to switch to"
31
- }
32
- },
33
- required: ["role"]
34
- }
35
- }, c = `When users ask to change the role, personality, or behavior of the AI (e.g., 'switch to tutor role', 'change to listener role', 'be a teacher'), use the ${n} function. Note that switching roles will disconnect and reconnect the conversation.`;
36
- function i(e) {
37
- return typeof e.app?.getRoles == "function" ? e.app.getRoles() : (console.warn(
38
- "switchRole: context.app.getRoles() not available, returning empty roles"
39
- ), []);
40
- }
41
- function h(e, s) {
42
- return i(e).find((r) => r.id === s);
43
- }
44
- const p = async (e, s) => {
45
- const { role: o } = s, r = i(e), a = r.map((t) => `${t.id} (${t.name})`).join(", ");
46
- try {
47
- const t = h(e, o);
48
- if (!t)
49
- return {
50
- message: `Invalid role: ${o}`,
51
- jsonData: {
52
- success: !1,
53
- error: "Invalid role",
54
- availableRoles: r
55
- },
56
- instructions: `Tell the user that '${o}' is not a valid role. Available roles are: ${a}.`
57
- };
58
- if (typeof e.app?.switchRole == "function")
59
- setTimeout(() => {
60
- e.app?.switchRole?.(o);
61
- }, 0);
62
- else
63
- return console.error("switchRole: context.app.switchRole() not available"), {
64
- message: "Failed to switch role: switchRole API not available",
65
- jsonData: {
66
- success: !1,
67
- error: "switchRole API not available"
68
- },
69
- instructions: "Tell the user that the role switching feature is not available."
70
- };
71
- return {
72
- message: `Role switch to '${t.name}' initiated`,
73
- jsonData: {
74
- success: !0,
75
- role: o,
76
- roleName: t.name
77
- }
78
- };
79
- } catch (t) {
80
- return console.error("ERR: exception in switchRole", t), {
81
- message: `Role switch error: ${t instanceof Error ? t.message : "Unknown error"}`,
82
- jsonData: {
83
- success: !1,
84
- error: t instanceof Error ? t.message : "Unknown error"
85
- },
86
- instructions: "Acknowledge that there was an error switching roles and ask the user to try again."
87
- };
88
- }
89
- }, m = {
90
- toolDefinition: l,
91
- execute: p,
92
- generatingMessage: "Switching role...",
93
- isEnabled: () => !0,
94
- systemPrompt: c
95
- };
96
- export {
97
- c as SYSTEM_PROMPT,
98
- l as TOOL_DEFINITION,
99
- n as TOOL_NAME,
100
- u as createToolDefinition,
101
- p as executeSwitchRole,
102
- m as pluginCore
103
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./plugin-gaCUdQEp.js";
2
+ export { i as SYSTEM_PROMPT, t as TOOL_DEFINITION, e as TOOL_NAME, r as createToolDefinition, a as executeSwitchRole, n as pluginCore };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs");exports.SYSTEM_PROMPT=e.SYSTEM_PROMPT;exports.TOOL_DEFINITION=e.TOOL_DEFINITION;exports.TOOL_NAME=e.TOOL_NAME;exports.createToolDefinition=e.createToolDefinition;exports.executeSwitchRole=e.executeSwitchRole;exports.pluginCore=e.pluginCore;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugin-BBQs-nwi.cjs`);require(`./core.cjs`),exports.SYSTEM_PROMPT=e.r,exports.TOOL_DEFINITION=e.i,exports.TOOL_NAME=e.a,exports.createToolDefinition=e.o,exports.executeSwitchRole=e.t,exports.pluginCore=e.n;
package/dist/index.d.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * Main entry point - re-exports core module.
5
5
  */
6
- export * from "./core";
6
+ export * from "./core/index";
package/dist/index.js CHANGED
@@ -1,9 +1,3 @@
1
- import { SYSTEM_PROMPT as O, TOOL_DEFINITION as T, TOOL_NAME as i, createToolDefinition as t, executeSwitchRole as r, pluginCore as c } from "./core.js";
2
- export {
3
- O as SYSTEM_PROMPT,
4
- T as TOOL_DEFINITION,
5
- i as TOOL_NAME,
6
- t as createToolDefinition,
7
- r as executeSwitchRole,
8
- c as pluginCore
9
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./plugin-gaCUdQEp.js";
2
+ import "./core.js";
3
+ export { i as SYSTEM_PROMPT, t as TOOL_DEFINITION, e as TOOL_NAME, r as createToolDefinition, a as executeSwitchRole, n as pluginCore };
@@ -0,0 +1 @@
1
+ var e=`switchRole`;function t(t){let n=t.map(e=>e.id),r=t.map(e=>`'${e.id}' (${e.name})`).join(`, `);return{type:`function`,name:e,description:`Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior. Available roles: ${r}.`,parameters:{type:`object`,properties:{role:{type:`string`,enum:n,description:`The role to switch to. Options: ${r}`}},required:[`role`]}}}var n={type:`function`,name:e,description:`Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior.`,parameters:{type:`object`,properties:{role:{type:`string`,description:`The role ID to switch to`}},required:[`role`]}},r=`When users ask to change the role, personality, or behavior of the AI (e.g., 'switch to tutor role', 'change to listener role', 'be a teacher'), use the ${e} function. Note that switching roles will disconnect and reconnect the conversation.`;function i(e){return typeof e.app?.getRoles==`function`?e.app.getRoles():(console.warn(`switchRole: context.app.getRoles() not available, returning empty roles`),[])}function a(e,t){return i(e).find(e=>e.id===t)}var o=async(e,t)=>{let{role:n}=t,r=i(e),o=r.map(e=>`${e.id} (${e.name})`).join(`, `);try{let t=a(e,n);if(!t)return{message:`Invalid role: ${n}`,jsonData:{success:!1,error:`Invalid role`,availableRoles:r},instructions:`Tell the user that '${n}' is not a valid role. Available roles are: ${o}.`};if(typeof e.app?.switchRole==`function`)setTimeout(()=>{e.app?.switchRole?.(n)},0);else return console.error(`switchRole: context.app.switchRole() not available`),{message:`Failed to switch role: switchRole API not available`,jsonData:{success:!1,error:`switchRole API not available`},instructions:`Tell the user that the role switching feature is not available.`};return{message:`Role switch to '${t.name}' initiated`,jsonData:{success:!0,role:n,roleName:t.name}}}catch(e){return console.error(`ERR: exception in switchRole`,e),{message:`Role switch error: ${e instanceof Error?e.message:`Unknown error`}`,jsonData:{success:!1,error:e instanceof Error?e.message:`Unknown error`},instructions:`Acknowledge that there was an error switching roles and ask the user to try again.`}}},s={toolDefinition:n,execute:o,generatingMessage:`Switching role...`,isEnabled:()=>!0,systemPrompt:r};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,91 @@
1
+ //#region src/core/definition.ts
2
+ var e = "switchRole";
3
+ function t(t) {
4
+ let n = t.map((e) => e.id), r = t.map((e) => `'${e.id}' (${e.name})`).join(", ");
5
+ return {
6
+ type: "function",
7
+ name: e,
8
+ description: `Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior. Available roles: ${r}.`,
9
+ parameters: {
10
+ type: "object",
11
+ properties: { role: {
12
+ type: "string",
13
+ enum: n,
14
+ description: `The role to switch to. Options: ${r}`
15
+ } },
16
+ required: ["role"]
17
+ }
18
+ };
19
+ }
20
+ var n = {
21
+ type: "function",
22
+ name: e,
23
+ description: "Switch the system prompt role and reconnect to the LLM. This changes the AI's personality and behavior.",
24
+ parameters: {
25
+ type: "object",
26
+ properties: { role: {
27
+ type: "string",
28
+ description: "The role ID to switch to"
29
+ } },
30
+ required: ["role"]
31
+ }
32
+ }, r = `When users ask to change the role, personality, or behavior of the AI (e.g., 'switch to tutor role', 'change to listener role', 'be a teacher'), use the ${e} function. Note that switching roles will disconnect and reconnect the conversation.`;
33
+ //#endregion
34
+ //#region src/core/plugin.ts
35
+ function i(e) {
36
+ return typeof e.app?.getRoles == "function" ? e.app.getRoles() : (console.warn("switchRole: context.app.getRoles() not available, returning empty roles"), []);
37
+ }
38
+ function a(e, t) {
39
+ return i(e).find((e) => e.id === t);
40
+ }
41
+ var o = async (e, t) => {
42
+ let { role: n } = t, r = i(e), o = r.map((e) => `${e.id} (${e.name})`).join(", ");
43
+ try {
44
+ let t = a(e, n);
45
+ if (!t) return {
46
+ message: `Invalid role: ${n}`,
47
+ jsonData: {
48
+ success: !1,
49
+ error: "Invalid role",
50
+ availableRoles: r
51
+ },
52
+ instructions: `Tell the user that '${n}' is not a valid role. Available roles are: ${o}.`
53
+ };
54
+ if (typeof e.app?.switchRole == "function") setTimeout(() => {
55
+ e.app?.switchRole?.(n);
56
+ }, 0);
57
+ else return console.error("switchRole: context.app.switchRole() not available"), {
58
+ message: "Failed to switch role: switchRole API not available",
59
+ jsonData: {
60
+ success: !1,
61
+ error: "switchRole API not available"
62
+ },
63
+ instructions: "Tell the user that the role switching feature is not available."
64
+ };
65
+ return {
66
+ message: `Role switch to '${t.name}' initiated`,
67
+ jsonData: {
68
+ success: !0,
69
+ role: n,
70
+ roleName: t.name
71
+ }
72
+ };
73
+ } catch (e) {
74
+ return console.error("ERR: exception in switchRole", e), {
75
+ message: `Role switch error: ${e instanceof Error ? e.message : "Unknown error"}`,
76
+ jsonData: {
77
+ success: !1,
78
+ error: e instanceof Error ? e.message : "Unknown error"
79
+ },
80
+ instructions: "Acknowledge that there was an error switching roles and ask the user to try again."
81
+ };
82
+ }
83
+ }, s = {
84
+ toolDefinition: n,
85
+ execute: o,
86
+ generatingMessage: "Switching role...",
87
+ isEnabled: () => !0,
88
+ systemPrompt: r
89
+ };
90
+ //#endregion
91
+ export { e as a, n as i, s as n, t as o, r, o as t };
package/dist/style.css CHANGED
@@ -1 +1,3 @@
1
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-600:oklch(55.8% .288 302.321);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.m-0{margin:calc(var(--spacing)*0)}.mx-auto{margin-inline:auto}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.block{display:block}.contents{display:contents}.flex{display:flex}.h-4{height:calc(var(--spacing)*4)}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-200{border-color:var(--color-indigo-200)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-pre-wrap{white-space:pre-wrap}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-500{color:var(--color-green-500)}.text-indigo-700{color:var(--color-indigo-700)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-\[3px\]:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-indigo-500\/10:focus{--tw-ring-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.focus\:ring-indigo-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-indigo-500)10%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media(prefers-color-scheme:dark){.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-gray-400{color:var(--color-gray-400)}.dark\:text-purple-400{color:var(--color-purple-400)}}}body{margin:calc(var(--spacing)*0);background-color:var(--color-gray-100);padding:calc(var(--spacing)*5);font-family:var(--font-sans)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-600:oklch(55.8% .288 302.321);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.m-0{margin:calc(var(--spacing) * 0)}.mx-auto{margin-inline:auto}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.contents{display:contents}.flex{display:flex}.h-4{height:calc(var(--spacing) * 4)}.w-4{width:calc(var(--spacing) * 4)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-200{border-color:var(--color-indigo-200)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-pre-wrap{white-space:pre-wrap}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-500{color:var(--color-green-500)}.text-indigo-700{color:var(--color-indigo-700)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-\[3px\]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-indigo-500\/10:focus{--tw-ring-color:#625fff1a}@supports (color:color-mix(in lab, red, red)){.focus\:ring-indigo-500\/10:focus{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 10%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (prefers-color-scheme:dark){.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-gray-400{color:var(--color-gray-400)}.dark\:text-purple-400{color:var(--color-purple-400)}}}body{margin:calc(var(--spacing) * 0);background-color:var(--color-gray-100);padding:calc(var(--spacing) * 5);font-family:var(--font-sans)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
3
+ /*$vite$:1*/
package/dist/vue.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./core.cjs"),e=require("vue"),d={class:"p-2 bg-gray-50 dark:bg-gray-800 rounded"},u={class:"text-xs text-gray-600 dark:text-gray-400"},p={key:0,class:"space-y-1"},m={class:"flex items-center gap-1"},g={class:"font-medium"},v={class:"text-xs text-gray-500"},x={key:1,class:"flex items-center gap-1 text-red-500"},n=e.defineComponent({__name:"Preview",props:{result:{}},setup(a){const s=a,c=e.computed(()=>s.result.jsonData?.success||!1),l=e.computed(()=>s.result.jsonData?.roleName||"Unknown"),i=e.computed(()=>s.result.jsonData?.error);return(E,o)=>(e.openBlock(),e.createElementBlock("div",d,[o[2]||(o[2]=e.createElementVNode("div",{class:"flex items-center gap-2 mb-2"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-purple-600 dark:text-purple-400",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z","clip-rule":"evenodd"})]),e.createElementVNode("span",{class:"text-sm font-medium text-gray-700 dark:text-gray-300"}," Role Switch ")],-1)),e.createElementVNode("div",u,[c.value?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",m,[o[0]||(o[0]=e.createElementVNode("span",{class:"text-green-500"},"✓",-1)),e.createElementVNode("span",g,e.toDisplayString(l.value),1)]),e.createElementVNode("div",v,"Switched to "+e.toDisplayString(l.value)+" role",1)])):(e.openBlock(),e.createElementBlock("div",x,[o[1]||(o[1]=e.createElementVNode("span",null,"✗",-1)),e.createElementVNode("span",null,e.toDisplayString(i.value||"Failed to switch role"),1)]))])]))}}),r={...t.pluginCore,previewComponent:n},_={plugin:r};exports.SYSTEM_PROMPT=t.SYSTEM_PROMPT;exports.TOOL_DEFINITION=t.TOOL_DEFINITION;exports.TOOL_NAME=t.TOOL_NAME;exports.createToolDefinition=t.createToolDefinition;exports.executeSwitchRole=t.executeSwitchRole;exports.pluginCore=t.pluginCore;exports.Preview=n;exports.default=_;exports.plugin=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./plugin-BBQs-nwi.cjs`);let t=require(`vue`);var n={class:`p-2 bg-gray-50 dark:bg-gray-800 rounded`},r={class:`text-xs text-gray-600 dark:text-gray-400`},i={key:0,class:`space-y-1`},a={class:`flex items-center gap-1`},o={class:`font-medium`},s={class:`text-xs text-gray-500`},c={key:1,class:`flex items-center gap-1 text-red-500`},l=(0,t.defineComponent)({__name:`Preview`,props:{result:{}},setup(e){let l=e,u=(0,t.computed)(()=>l.result.jsonData?.success||!1),d=(0,t.computed)(()=>l.result.jsonData?.roleName||`Unknown`),f=(0,t.computed)(()=>l.result.jsonData?.error);return(e,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[l[2]||=(0,t.createElementVNode)(`div`,{class:`flex items-center gap-2 mb-2`},[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-4 w-4 text-purple-600 dark:text-purple-400`,viewBox:`0 0 20 20`,fill:`currentColor`},[(0,t.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z`,"clip-rule":`evenodd`})]),(0,t.createElementVNode)(`span`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300`},` Role Switch `)],-1),(0,t.createElementVNode)(`div`,r,[u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,i,[(0,t.createElementVNode)(`div`,a,[l[0]||=(0,t.createElementVNode)(`span`,{class:`text-green-500`},`✓`,-1),(0,t.createElementVNode)(`span`,o,(0,t.toDisplayString)(d.value),1)]),(0,t.createElementVNode)(`div`,s,`Switched to `+(0,t.toDisplayString)(d.value)+` role`,1)])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,c,[l[1]||=(0,t.createElementVNode)(`span`,null,`✗`,-1),(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(f.value||`Failed to switch role`),1)]))])]))}}),u={...e.n,previewComponent:l},d={plugin:u};exports.Preview=l,exports.SYSTEM_PROMPT=e.r,exports.TOOL_DEFINITION=e.i,exports.TOOL_NAME=e.a,exports.createToolDefinition=e.o,exports.default=d,exports.executeSwitchRole=e.t,exports.plugin=u,exports.pluginCore=e.n;
package/dist/vue.js CHANGED
@@ -1,62 +1,31 @@
1
- import { pluginCore as p } from "./core.js";
2
- import { SYSTEM_PROMPT as E, TOOL_DEFINITION as M, TOOL_NAME as C, createToolDefinition as P, executeSwitchRole as b } from "./core.js";
3
- import { defineComponent as u, computed as o, createElementBlock as a, openBlock as r, createElementVNode as e, toDisplayString as n } from "vue";
4
- const m = { class: "p-2 bg-gray-50 dark:bg-gray-800 rounded" }, x = { class: "text-xs text-gray-600 dark:text-gray-400" }, v = {
5
- key: 0,
6
- class: "space-y-1"
7
- }, g = { class: "flex items-center gap-1" }, _ = { class: "font-medium" }, f = { class: "text-xs text-gray-500" }, w = {
8
- key: 1,
9
- class: "flex items-center gap-1 text-red-500"
10
- }, y = /* @__PURE__ */ u({
11
- __name: "Preview",
12
- props: {
13
- result: {}
14
- },
15
- setup(i) {
16
- const s = i, c = o(() => s.result.jsonData?.success || !1), l = o(() => s.result.jsonData?.roleName || "Unknown"), d = o(() => s.result.jsonData?.error);
17
- return (k, t) => (r(), a("div", m, [
18
- t[2] || (t[2] = e("div", { class: "flex items-center gap-2 mb-2" }, [
19
- e("svg", {
20
- xmlns: "http://www.w3.org/2000/svg",
21
- class: "h-4 w-4 text-purple-600 dark:text-purple-400",
22
- viewBox: "0 0 20 20",
23
- fill: "currentColor"
24
- }, [
25
- e("path", {
26
- "fill-rule": "evenodd",
27
- d: "M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",
28
- "clip-rule": "evenodd"
29
- })
30
- ]),
31
- e("span", { class: "text-sm font-medium text-gray-700 dark:text-gray-300" }, " Role Switch ")
32
- ], -1)),
33
- e("div", x, [
34
- c.value ? (r(), a("div", v, [
35
- e("div", g, [
36
- t[0] || (t[0] = e("span", { class: "text-green-500" }, "✓", -1)),
37
- e("span", _, n(l.value), 1)
38
- ]),
39
- e("div", f, "Switched to " + n(l.value) + " role", 1)
40
- ])) : (r(), a("div", w, [
41
- t[1] || (t[1] = e("span", null, "✗", -1)),
42
- e("span", null, n(d.value || "Failed to switch role"), 1)
43
- ]))
44
- ])
45
- ]));
46
- }
47
- }), h = {
48
- ...p,
49
- previewComponent: y
50
- // No viewComponent - this plugin only has a preview
51
- }, O = { plugin: h };
52
- export {
53
- y as Preview,
54
- E as SYSTEM_PROMPT,
55
- M as TOOL_DEFINITION,
56
- C as TOOL_NAME,
57
- P as createToolDefinition,
58
- O as default,
59
- b as executeSwitchRole,
60
- h as plugin,
61
- p as pluginCore
62
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./plugin-gaCUdQEp.js";
2
+ import { computed as o, createElementBlock as s, createElementVNode as c, defineComponent as l, openBlock as u, toDisplayString as d } from "vue";
3
+ //#region src/vue/Preview.vue?vue&type=script&setup=true&lang.ts
4
+ var f = { class: "p-2 bg-gray-50 dark:bg-gray-800 rounded" }, p = { class: "text-xs text-gray-600 dark:text-gray-400" }, m = {
5
+ key: 0,
6
+ class: "space-y-1"
7
+ }, h = { class: "flex items-center gap-1" }, g = { class: "font-medium" }, _ = { class: "text-xs text-gray-500" }, v = {
8
+ key: 1,
9
+ class: "flex items-center gap-1 text-red-500"
10
+ }, y = /* @__PURE__ */ l({
11
+ __name: "Preview",
12
+ props: { result: {} },
13
+ setup(e) {
14
+ let t = e, n = o(() => t.result.jsonData?.success || !1), r = o(() => t.result.jsonData?.roleName || "Unknown"), i = o(() => t.result.jsonData?.error);
15
+ return (e, t) => (u(), s("div", f, [t[2] ||= c("div", { class: "flex items-center gap-2 mb-2" }, [c("svg", {
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ class: "h-4 w-4 text-purple-600 dark:text-purple-400",
18
+ viewBox: "0 0 20 20",
19
+ fill: "currentColor"
20
+ }, [c("path", {
21
+ "fill-rule": "evenodd",
22
+ d: "M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",
23
+ "clip-rule": "evenodd"
24
+ })]), c("span", { class: "text-sm font-medium text-gray-700 dark:text-gray-300" }, " Role Switch ")], -1), c("div", p, [n.value ? (u(), s("div", m, [c("div", h, [t[0] ||= c("span", { class: "text-green-500" }, "✓", -1), c("span", g, d(r.value), 1)]), c("div", _, "Switched to " + d(r.value) + " role", 1)])) : (u(), s("div", v, [t[1] ||= c("span", null, "✗", -1), c("span", null, d(i.value || "Failed to switch role"), 1)]))])]));
25
+ }
26
+ }), b = {
27
+ ...n,
28
+ previewComponent: y
29
+ }, x = { plugin: b };
30
+ //#endregion
31
+ export { y as Preview, i as SYSTEM_PROMPT, t as TOOL_DEFINITION, e as TOOL_NAME, r as createToolDefinition, x as default, a as executeSwitchRole, b as plugin, n as pluginCore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gui-chat-plugin/switch-role",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Switch role plugin for GUIChat",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -34,24 +34,25 @@
34
34
  "lint": "eslint src demo"
35
35
  },
36
36
  "peerDependencies": {
37
- "gui-chat-protocol": "^0.0.3",
37
+ "gui-chat-protocol": "^0.0.4",
38
38
  "vue": "^3.5.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@tailwindcss/vite": "^4.1.18",
42
- "@typescript-eslint/eslint-plugin": "^8.53.0",
43
- "@typescript-eslint/parser": "^8.53.0",
44
- "@vitejs/plugin-vue": "^6.0.3",
45
- "eslint": "^9.39.2",
46
- "eslint-plugin-vue": "^10.6.2",
47
- "globals": "^17.0.0",
48
- "gui-chat-protocol": "^0.0.3",
49
- "tailwindcss": "^4.1.18",
41
+ "@eslint/js": "^10.0.1",
42
+ "@tailwindcss/vite": "^4.2.2",
43
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
44
+ "@typescript-eslint/parser": "^8.58.0",
45
+ "@vitejs/plugin-vue": "^6.0.5",
46
+ "eslint": "^10.1.0",
47
+ "eslint-plugin-vue": "^10.8.0",
48
+ "globals": "^17.4.0",
49
+ "gui-chat-protocol": "^0.0.4",
50
+ "tailwindcss": "^4.2.2",
50
51
  "typescript": "~5.9.3",
51
- "vite": "^7.3.1",
52
- "vue": "^3.5.27",
53
- "vue-eslint-parser": "^10.2.0",
54
- "vue-tsc": "^3.2.2"
52
+ "vite": "^8.0.3",
53
+ "vue": "^3.5.31",
54
+ "vue-eslint-parser": "^10.4.0",
55
+ "vue-tsc": "^3.2.6"
55
56
  },
56
57
  "keywords": [
57
58
  "guichat",