@gui-chat-plugin/go 0.4.0 → 0.5.1
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/README.md +5 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{samples--VS-ghv5.cjs → samples-C6WEBoT9.cjs} +1 -1
- package/dist/style.css +2 -2
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +1 -1
- package/package.json +14 -14
- /package/dist/{samples-CUD_StDT.js → samples-3OJhbZ6y.js} +0 -0
package/README.md
CHANGED
|
@@ -118,3 +118,8 @@ Try these prompts to test the plugin:
|
|
|
118
118
|
## License
|
|
119
119
|
|
|
120
120
|
MIT
|
|
121
|
+
|
|
122
|
+
## Related
|
|
123
|
+
|
|
124
|
+
- Protocol spec: [gui-chat-protocol](https://github.com/receptron/gui-chat-protocol)
|
|
125
|
+
- Reference implementations using this protocol: [mulmoclaude](https://github.com/receptron/mulmoclaude) · [MulmoChat](https://github.com/receptron/MulmoChat)
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./samples-C6WEBoT9.cjs");exports.SYSTEM_PROMPT=e.a,exports.TOOL_DEFINITION=e.o,exports.TOOL_NAME=e.s,exports.executeGo=e.n,exports.playGo=e.i,exports.pluginCore=e.r,exports.samples=e.t;
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./samples-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./samples-3OJhbZ6y.js";
|
|
2
2
|
export { e as SYSTEM_PROMPT, r as TOOL_DEFINITION, a as TOOL_NAME, n as executeGo, t as playGo, i as pluginCore, o as samples };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./samples-C6WEBoT9.cjs");exports.SYSTEM_PROMPT=e.a,exports.TOOL_DEFINITION=e.o,exports.TOOL_NAME=e.s,exports.executeGo=e.n,exports.playGo=e.i,exports.pluginCore=e.r,exports.samples=e.t;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./samples-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./samples-3OJhbZ6y.js";
|
|
2
2
|
export { e as SYSTEM_PROMPT, r as TOOL_DEFINITION, a as TOOL_NAME, n as executeGo, t as playGo, i as pluginCore, o as samples };
|
|
@@ -3,4 +3,4 @@ var e=`playGo`,t={type:`function`,name:e,description:`Play the game of Go (Baduk
|
|
|
3
3
|
2. For moves, the user specifies column (A-J, skipping I) and row (1-9)
|
|
4
4
|
3. Use the "move" action with the current board state
|
|
5
5
|
4. The game ends after two consecutive passes`,r=9,i=[[-1,0],[1,0],[0,-1],[0,1]];function a(){let e=[];for(let t=0;t<r;t++)e[t]=Array(r).fill(`.`);return e}function o(e){return e.map(e=>[...e])}function s(e,t){return e>=0&&e<r&&t>=0&&t<r}function c(e){return e===`B`?`W`:`B`}function l(e,t,n,r){let a=e[t][n];if(a===`.`)return[];let o=[],c=[{row:t,col:n}];for(;c.length>0;){let t=c.pop(),n=t.row,l=t.col;if(!(!s(n,l)||r[n][l]||e[n][l]!==a)){r[n][l]=!0,o.push({row:n,col:l});for(let[e,t]of i)c.push({row:n+e,col:l+t})}}return o}function u(e,t){for(let{row:n,col:r}of t)for(let[t,a]of i){let i=n+t,o=r+a;if(s(i,o)&&e[i][o]===`.`)return!0}return!1}function d(e,t){let n=o(e),i=Array(r).fill(null).map(()=>Array(r).fill(!1)),a=0;for(let e=0;e<r;e++)for(let o=0;o<r;o++)if(n[e][o]===t&&!i[e][o]){let t=l(n,e,o,i);if(!u(n,t))for(let{row:e,col:r}of t)n[e][r]=`.`,a++}return{board:n,capturedCount:a}}function f(e,t,n,i){if(e[t][n]!==`.`)return!1;let a=o(e);a[t][n]=i;let{board:s}=d(a,c(i));return u(s,l(s,t,n,Array(r).fill(null).map(()=>Array(r).fill(!1))))}function p(e,t,n,r){let i=o(e);i[t][n]=r;let{board:a,capturedCount:s}=d(i,c(r));return{newBoard:a,capturedCount:s}}function m(e){let t=0,n=0,i=0;for(let a=0;a<r;a++)for(let o=0;o<r;o++){let r=e[a][o];r===`B`?t++:r===`W`?n++:i++}return{B:t,W:n,empty:i}}function h(e){let t=Array(r).fill(null).map(()=>Array(r).fill(!1)),n=0,a=0;for(let o=0;o<r;o++)for(let c=0;c<r;c++)if(e[o][c]===`.`&&!t[o][c]){let r=[],l=[{row:o,col:c}],u=new Set;for(;l.length>0;){let n=l.pop(),a=n.row,o=n.col;if(!(!s(a,o)||t[a][o]))if(e[a][o]===`.`){t[a][o]=!0,r.push({row:a,col:o});for(let[e,t]of i)l.push({row:a+e,col:o+t})}else u.add(e[a][o])}if(u.size===1){let e=Array.from(u)[0];e===`B`?n+=r.length:e===`W`&&(a+=r.length)}}return{B:n,W:a}}function g(e,t){let n=m(e),r=h(e),i=n.B+r.B+t.W,a=n.W+r.W+t.B;return i>a?`B`:a>i?`W`:`draw`}function _(e){if(e.action===`new_game`){let{playerNames:t}=e,n=a();return{board:n,currentSide:`B`,playerNames:t,capturedStones:{B:0,W:0},counts:m(n),isTerminal:!1,winner:null,consecutivePasses:0,lastAction:{type:`new_game`}}}if(e.action===`pass`){let{board:t,currentSide:n,playerNames:r,capturedStones:i,consecutivePasses:a}=e,o=c(n),s=m(t),l=a+1,u=l>=2;return{board:t,currentSide:o,playerNames:r,capturedStones:i,counts:s,isTerminal:u,winner:u?g(t,i):null,consecutivePasses:l,lastAction:{type:`pass`}}}let{row:t,col:n,board:r,currentSide:i,playerNames:o,capturedStones:s}=e;if(!f(r,t,n,i))return{board:r,currentSide:i,playerNames:o,capturedStones:s,counts:m(r),isTerminal:!1,winner:null,consecutivePasses:0,lastAction:{type:`pass`},error:`Invalid move: (${t}, ${n}) is not a legal move for ${i}. The position must be empty and the move must not be suicide.`};let{newBoard:l,capturedCount:u}=p(r,t,n,i),d=c(i),h=m(l),_={...s};return u>0&&(_[i]+=u),{board:l,currentSide:d,playerNames:o,capturedStones:_,counts:h,isTerminal:!1,winner:null,consecutivePasses:0,lastAction:{type:`move`,row:t,col:n,captured:u}}}var v=async(e,t)=>{try{let e;if(t.action===`new_game`){let n;n=t.firstPlayer?t.firstPlayer:Math.random()<.5?`computer`:`user`,e={action:`new_game`,playerNames:{B:n,W:n===`user`?`computer`:`user`}}}else if(t.action===`move`){if(typeof t.row!=`number`||typeof t.col!=`number`||!t.board||!t.currentSide||!t.playerNames||!t.capturedStones)throw Error(`Move action requires row, col, board, currentSide, playerNames, and capturedStones parameters`);e={action:`move`,row:t.row,col:t.col,board:t.board,currentSide:t.currentSide,playerNames:t.playerNames,capturedStones:t.capturedStones}}else if(t.action===`pass`){if(!t.board||!t.currentSide||!t.playerNames||!t.capturedStones||typeof t.consecutivePasses!=`number`)throw Error(`Pass action requires board, currentSide, playerNames, capturedStones, and consecutivePasses parameters`);e={action:`pass`,board:t.board,currentSide:t.currentSide,playerNames:t.playerNames,capturedStones:t.capturedStones,consecutivePasses:t.consecutivePasses}}else throw Error(`Unknown action: ${t.action}`);let n=_(e);if(n.error){let e=n.playerNames[n.currentSide]===`computer`?`Invalid move attempted. You must make a valid move. Choose an empty intersection where placing a stone would not result in immediate capture (suicide rule).`:`Invalid move attempted. Tell the user they must make a valid move. The position must be empty and the move must not be suicide. The user will tell you the move by specifying column (A to J, skipping I) and row (1 to 9).`;return{message:n.error,jsonData:n,instructions:e,updating:!0}}let r=``;if(n.lastAction.type===`new_game`)r=`Started a new Go game on a 9x9 board! Black (●) goes first.`;else if(n.lastAction.type===`move`){let e=n.lastAction.captured>0?` and captured ${n.lastAction.captured} stone${n.lastAction.captured>1?`s`:``}`:``;r=`Played at (${n.lastAction.row}, ${n.lastAction.col})${e}.`}else n.lastAction.type===`pass`&&(r=`Passed the turn.`,n.consecutivePasses===1&&(r+=` One more pass will end the game.`));n.isTerminal&&(n.winner===`draw`?r+=` Game over - it's a draw!`:n.winner&&(r+=` Game over - ${n.winner===`B`?`Black`:`White`} wins!`));let i=n.playerNames[n.currentSide]===`computer`,a=n.isTerminal?`The game is over. Announce the game result with final scores.`:i?`The game state has been updated. It is your turn (you = AI assistant, computer). Make your move or pass.`:`The game state has been updated. Tell the user to make a move or pass. Do not describe the state of the game. The user is able to see it. The user will tell you the move by specifying column (A to J, skipping I) and row (1 to 9).`;return{message:r,jsonData:n,instructions:a,instructionsRequired:n.isTerminal||i,updating:t.action!==`new_game`}}catch(e){return console.error(`ERR: exception
|
|
6
|
-
Go game error`,e),{message:`Go game error: ${e instanceof Error?e.message:`Unknown error`}`,instructions:`Acknowledge that there was an error with the Go game and suggest trying again.`}}},y={toolDefinition:t,execute:v,generatingMessage:`Processing Go move...`,isEnabled:()=>!0,systemPrompt:n},b=[{name:`New Game (User First)`,args:{action:`new_game`,firstPlayer:`user`}},{name:`New Game (Computer First)`,args:{action:`new_game`,firstPlayer:`computer`}}];Object.defineProperty(exports
|
|
6
|
+
Go game error`,e),{message:`Go game error: ${e instanceof Error?e.message:`Unknown error`}`,instructions:`Acknowledge that there was an error with the Go game and suggest trying again.`}}},y={toolDefinition:t,execute:v,generatingMessage:`Processing Go move...`,isEnabled:()=>!0,systemPrompt:n},b=[{name:`New Game (User First)`,args:{action:`new_game`,firstPlayer:`user`}},{name:`New Game (Computer First)`,args:{action:`new_game`,firstPlayer:`computer`}}];Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return b}});
|
package/dist/style.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! tailwindcss v4.2
|
|
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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-900:oklch(41.4% .112 45.904);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-700:oklch(45.7% .24 277.023);--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-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-black:#000;--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-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--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{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-6{bottom:calc(var(--spacing) * -6)}.bottom-4{bottom:calc(var(--spacing) * 4)}.-left-6{left:calc(var(--spacing) * -6)}.left-1\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-\[600px\]{height:600px}.h-full{height:100%}.h-px{height:1px}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-around{justify-content:space-around}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing) * 0)}.gap-2{gap:calc(var(--spacing) * 2)}: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)))}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.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-2{border-style:var(--tw-border-style);border-width:2px}.border-amber-900{border-color:var(--color-amber-900)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-600{border-color:var(--color-gray-600)}.border-gray-700{border-color:var(--color-gray-700)}.border-indigo-200{border-color:var(--color-indigo-200)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-black{background-color:var(--color-black)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.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-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-200{color:var(--color-gray-200)}.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-indigo-700{color:var(--color-indigo-700)}.text-white{color:var(--color-white)}.opacity-50{opacity:.5}.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)}@media (hover:hover){.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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.3.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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-900:oklch(41.4% .112 45.904);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-700:oklch(45.7% .24 277.023);--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-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-black:#000;--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-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--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{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-6{bottom:calc(var(--spacing) * -6)}.bottom-4{bottom:calc(var(--spacing) * 4)}.-left-6{left:calc(var(--spacing) * -6)}.left-1\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-\[600px\]{height:600px}.h-full{height:100%}.h-px{height:1px}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-around{justify-content:space-around}.justify-center{justify-content:center}.gap-0{gap:0}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.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-2{border-style:var(--tw-border-style);border-width:2px}.border-amber-900{border-color:var(--color-amber-900)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-600{border-color:var(--color-gray-600)}.border-gray-700{border-color:var(--color-gray-700)}.border-indigo-200{border-color:var(--color-indigo-200)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-black{background-color:var(--color-black)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.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-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-200{color:var(--color-gray-200)}.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-indigo-700{color:var(--color-indigo-700)}.text-white{color:var(--color-white)}.opacity-50{opacity:.5}.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)}@media (hover:hover){.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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
3
|
/*$vite$:1*/
|
package/dist/vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./samples-C6WEBoT9.cjs");let t=require("vue");var n={class:`w-full h-full flex flex-col items-center justify-center p-4`},r={key:0,class:`flex flex-col items-center`},i={class:`text-white text-lg font-bold mb-2 text-center`},a={class:`text-white text-sm mb-4 text-center`},o={class:`relative p-4 bg-amber-100 rounded-lg border-2 border-amber-900`},s={class:`grid gap-0`,style:{gridTemplateColumns:`repeat(9, 1fr)`,width:`432px`,height:`432px`}},c=[`onClick`,`onMouseenter`,`onMouseleave`],l={class:`absolute inset-0 pointer-events-none`},u={key:0,class:`absolute left-1/2 top-1/2 w-0.5 bg-black`,style:{height:`48px`,transform:`translateX(-50%)`}},d={key:1,class:`absolute left-1/2 top-1/2 h-0.5 bg-black`,style:{width:`48px`,transform:`translateY(-50%)`}},f={key:0,class:`absolute inset-0 flex items-center justify-center pointer-events-none`},p={key:1,class:`absolute inset-0 flex items-center justify-center pointer-events-none`},m={key:2,class:`absolute inset-0 flex items-center justify-center pointer-events-none`},h={class:`absolute -bottom-6 left-4 right-4 flex justify-around`},g={class:`absolute -left-6 top-4 bottom-4 flex flex-col justify-around`},_=(0,t.defineComponent)({__name:`View`,props:{selectedResult:{},sendTextMessage:{type:Function}},setup(e){let _=e,v=(0,t.ref)(null),y=(0,t.ref)(null),b=[`A`,`B`,`C`,`D`,`E`,`F`,`G`,`H`,`J`];(0,t.watch)(()=>_.selectedResult,e=>{e?.toolName===`playGo`&&e.jsonData&&(v.value=e.jsonData)},{immediate:!0});let x=(0,t.computed)(()=>{if(!v.value?.playerNames)return``;let e=v.value.playerNames[v.value.currentSide];return e.charAt(0).toUpperCase()+e.slice(1)}),S=(0,t.computed)(()=>v.value?v.value.currentSide===`B`?`Black`:`White`:``),C=(0,t.computed)(()=>v.value?.playerNames&&v.value.playerNames[v.value.currentSide]===`computer`),w=(0,t.computed)(()=>{if(!v.value?.board)return[];let e=[];for(let t=0;t<9;t++)for(let n=0;n<9;n++){let r=v.value.board[t][n];e.push({row:t,col:n,piece:r===`.`?null:r})}return e});function T(e,t){return[[2,2],[2,6],[4,4],[6,2],[6,6]].some(([n,r])=>n===e&&r===t)}function E(e){return`relative w-12 h-12 ${!e.piece&&!C.value&&!v.value?.isTerminal?`cursor-pointer`:`cursor-default`}`}function D(e){if(!v.value||v.value.isTerminal||C.value)return;let t=w.value[e];if(t.piece)return;let n=b[t.col],r=t.row+1,i={row:t.row,col:t.col,currentState:v.value};_.sendTextMessage(`I want to play at ${n}${r}, which is column=${t.col}, row=${t.row}`,{data:i})}function O(e,t){!v.value||v.value.isTerminal||C.value||w.value[e].piece||(y.value=t?e:null)}return(e,_)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createElementVNode)(`div`,i,` Current Turn: `+(0,t.toDisplayString)(x.value)+` (`+(0,t.toDisplayString)(S.value)+`) `,1),(0,t.createElementVNode)(`div`,a,` Captured - Black: `+(0,t.toDisplayString)(v.value.capturedStones.B)+`, White: `+(0,t.toDisplayString)(v.value.capturedStones.W),1),(0,t.createElementVNode)(`div`,o,[(0,t.createElementVNode)(`div`,s,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(w.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n,class:(0,t.normalizeClass)(E(e)),onClick:e=>D(n),onMouseenter:e=>O(n,!0),onMouseleave:e=>O(n,!1)},[(0,t.createElementVNode)(`div`,l,[e.row<8?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,u)):(0,t.createCommentVNode)(``,!0),e.col<8?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,d)):(0,t.createCommentVNode)(``,!0)]),T(e.row,e.col)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,f,[..._[0]||=[(0,t.createElementVNode)(`div`,{class:`w-2 h-2 bg-black rounded-full`},null,-1)]])):(0,t.createCommentVNode)(``,!0),e.piece?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,p,[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`w-10 h-10 rounded-full border-2`,e.piece===`B`?`bg-black border-gray-700`:`bg-white border-gray-300`])},null,2)])):!C.value&&y.value===n?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,m,[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`w-10 h-10 rounded-full opacity-50`,v.value.currentSide===`B`?`bg-black`:`bg-white`])},null,2)])):(0,t.createCommentVNode)(``,!0)],42,c))),128))]),(0,t.createElementVNode)(`div`,h,[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(b,e=>(0,t.createElementVNode)(`div`,{key:e,class:`text-xs font-bold text-white w-12 text-center`},(0,t.toDisplayString)(e),1)),64))]),(0,t.createElementVNode)(`div`,g,[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(9,e=>(0,t.createElementVNode)(`div`,{key:e,class:`text-xs font-bold text-white h-12 flex items-center justify-center`},(0,t.toDisplayString)(e),1)),64))])])])):(0,t.createCommentVNode)(``,!0)]))}}),v={class:`p-3 bg-amber-50 rounded`},y={key:0,class:`space-y-1`},b={class:`flex justify-center`},x={class:`inline-block relative`,style:{"background-color":`#d4a574`,padding:`4px`}},S={class:`grid grid-cols-9`,style:{gap:`0px`}},C={key:0,class:`absolute left-1/2 top-1/2 w-px bg-black`,style:{height:`12px`,transform:`translateX(-50%)`}},w={key:1,class:`absolute left-1/2 top-1/2 h-px bg-black`,style:{width:`12px`,transform:`translateY(-50%)`}},T={key:2,class:`absolute w-1 h-1 bg-black rounded-full`,style:{"z-index":`1`}},E={key:3,class:`w-2.5 h-2.5 bg-black rounded-full relative`,style:{"z-index":`2`}},D={key:4,class:`w-2.5 h-2.5 bg-white rounded-full border border-gray-300 relative`,style:{"z-index":`2`}},O={class:`text-xs text-center space-y-1`},k={key:0,class:`text-gray-600`},A={key:1,class:`font-medium`},j={class:`text-gray-500 text-xs`},M=(0,t.defineComponent)({__name:`Preview`,props:{result:{}},setup(e){function n(e,t){return[[2,2],[2,6],[4,4],[6,2],[6,6]].some(([n,r])=>n===e&&r===t)}function r(e){return e.isTerminal?e.winner===`draw`?`Draw!`:e.winner===`B`?`⚫ Black Wins!`:e.winner===`W`?`⚪ White Wins!`:`Game Over`:``}function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}return(a,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,v,[e.result.jsonData?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,y,[(0,t.createElementVNode)(`div`,b,[(0,t.createElementVNode)(`div`,x,[(0,t.createElementVNode)(`div`,S,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.result.jsonData.board,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`${r}-${i}`,class:`w-3 h-3 flex items-center justify-center relative`},[Number(r)<8?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,C)):(0,t.createCommentVNode)(``,!0),Number(i)<8?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,w)):(0,t.createCommentVNode)(``,!0),n(Number(r),Number(i))?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,T)):(0,t.createCommentVNode)(``,!0),e===`B`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,E)):e===`W`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,D)):(0,t.createCommentVNode)(``,!0)]))),128))],64))),128))])])]),(0,t.createElementVNode)(`div`,O,[e.result.jsonData.isTerminal?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,A,(0,t.toDisplayString)(r(e.result.jsonData)),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,k,(0,t.toDisplayString)(e.result.jsonData.currentSide===`B`?`⚫`:`⚪`)+` `+(0,t.toDisplayString)(i(e.result.jsonData.playerNames[e.result.jsonData.currentSide]))+` to play `,1)),(0,t.createElementVNode)(`div`,j,` Captured: ⚫`+(0,t.toDisplayString)(e.result.jsonData.capturedStones.B)+` ⚪`+(0,t.toDisplayString)(e.result.jsonData.capturedStones.W),1)])])):(0,t.createCommentVNode)(``,!0)]))}}),N={...e.r,viewComponent:_,previewComponent:M,samples:e.t},P={plugin:N};exports.Preview=M,exports.SYSTEM_PROMPT=e.a,exports.TOOL_DEFINITION=e.o,exports.TOOL_NAME=e.s,exports.View=_,exports.default=P,exports.executeGo=e.n,exports.playGo=e.i,exports.plugin=N,exports.pluginCore=e.r,exports.samples=e.t;
|
package/dist/vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./samples-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./samples-3OJhbZ6y.js";
|
|
2
2
|
import { Fragment as s, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, ref as h, renderList as g, toDisplayString as _, watch as v } from "vue";
|
|
3
3
|
//#region src/vue/View.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var y = { class: "w-full h-full flex flex-col items-center justify-center p-4" }, b = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gui-chat-plugin/go",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Go (Baduk/Weiqi) game plugin for GUI Chat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"vue": "^3.5.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"gui-chat-protocol": "^0.
|
|
40
|
+
"gui-chat-protocol": "^0.4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@eslint/js": "^10.0.1",
|
|
44
|
-
"@tailwindcss/vite": "^4.2
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
46
|
-
"@typescript-eslint/parser": "^8.
|
|
47
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
48
|
-
"eslint": "^10.
|
|
49
|
-
"eslint-plugin-vue": "^10.9.
|
|
50
|
-
"globals": "^17.
|
|
51
|
-
"tailwindcss": "^4.2
|
|
44
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.64.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.64.0",
|
|
47
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
48
|
+
"eslint": "^10.7.0",
|
|
49
|
+
"eslint-plugin-vue": "^10.9.2",
|
|
50
|
+
"globals": "^17.7.0",
|
|
51
|
+
"tailwindcss": "^4.3.2",
|
|
52
52
|
"typescript": "~6.0.3",
|
|
53
|
-
"vite": "^8.
|
|
54
|
-
"vue": "^3.5.
|
|
55
|
-
"vue-eslint-parser": "^10.4.
|
|
56
|
-
"vue-tsc": "^3.
|
|
53
|
+
"vite": "^8.1.4",
|
|
54
|
+
"vue": "^3.5.39",
|
|
55
|
+
"vue-eslint-parser": "^10.4.1",
|
|
56
|
+
"vue-tsc": "^3.3.7"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"guichat",
|
|
File without changes
|