@lvce-editor/chat-view 3.3.0 → 3.4.0
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/chatViewWorkerMain.js +12 -3
- package/package.json +1 -1
|
@@ -1118,6 +1118,9 @@ const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
|
|
|
1118
1118
|
const command = 'HandleMessagePort.handleMessagePort2';
|
|
1119
1119
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
1120
1120
|
};
|
|
1121
|
+
const sendMessagePortToChatNetworkWorker = async port => {
|
|
1122
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToChatNetworkWorker', port, 'HandleMessagePort.handleMessagePort');
|
|
1123
|
+
};
|
|
1121
1124
|
const activateByEvent$1 = (event, assetDir, platform) => {
|
|
1122
1125
|
return invoke('ExtensionHostManagement.activateByEvent', event, assetDir, platform);
|
|
1123
1126
|
};
|
|
@@ -1275,6 +1278,9 @@ const getComposerHeight = async (state, value, width = state.width) => {
|
|
|
1275
1278
|
composerLineHeight,
|
|
1276
1279
|
maxComposerRows
|
|
1277
1280
|
} = state;
|
|
1281
|
+
if (value === '') {
|
|
1282
|
+
return composerLineHeight;
|
|
1283
|
+
}
|
|
1278
1284
|
const minimumHeight = getMinComposerHeight(composerLineHeight);
|
|
1279
1285
|
const maximumHeight = getMaxComposerHeight(composerLineHeight, maxComposerRows);
|
|
1280
1286
|
const content = value || ' ';
|
|
@@ -5662,6 +5668,9 @@ const handleClickSettings = async () => {
|
|
|
5662
5668
|
};
|
|
5663
5669
|
|
|
5664
5670
|
const handleInput = async (state, name, value, inputSource = 'user') => {
|
|
5671
|
+
const {
|
|
5672
|
+
selectedSessionId
|
|
5673
|
+
} = state;
|
|
5665
5674
|
if (name === OpenApiApiKeyInput) {
|
|
5666
5675
|
return {
|
|
5667
5676
|
...state,
|
|
@@ -5677,9 +5686,9 @@ const handleInput = async (state, name, value, inputSource = 'user') => {
|
|
|
5677
5686
|
if (name !== Composer) {
|
|
5678
5687
|
return state;
|
|
5679
5688
|
}
|
|
5680
|
-
if (
|
|
5689
|
+
if (selectedSessionId) {
|
|
5681
5690
|
await appendChatViewEvent({
|
|
5682
|
-
sessionId:
|
|
5691
|
+
sessionId: selectedSessionId,
|
|
5683
5692
|
timestamp: new Date().toISOString(),
|
|
5684
5693
|
type: 'handle-input',
|
|
5685
5694
|
value
|
|
@@ -7897,7 +7906,7 @@ const commandMap = {
|
|
|
7897
7906
|
};
|
|
7898
7907
|
|
|
7899
7908
|
const send = port => {
|
|
7900
|
-
return
|
|
7909
|
+
return sendMessagePortToChatNetworkWorker(port);
|
|
7901
7910
|
};
|
|
7902
7911
|
const initializeChatNetworkWorker = async () => {
|
|
7903
7912
|
const rpc = await create$4({
|