@vite-plugin-opencode-assistant/components 1.0.74 → 1.0.75
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/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/open-code-widget/composables/use-split.d.ts +1 -0
- package/es/open-code-widget/composables/use-split.mjs +15 -8
- package/es/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
- package/es/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
- package/es/open-code-widget/src/components/ChatPanel.vue.mjs +9 -4
- package/es/open-code-widget/src/components/Frame-sfc.css +1 -1
- package/es/open-code-widget/src/components/Header.vue.mjs +61 -28
- package/es/open-code-widget/src/context.d.ts +1 -0
- package/es/open-code-widget/src/index-sfc.css +1 -1
- package/es/open-code-widget/src/index.vue.d.ts +1 -0
- package/es/open-code-widget/src/index.vue.mjs +137 -120
- package/lib/@vite-plugin-opencode-assistant/components.cjs.js +189 -137
- package/lib/@vite-plugin-opencode-assistant/components.es.js +190 -138
- package/lib/components.css +3 -3
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/open-code-widget/composables/use-split.cjs +15 -8
- package/lib/open-code-widget/composables/use-split.d.ts +1 -0
- package/lib/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
- package/lib/open-code-widget/src/components/ChatPanel.vue.cjs +9 -4
- package/lib/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
- package/lib/open-code-widget/src/components/Frame-sfc.css +1 -1
- package/lib/open-code-widget/src/components/Header.vue.cjs +61 -28
- package/lib/open-code-widget/src/context.d.ts +1 -0
- package/lib/open-code-widget/src/index-sfc.css +1 -1
- package/lib/open-code-widget/src/index.vue.cjs +136 -119
- package/lib/open-code-widget/src/index.vue.d.ts +1 -0
- package/lib/web-types.json +1 -1
- package/package.json +2 -2
|
@@ -60,6 +60,7 @@ var import_use_inspector = require("../composables/use-inspector.cjs");
|
|
|
60
60
|
var import_use_persist_state = require("../composables/use-persist-state.cjs");
|
|
61
61
|
var import_use_split = require("../composables/use-split.cjs");
|
|
62
62
|
var import_context = require("./context.cjs");
|
|
63
|
+
var import_shared = require("@vite-plugin-opencode-assistant/shared");
|
|
63
64
|
var import_vue3 = require("vue");
|
|
64
65
|
const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProps(__spreadValues({}, {
|
|
65
66
|
name: "OpencodeWidget"
|
|
@@ -91,7 +92,8 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
91
92
|
sessionStates: { type: Object, required: false },
|
|
92
93
|
displayMode: { type: String, required: false, default: "bubble" },
|
|
93
94
|
splitMode: { type: Object, required: false, default: void 0 },
|
|
94
|
-
splitPanelWidth: { type: Number, required: false, default: 500 }
|
|
95
|
+
splitPanelWidth: { type: Number, required: false, default: 500 },
|
|
96
|
+
hideBubble: { type: Boolean, required: false, default: false }
|
|
95
97
|
},
|
|
96
98
|
emits: ["update:open", "update:selectMode", "update:sessionListCollapsed", "update:currentSessionId", "update:selectedElements", "update:theme", "update:thinking", "update:splitPanelWidth", "toggle", "close", "toggle-session-list", "toggle-select-mode", "toggle-theme", "create-session", "select-session", "delete-session", "click-selected-node", "remove-selected-node", "clear-selected-nodes", "empty-action", "frame-loaded", "thinking-change", "split-panel-width-change"],
|
|
97
99
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -153,8 +155,8 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
153
155
|
const splitPanelWidth = (0, import_vue2.ref)(props.splitPanelWidth);
|
|
154
156
|
const syncStateToIframe = () => {
|
|
155
157
|
if (!iframeLoaded.value) return;
|
|
156
|
-
sendMessageToIframe(
|
|
157
|
-
sendMessageToIframe(
|
|
158
|
+
sendMessageToIframe(import_shared.WIDGET_MSG.PROMPT_DOCK_VISIBILITY, { visible: promptDockVisible.value });
|
|
159
|
+
sendMessageToIframe(import_shared.WIDGET_MSG.MINIMIZE_STATE, { minimized: minimized.value });
|
|
158
160
|
};
|
|
159
161
|
const handleFrameLoaded = () => {
|
|
160
162
|
emit("frame-loaded");
|
|
@@ -180,6 +182,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
180
182
|
}
|
|
181
183
|
);
|
|
182
184
|
const handleToggleDisplayMode = () => {
|
|
185
|
+
if (localDisplayMode.value === "extension" || localDisplayMode.value === "extension-selector") return;
|
|
183
186
|
const modes = ["bubble", "split", "auto"];
|
|
184
187
|
const currentIndex = modes.indexOf(localDisplayMode.value);
|
|
185
188
|
const nextIndex = (currentIndex + 1) % modes.length;
|
|
@@ -279,6 +282,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
279
282
|
const {
|
|
280
283
|
effectiveMode,
|
|
281
284
|
isSplitMode,
|
|
285
|
+
isExtensionMode,
|
|
282
286
|
panelWidth,
|
|
283
287
|
splitConfig,
|
|
284
288
|
splitPosition,
|
|
@@ -364,12 +368,15 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
364
368
|
const handleToggleMinimize = () => {
|
|
365
369
|
minimized.value = !minimized.value;
|
|
366
370
|
promptDockVisible.value = !minimized.value;
|
|
367
|
-
sendMessageToIframe(
|
|
368
|
-
sendMessageToIframe(
|
|
371
|
+
sendMessageToIframe(import_shared.WIDGET_MSG.PROMPT_DOCK_VISIBILITY, { visible: promptDockVisible.value });
|
|
372
|
+
sendMessageToIframe(import_shared.WIDGET_MSG.MINIMIZE_STATE, { minimized: minimized.value });
|
|
369
373
|
};
|
|
370
374
|
const handleTogglePromptDock = () => {
|
|
371
375
|
promptDockVisible.value = !promptDockVisible.value;
|
|
372
|
-
sendMessageToIframe(
|
|
376
|
+
sendMessageToIframe(import_shared.WIDGET_MSG.PROMPT_DOCK_VISIBILITY, { visible: promptDockVisible.value });
|
|
377
|
+
};
|
|
378
|
+
const handleRefresh = () => {
|
|
379
|
+
window.location.reload();
|
|
373
380
|
};
|
|
374
381
|
const windowWidth = (0, import_vue2.ref)(typeof window !== "undefined" ? window.innerWidth : 0);
|
|
375
382
|
const windowHeight = (0, import_vue2.ref)(typeof window !== "undefined" ? window.innerHeight : 0);
|
|
@@ -550,7 +557,8 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
550
557
|
handleRemoveSelectedNode: (payload) => handleRemoveSelectedNode(payload.item, payload.index, payload.source),
|
|
551
558
|
handleClearSelectedNodes,
|
|
552
559
|
handleFrameLoaded,
|
|
553
|
-
handleBubbleOffsetChange
|
|
560
|
+
handleBubbleOffsetChange,
|
|
561
|
+
handleRefresh
|
|
554
562
|
});
|
|
555
563
|
__expose({
|
|
556
564
|
showNotification,
|
|
@@ -566,7 +574,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
566
574
|
return dialogResolve;
|
|
567
575
|
}, set dialogResolve(v) {
|
|
568
576
|
dialogResolve = v;
|
|
569
|
-
}, showConfirmDialog, handleDialogConfirm, handleDialogCancel, frameRef, triggerRef, sendMessageToIframe, localSessionListCollapsed, localDisplayMode, localSplitPosition, minimized, promptDockVisible, isRestoring, iframeLoaded, splitPanelWidth, syncStateToIframe, handleFrameLoaded, handleToggleDisplayMode, buttonActive, containerClasses, iframeSource, sessionListTitle, resolvedTheme, handleClose, handleEmptyAction, handleToggle, handleToggleSessionList, handleToggleTheme, sessionItems, handleCreateSession, handleDeleteSession, handleSelectSession, bubbleVisible, hasSelectedElements, selectedElementItems, handleClearSelectedNodes, handleClickSelectedNode, handleRemoveSelectedNode, handleToggleSelectMode, highlightVisible, highlightStyle, tooltipVisible, tooltipStyle, tooltipContent, bubbleOffset, effectiveMode, isSplitMode, panelWidth, splitConfig, splitPosition, handleResize, handleSplitToggle, handleTogglePosition, handleToggleMinimize, handleTogglePromptDock, windowWidth, windowHeight, handleWindowResize, bubbleQuadrant, isBubbleOnRightSide, chatPositionStyle, handleBubbleOffsetChange, handleResizeStart, handleResizeEnd, chatAnimationOrigin, isDragging, get wasOpenBeforeDrag() {
|
|
577
|
+
}, showConfirmDialog, handleDialogConfirm, handleDialogCancel, frameRef, triggerRef, sendMessageToIframe, localSessionListCollapsed, localDisplayMode, localSplitPosition, minimized, promptDockVisible, isRestoring, iframeLoaded, splitPanelWidth, syncStateToIframe, handleFrameLoaded, handleToggleDisplayMode, buttonActive, containerClasses, iframeSource, sessionListTitle, resolvedTheme, handleClose, handleEmptyAction, handleToggle, handleToggleSessionList, handleToggleTheme, sessionItems, handleCreateSession, handleDeleteSession, handleSelectSession, bubbleVisible, hasSelectedElements, selectedElementItems, handleClearSelectedNodes, handleClickSelectedNode, handleRemoveSelectedNode, handleToggleSelectMode, highlightVisible, highlightStyle, tooltipVisible, tooltipStyle, tooltipContent, bubbleOffset, effectiveMode, isSplitMode, isExtensionMode, panelWidth, splitConfig, splitPosition, handleResize, handleSplitToggle, handleTogglePosition, handleToggleMinimize, handleTogglePromptDock, handleRefresh, windowWidth, windowHeight, handleWindowResize, bubbleQuadrant, isBubbleOnRightSide, chatPositionStyle, handleBubbleOffsetChange, handleResizeStart, handleResizeEnd, chatAnimationOrigin, isDragging, get wasOpenBeforeDrag() {
|
|
570
578
|
return wasOpenBeforeDrag;
|
|
571
579
|
}, set wasOpenBeforeDrag(v) {
|
|
572
580
|
wasOpenBeforeDrag = v;
|
|
@@ -597,121 +605,130 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
597
605
|
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
598
606
|
"div",
|
|
599
607
|
{
|
|
600
|
-
class: (0, import_vue3.normalizeClass)($setup.
|
|
608
|
+
class: (0, import_vue3.normalizeClass)([...$setup.containerClasses, { "extension-mode": $setup.isExtensionMode }])
|
|
601
609
|
},
|
|
602
610
|
[
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
{
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
611
|
+
$props.displayMode !== "extension-selector" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
612
|
+
import_vue3.Fragment,
|
|
613
|
+
{ key: 0 },
|
|
614
|
+
[
|
|
615
|
+
!$setup.isSplitMode && !$setup.props.hideBubble ? ((0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(
|
|
616
|
+
$setup["Trigger"],
|
|
617
|
+
{
|
|
618
|
+
key: 0,
|
|
619
|
+
ref: "triggerRef",
|
|
620
|
+
onDragStart: $setup.handleDragStart,
|
|
621
|
+
onDragEnd: $setup.handleDragEnd
|
|
622
|
+
},
|
|
623
|
+
(0, import_vue3.createSlots)({
|
|
624
|
+
_: 2
|
|
625
|
+
/* DYNAMIC */
|
|
626
|
+
}, [
|
|
627
|
+
$setup.slots["button-icon"] ? {
|
|
628
|
+
name: "default",
|
|
629
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
630
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "button-icon")
|
|
631
|
+
]),
|
|
632
|
+
key: "0"
|
|
633
|
+
} : void 0
|
|
619
634
|
]),
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
635
|
+
1536
|
|
636
|
+
/* NEED_PATCH, DYNAMIC_SLOTS */
|
|
637
|
+
)) : (0, import_vue3.createCommentVNode)("v-if", true),
|
|
638
|
+
(0, import_vue3.createVNode)($setup["ChatPanel"], {
|
|
639
|
+
ref: "frameRef",
|
|
640
|
+
mode: $setup.effectiveMode,
|
|
641
|
+
open: $props.open,
|
|
642
|
+
minimized: $setup.minimized,
|
|
643
|
+
"position-style": $setup.chatPositionStyle,
|
|
644
|
+
"animation-origin": $setup.chatAnimationOrigin,
|
|
645
|
+
"panel-width": $setup.panelWidth,
|
|
646
|
+
resizable: $setup.splitConfig.resizable,
|
|
647
|
+
"min-width": $setup.splitConfig.minWidth,
|
|
648
|
+
"max-width": $setup.splitConfig.maxWidth,
|
|
649
|
+
"no-transition": $setup.isRestoring,
|
|
650
|
+
dragging: $setup.isDragging,
|
|
651
|
+
"notification-visible": $setup.notificationVisible,
|
|
652
|
+
"notification-message": $setup.notificationMessage,
|
|
653
|
+
"notification-mode": $setup.notificationMode,
|
|
654
|
+
thinking: $props.thinking,
|
|
655
|
+
"resolved-theme": $setup.resolvedTheme,
|
|
656
|
+
"split-position": $setup.splitPosition,
|
|
657
|
+
extension: $setup.isExtensionMode,
|
|
658
|
+
onResize: $setup.handleResize,
|
|
659
|
+
onResizeStart: $setup.handleResizeStart,
|
|
660
|
+
onResizeEnd: $setup.handleResizeEnd,
|
|
661
|
+
onToggle: $setup.handleSplitToggle
|
|
662
|
+
}, (0, import_vue3.createSlots)({
|
|
663
|
+
"sessions-empty": (0, import_vue3.withCtx)(() => [
|
|
664
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "sessions-empty", {}, () => [
|
|
665
|
+
_cache[0] || (_cache[0] = (0, import_vue3.createElementVNode)(
|
|
666
|
+
"div",
|
|
667
|
+
{ class: "opencode-session-empty" },
|
|
668
|
+
"\u6682\u65E0\u4F1A\u8BDD",
|
|
669
|
+
-1
|
|
670
|
+
/* CACHED */
|
|
671
|
+
))
|
|
672
|
+
])
|
|
673
|
+
]),
|
|
674
|
+
_: 2
|
|
675
|
+
/* DYNAMIC */
|
|
676
|
+
}, [
|
|
677
|
+
$setup.slots["session-toggle-icon"] ? {
|
|
678
|
+
name: "session-toggle-icon",
|
|
679
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
680
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "session-toggle-icon")
|
|
681
|
+
]),
|
|
682
|
+
key: "0"
|
|
683
|
+
} : void 0,
|
|
684
|
+
$setup.slots["select-icon"] ? {
|
|
685
|
+
name: "select-icon",
|
|
686
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
687
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "select-icon")
|
|
688
|
+
]),
|
|
689
|
+
key: "1"
|
|
690
|
+
} : void 0,
|
|
691
|
+
$setup.slots["close-icon"] ? {
|
|
692
|
+
name: "close-icon",
|
|
693
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
694
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "close-icon")
|
|
695
|
+
]),
|
|
696
|
+
key: "2"
|
|
697
|
+
} : void 0,
|
|
698
|
+
$setup.slots["empty-state"] ? {
|
|
699
|
+
name: "empty-state",
|
|
700
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
701
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "empty-state")
|
|
702
|
+
]),
|
|
703
|
+
key: "3"
|
|
704
|
+
} : void 0,
|
|
705
|
+
$setup.slots.loading ? {
|
|
706
|
+
name: "loading",
|
|
707
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
708
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "loading")
|
|
709
|
+
]),
|
|
710
|
+
key: "4"
|
|
711
|
+
} : void 0,
|
|
712
|
+
$setup.slots.error ? {
|
|
713
|
+
name: "error",
|
|
714
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
715
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "error")
|
|
716
|
+
]),
|
|
717
|
+
key: "5"
|
|
718
|
+
} : void 0,
|
|
719
|
+
$setup.slots.content ? {
|
|
720
|
+
name: "content",
|
|
721
|
+
fn: (0, import_vue3.withCtx)(() => [
|
|
722
|
+
(0, import_vue3.renderSlot)(_ctx.$slots, "content")
|
|
723
|
+
]),
|
|
724
|
+
key: "6"
|
|
725
|
+
} : void 0
|
|
726
|
+
]), 1032, ["mode", "open", "minimized", "position-style", "animation-origin", "panel-width", "resizable", "min-width", "max-width", "no-transition", "dragging", "notification-visible", "notification-message", "notification-mode", "thinking", "resolved-theme", "split-position", "extension", "onResize", "onToggle"]),
|
|
727
|
+
(0, import_vue3.createVNode)($setup["SelectHint"])
|
|
728
|
+
],
|
|
729
|
+
64
|
|
730
|
+
/* STABLE_FRAGMENT */
|
|
625
731
|
)) : (0, import_vue3.createCommentVNode)("v-if", true),
|
|
626
|
-
(0, import_vue3.createVNode)($setup["ChatPanel"], {
|
|
627
|
-
ref: "frameRef",
|
|
628
|
-
mode: $setup.effectiveMode,
|
|
629
|
-
open: $props.open,
|
|
630
|
-
minimized: $setup.minimized,
|
|
631
|
-
"position-style": $setup.chatPositionStyle,
|
|
632
|
-
"animation-origin": $setup.chatAnimationOrigin,
|
|
633
|
-
"panel-width": $setup.panelWidth,
|
|
634
|
-
resizable: $setup.splitConfig.resizable,
|
|
635
|
-
"min-width": $setup.splitConfig.minWidth,
|
|
636
|
-
"max-width": $setup.splitConfig.maxWidth,
|
|
637
|
-
"no-transition": $setup.isRestoring,
|
|
638
|
-
dragging: $setup.isDragging,
|
|
639
|
-
"notification-visible": $setup.notificationVisible,
|
|
640
|
-
"notification-message": $setup.notificationMessage,
|
|
641
|
-
"notification-mode": $setup.notificationMode,
|
|
642
|
-
thinking: $props.thinking,
|
|
643
|
-
"resolved-theme": $setup.resolvedTheme,
|
|
644
|
-
"split-position": $setup.splitPosition,
|
|
645
|
-
onResize: $setup.handleResize,
|
|
646
|
-
onResizeStart: $setup.handleResizeStart,
|
|
647
|
-
onResizeEnd: $setup.handleResizeEnd,
|
|
648
|
-
onToggle: $setup.handleSplitToggle
|
|
649
|
-
}, (0, import_vue3.createSlots)({
|
|
650
|
-
"sessions-empty": (0, import_vue3.withCtx)(() => [
|
|
651
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "sessions-empty", {}, () => [
|
|
652
|
-
_cache[0] || (_cache[0] = (0, import_vue3.createElementVNode)(
|
|
653
|
-
"div",
|
|
654
|
-
{ class: "opencode-session-empty" },
|
|
655
|
-
"\u6682\u65E0\u4F1A\u8BDD",
|
|
656
|
-
-1
|
|
657
|
-
/* CACHED */
|
|
658
|
-
))
|
|
659
|
-
])
|
|
660
|
-
]),
|
|
661
|
-
_: 2
|
|
662
|
-
/* DYNAMIC */
|
|
663
|
-
}, [
|
|
664
|
-
$setup.slots["session-toggle-icon"] ? {
|
|
665
|
-
name: "session-toggle-icon",
|
|
666
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
667
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "session-toggle-icon")
|
|
668
|
-
]),
|
|
669
|
-
key: "0"
|
|
670
|
-
} : void 0,
|
|
671
|
-
$setup.slots["select-icon"] ? {
|
|
672
|
-
name: "select-icon",
|
|
673
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
674
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "select-icon")
|
|
675
|
-
]),
|
|
676
|
-
key: "1"
|
|
677
|
-
} : void 0,
|
|
678
|
-
$setup.slots["close-icon"] ? {
|
|
679
|
-
name: "close-icon",
|
|
680
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
681
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "close-icon")
|
|
682
|
-
]),
|
|
683
|
-
key: "2"
|
|
684
|
-
} : void 0,
|
|
685
|
-
$setup.slots["empty-state"] ? {
|
|
686
|
-
name: "empty-state",
|
|
687
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
688
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "empty-state")
|
|
689
|
-
]),
|
|
690
|
-
key: "3"
|
|
691
|
-
} : void 0,
|
|
692
|
-
$setup.slots.loading ? {
|
|
693
|
-
name: "loading",
|
|
694
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
695
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "loading")
|
|
696
|
-
]),
|
|
697
|
-
key: "4"
|
|
698
|
-
} : void 0,
|
|
699
|
-
$setup.slots.error ? {
|
|
700
|
-
name: "error",
|
|
701
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
702
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "error")
|
|
703
|
-
]),
|
|
704
|
-
key: "5"
|
|
705
|
-
} : void 0,
|
|
706
|
-
$setup.slots.content ? {
|
|
707
|
-
name: "content",
|
|
708
|
-
fn: (0, import_vue3.withCtx)(() => [
|
|
709
|
-
(0, import_vue3.renderSlot)(_ctx.$slots, "content")
|
|
710
|
-
]),
|
|
711
|
-
key: "6"
|
|
712
|
-
} : void 0
|
|
713
|
-
]), 1032, ["mode", "open", "minimized", "position-style", "animation-origin", "panel-width", "resizable", "min-width", "max-width", "no-transition", "dragging", "notification-visible", "notification-message", "notification-mode", "thinking", "resolved-theme", "split-position", "onResize", "onToggle"]),
|
|
714
|
-
(0, import_vue3.createVNode)($setup["SelectHint"]),
|
|
715
732
|
(0, import_vue3.withDirectives)((0, import_vue3.createElementVNode)(
|
|
716
733
|
"div",
|
|
717
734
|
{
|
|
@@ -56,6 +56,7 @@ declare const __VLS_component: import("vue").DefineComponent<OpenCodeWidgetProps
|
|
|
56
56
|
currentSessionId: string | null;
|
|
57
57
|
selectedElements: import("@vite-plugin-opencode-assistant/shared").OpenCodeSelectedElement[];
|
|
58
58
|
splitMode: import("@vite-plugin-opencode-assistant/shared").SplitModeOptions;
|
|
59
|
+
hideBubble: boolean;
|
|
59
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
61
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
61
62
|
export default _default;
|
package/lib/web-types.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","framework":"vue","name":"@vite-plugin-opencode-assistant/components","version":"1.0.
|
|
1
|
+
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","framework":"vue","name":"@vite-plugin-opencode-assistant/components","version":"1.0.75","contributions":{"html":{"tags":[{"name":"open-code","attributes":[{"name":"","default":"`'bottom-right'`","description":"挂件显示的位置","value":{"type":"`'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'`","kind":"expression"}},{"name":"","default":"`false`","description":"挂件是否打开","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`'auto'`","description":"主题模式","value":{"type":"`'light' | 'dark' | 'auto'`","kind":"expression"}},{"name":"","default":"`'AI 助手'`","description":"助手头部显示的标题","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`'Ctrl+K'`","description":"快捷键提示文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`'按 ESC 或 Ctrl+P 退出'`","description":"选择模式快捷键提示文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`false`","description":"是否进入选择页面元素模式","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`true`","description":"会话列表是否折叠","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`'id'`","description":"会话列表项的唯一键字段","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`false`","description":"iframe 是否显示加载状态","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`undefined`","description":"会话列表是否加载中","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示会话列表骨架屏","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示空状态","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示错误状态","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`'当前项目暂无会话'`","description":"空状态显示的文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`'立即创建'`","description":"空状态操作按钮文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`''`","description":"Web UI 的 URL 来源","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`[]`","description":"会话列表数据","value":{"type":"`OpenCodeWidgetSession[]`","kind":"expression"}},{"name":"","default":"`null`","description":"当前选中的会话 ID","value":{"type":"`string | null`","kind":"expression"}},{"name":"","default":"`[]`","description":"已选中的元素列表","value":{"type":"`OpenCodeSelectedElement[]`","kind":"expression"}},{"name":"","default":"`true`","description":"是否显示\"一键清空\"按钮","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`true`","description":"是否启用选择模式","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示思考状态(加载中)","value":{"type":"`boolean`","kind":"expression"}}],"events":[{"name":"`update:open`","description":"当挂件打开或关闭时触发","arguments":[{"name":"open","type":"en"},{"name":"boolean"}]},{"name":"`update:selectMode`","description":"当选择模式切换时触发","arguments":[{"name":"mode","type":"de"},{"name":"boolean"}]},{"name":"`update:sessionListCollapsed`","description":"当会话列表折叠状态改变时触发","arguments":[{"name":"collapsed","type":"ed"},{"name":"boolean"}]},{"name":"`update:currentSessionId`","description":"当选中的会话 ID 改变时触发","arguments":[{"name":"sessionId","type":"Id"},{"name":"string | null"}]},{"name":"`update:selectedElements`","description":"当已选中的元素列表改变时触发","arguments":[{"name":"elements","type":"ts"},{"name":"OpenCodeSelectedElement[]"}]},{"name":"`update:theme`","description":"当主题模式改变时触发","arguments":[{"name":"theme","type":"me"},{"name":"'light' | 'dark' | 'auto'"}]},{"name":"`update:thinking`","description":"当思考状态改变时触发","arguments":[{"name":"thinking","type":"ng"},{"name":"boolean"}]},{"name":"","description":"点击触发挂件开关","arguments":[{"name":"open","type":"en"},{"name":"boolean"}]},{"name":"","description":"点击关闭按钮时触发","arguments":[]},{"name":"`toggle-session-list`","description":"点击会话列表切换按钮时触发","arguments":[{"name":"collapsed","type":"ed"},{"name":"boolean"}]},{"name":"`toggle-select-mode`","description":"点击选择模式切换按钮时触发","arguments":[{"name":"mode","type":"de"},{"name":"boolean"}]},{"name":"`toggle-theme`","description":"点击主题切换按钮时触发","arguments":[{"name":"theme","type":"me"},{"name":"'light' | 'dark' | 'auto'"}]},{"name":"`create-session`","description":"点击创建新会话时触发","arguments":[]},{"name":"`select-session`","description":"选中某个历史会话时触发","arguments":[{"name":"session","type":"on"},{"name":"OpenCodeWidgetSession"}]},{"name":"`delete-session`","description":"删除某个历史会话时触发","arguments":[{"name":"session","type":"on"},{"name":"OpenCodeWidgetSession"}]},{"name":"`click-selected-node`","description":"点击已选中的气泡或节点卡片时触发","arguments":[{"name":"element","type":"nt"},{"name":"OpenCodeSelectedElement"}]},{"name":"`remove-selected-node`","description":"删除已选中的元素时触发","arguments":[{"name":"payload","type":"ad"},{"name":"OpenCodeRemoveSelectedPayload"}]},{"name":"`clear-selected-nodes`","description":"清空所有选中元素时触发","arguments":[]},{"name":"`empty-action`","description":"点击空状态操作按钮时触发","arguments":[]},{"name":"`frame-loaded`","description":"iframe 加载完成时触发","arguments":[]},{"name":"`thinking-change`","description":"思考状态改变时触发(用于显示加载动画)","arguments":[{"name":"thinking","type":"ng"},{"name":"boolean"}]}],"slots":[{"name":"`button-icon`","description":"自定义触发按钮图标"},{"name":"`session-toggle-icon`","description":"自定义会话列表切换图标"},{"name":"`select-icon`","description":"自定义选择模式切换图标"},{"name":"`close-icon`","description":"自定义关闭按钮图标"},{"name":"`theme-icon`","description":"自定义主题切换图标"},{"name":"`sessions-empty`","description":"自定义会话列表空状态"},{"name":"`empty-state`","description":"自定义 iframe 空状态"},{"name":"","description":"自定义 iframe 加载状态"},{"name":"","description":"自定义错误状态"},{"name":"","description":"自定义 iframe 内容"}]}],"attributes":[]}},"js-types-syntax":"typescript"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-plugin-opencode-assistant/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.75",
|
|
4
4
|
"description": "Reusable OpenCode widget components built with Pagoda CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"css-selector-generator": "^3.9.1",
|
|
34
|
-
"@vite-plugin-opencode-assistant/shared": "1.0.
|
|
34
|
+
"@vite-plugin-opencode-assistant/shared": "1.0.75"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "pagoda-cli build",
|