node-red-contrib-knx-ultimate 7.1.4 → 8.0.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/CHANGELOG.md +20 -10
- package/MIGRATION.md +40 -0
- package/README.md +32 -6
- package/docs/README.md +34 -0
- package/docs/assets/brand/made-in-italy.svg +12 -0
- package/examples/Alerter - Device Alert Aggregation.json +5 -2
- package/examples/Auto Responder - Read Request Defaults.json +5 -2
- package/examples/Garage - Door Controller.json +5 -2
- package/examples/Global Context - Expose KNX Values.json +5 -2
- package/examples/KNX DateTime - Set Date and Time to Bus.json +111 -89
- package/examples/Load Control - Manual Shedding Mode.json +5 -2
- package/examples/Logger ETS File and Telegram Count.json +10 -2
- package/examples/Scene Controller Recall and Save.json +33 -6
- package/examples/Staircase - Timer, Override and Block.json +5 -2
- package/examples/WatchDog Connect Disconnect.json +98 -70
- package/nodes/commonFunctions.js +0 -587
- package/nodes/knxUltimate-config.html +0 -14
- package/nodes/knxUltimate-config.js +1 -18
- package/nodes/knxUltimate.html +1 -6
- package/nodes/knxUltimateIoTBridge.html +0 -14
- package/nodes/knxUltimateLegacyMigration.js +75 -0
- package/nodes/knxUltimateMultiRouting.html +1 -7
- package/nodes/knxUltimateRouterFilter.html +1 -7
- package/nodes/knxUltimateUtility.html +0 -6
- package/nodes/knxUltimateViewer.html +0 -6
- package/nodes/locales/de/knxUltimate-config.html +0 -8
- package/nodes/locales/de/knxUltimate.html +0 -8
- package/nodes/locales/de/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/de/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/de/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/de/knxUltimateUtility.html +0 -8
- package/nodes/locales/de/knxUltimateUtility.json +16 -1
- package/nodes/locales/de/knxUltimateViewer.html +0 -8
- package/nodes/locales/en/knxUltimate-config.html +0 -8
- package/nodes/locales/en/knxUltimate.html +0 -8
- package/nodes/locales/en/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/en/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/en/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/en/knxUltimateUtility.html +0 -8
- package/nodes/locales/en/knxUltimateUtility.json +16 -1
- package/nodes/locales/en/knxUltimateViewer.html +0 -8
- package/nodes/locales/es/knxUltimate-config.html +0 -8
- package/nodes/locales/es/knxUltimate.html +0 -8
- package/nodes/locales/es/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/es/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/es/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/es/knxUltimateUtility.html +0 -8
- package/nodes/locales/es/knxUltimateUtility.json +17 -2
- package/nodes/locales/es/knxUltimateViewer.html +0 -8
- package/nodes/locales/fr/knxUltimate-config.html +0 -8
- package/nodes/locales/fr/knxUltimate.html +0 -8
- package/nodes/locales/fr/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/fr/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/fr/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/fr/knxUltimateUtility.html +0 -8
- package/nodes/locales/fr/knxUltimateUtility.json +16 -1
- package/nodes/locales/fr/knxUltimateViewer.html +0 -8
- package/nodes/locales/it/knxUltimate-config.html +0 -8
- package/nodes/locales/it/knxUltimate.html +0 -8
- package/nodes/locales/it/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/it/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/it/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/it/knxUltimateUtility.html +0 -8
- package/nodes/locales/it/knxUltimateUtility.json +16 -1
- package/nodes/locales/it/knxUltimateViewer.html +0 -8
- package/nodes/locales/zh-CN/knxUltimate-config.html +0 -8
- package/nodes/locales/zh-CN/knxUltimate.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateIoTBridge.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateMultiRouting.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateRouterFilter.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateUtility.html +0 -8
- package/nodes/locales/zh-CN/knxUltimateUtility.json +16 -1
- package/nodes/locales/zh-CN/knxUltimateViewer.html +0 -8
- package/nodes/plugins/knxUltimate-v8-migration-recovery-plugin.html +140 -0
- package/package.json +22 -69
- package/resources/11f26b4500.js +2 -2
- package/resources/KNXAIChatAdapterMappings.js +2 -416
- package/resources/configNodeEditorSelection.js +2 -32
- package/resources/hueControllerEditorSelection.js +2 -32
- package/resources/hueControllerMigrationDialog.js +2 -254
- package/resources/hueControllerProfiles.js +2 -9319
- package/resources/knxUtilityProfiles.js +2041 -2082
- package/resources/legacyMigrationNotice.js +23 -111
- package/resources/matterQrScanner.js +2 -98
- package/resources/upgradeToV8.js +94 -26
- package/scripts/check-legacy-flows.js +142 -0
- package/examples/Hue Area Motion - Zone Presence.json +0 -77
- package/examples/Hue Battery - Level Status.json +0 -77
- package/examples/Hue Button - Short and Dim Commands.json +0 -83
- package/examples/Hue Camera Motion - Presence.json +0 -77
- package/examples/Hue Config - Bridge Template.json +0 -27
- package/examples/Hue Contact Sensor - Open Closed.json +0 -75
- package/examples/Hue Device Software Update - Availability.json +0 -77
- package/examples/Hue Humidity Sensor - Relative Humidity.json +0 -77
- package/examples/Hue Light - Switch and Brightness.json +0 -67
- package/examples/Hue Light Sensor - Lux to KNX.json +0 -77
- package/examples/Hue Motion - Presence Sensor.json +0 -76
- package/examples/Hue Plug - Switch and State.json +0 -63
- package/examples/Hue Scene - Recall from KNX.json +0 -63
- package/examples/Hue Tap Dial - Relative Dimming.json +0 -76
- package/examples/Hue Temperature Sensor - Celsius to KNX.json +0 -77
- package/examples/Hue Zigbee Connectivity - Online Status.json +0 -77
- package/examples/Matter Controller - Semantic Flow Input.json +0 -248
- package/nodes/hue-config.html +0 -378
- package/nodes/hue-config.js +0 -846
- package/nodes/icons/node-alerter-icon.png +0 -0
- package/nodes/icons/node-homekit-icon.png +0 -0
- package/nodes/icons/node-homekit-icon.svg +0 -10
- package/nodes/icons/node-hue-icon.svg +0 -10
- package/nodes/icons/node-knx-icon.png +0 -0
- package/nodes/icons/node-logger-icon.png +0 -0
- package/nodes/icons/node-logger2-icon.png +0 -0
- package/nodes/icons/node-logger2-icon.svg +0 -32
- package/nodes/icons/node-matter-bridge-icon.svg +0 -6
- package/nodes/icons/node-matter-controller-icon.svg +0 -6
- package/nodes/icons/node-matter-icon.svg +0 -12
- package/nodes/icons/node-scene-icon.png +0 -0
- package/nodes/icons/node-watchdog-icon.png +0 -0
- package/nodes/knxUltimateAI.html +0 -1826
- package/nodes/knxUltimateAI.js +0 -16797
- package/nodes/knxUltimateAIHomeAssistant.html +0 -54
- package/nodes/knxUltimateAIHomeAssistant.js +0 -152
- package/nodes/knxUltimateAlerter.html +0 -267
- package/nodes/knxUltimateAlerter.js +0 -300
- package/nodes/knxUltimateAutoResponder.html +0 -128
- package/nodes/knxUltimateAutoResponder.js +0 -264
- package/nodes/knxUltimateDateTime.html +0 -579
- package/nodes/knxUltimateDateTime.js +0 -282
- package/nodes/knxUltimateGarage.html +0 -337
- package/nodes/knxUltimateGarage.js +0 -504
- package/nodes/knxUltimateGlobalContext.html +0 -145
- package/nodes/knxUltimateGlobalContext.js +0 -208
- package/nodes/knxUltimateHATranslator.html +0 -85
- package/nodes/knxUltimateHATranslator.js +0 -83
- package/nodes/knxUltimateHueAreaMotion.html +0 -670
- package/nodes/knxUltimateHueAreaMotion.js +0 -218
- package/nodes/knxUltimateHueBattery.html +0 -646
- package/nodes/knxUltimateHueBattery.js +0 -182
- package/nodes/knxUltimateHueButton.html +0 -804
- package/nodes/knxUltimateHueButton.js +0 -292
- package/nodes/knxUltimateHueCameraMotion.html +0 -671
- package/nodes/knxUltimateHueCameraMotion.js +0 -218
- package/nodes/knxUltimateHueContactSensor.html +0 -609
- package/nodes/knxUltimateHueContactSensor.js +0 -188
- package/nodes/knxUltimateHueController.html +0 -1765
- package/nodes/knxUltimateHueController.js +0 -28
- package/nodes/knxUltimateHueHumiditySensor.html +0 -641
- package/nodes/knxUltimateHueHumiditySensor.js +0 -201
- package/nodes/knxUltimateHueLight.html +0 -2516
- package/nodes/knxUltimateHueLight.js +0 -1582
- package/nodes/knxUltimateHueLightSensor.html +0 -636
- package/nodes/knxUltimateHueLightSensor.js +0 -177
- package/nodes/knxUltimateHueMotion.html +0 -634
- package/nodes/knxUltimateHueMotion.js +0 -182
- package/nodes/knxUltimateHuePlug.html +0 -576
- package/nodes/knxUltimateHuePlug.js +0 -341
- package/nodes/knxUltimateHueScene.html +0 -967
- package/nodes/knxUltimateHueScene.js +0 -349
- package/nodes/knxUltimateHueTapDial.html +0 -640
- package/nodes/knxUltimateHueTapDial.js +0 -268
- package/nodes/knxUltimateHueTemperatureSensor.html +0 -639
- package/nodes/knxUltimateHueTemperatureSensor.js +0 -184
- package/nodes/knxUltimateHueZigbeeConnectivity.html +0 -648
- package/nodes/knxUltimateHueZigbeeConnectivity.js +0 -182
- package/nodes/knxUltimateHuedevice_software_update.html +0 -650
- package/nodes/knxUltimateHuedevice_software_update.js +0 -182
- package/nodes/knxUltimateLoadControl.html +0 -425
- package/nodes/knxUltimateLoadControl.js +0 -443
- package/nodes/knxUltimateLogger.html +0 -197
- package/nodes/knxUltimateLogger.js +0 -224
- package/nodes/knxUltimateMatterBridge.html +0 -689
- package/nodes/knxUltimateMatterBridge.js +0 -464
- package/nodes/knxUltimateMatterControllerDevice.html +0 -2851
- package/nodes/knxUltimateMatterControllerDevice.js +0 -1747
- package/nodes/knxUltimateSceneController.html +0 -529
- package/nodes/knxUltimateSceneController.js +0 -437
- package/nodes/knxUltimateStaircase.html +0 -346
- package/nodes/knxUltimateStaircase.js +0 -463
- package/nodes/knxUltimateWatchDog.html +0 -241
- package/nodes/knxUltimateWatchDog.js +0 -230
- package/nodes/locales/de/hue-config.html +0 -33
- package/nodes/locales/de/hue-config.json +0 -21
- package/nodes/locales/de/knxUltimateAI.html +0 -13
- package/nodes/locales/de/knxUltimateAI.json +0 -231
- package/nodes/locales/de/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/de/knxUltimateAlerter.html +0 -159
- package/nodes/locales/de/knxUltimateAlerter.json +0 -27
- package/nodes/locales/de/knxUltimateAutoResponder.html +0 -96
- package/nodes/locales/de/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/de/knxUltimateDateTime.html +0 -45
- package/nodes/locales/de/knxUltimateDateTime.json +0 -32
- package/nodes/locales/de/knxUltimateGarage.html +0 -79
- package/nodes/locales/de/knxUltimateGarage.json +0 -51
- package/nodes/locales/de/knxUltimateGlobalContext.html +0 -76
- package/nodes/locales/de/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/de/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/de/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/de/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/de/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/de/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/de/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/de/knxUltimateHueButton.html +0 -52
- package/nodes/locales/de/knxUltimateHueButton.json +0 -34
- package/nodes/locales/de/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/de/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/de/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/de/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/de/knxUltimateHueController.html +0 -690
- package/nodes/locales/de/knxUltimateHueController.json +0 -64
- package/nodes/locales/de/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/de/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/de/knxUltimateHueLight.html +0 -121
- package/nodes/locales/de/knxUltimateHueLight.json +0 -94
- package/nodes/locales/de/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/de/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/de/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/de/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/de/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/de/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/de/knxUltimateHueScene.html +0 -45
- package/nodes/locales/de/knxUltimateHueScene.json +0 -41
- package/nodes/locales/de/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/de/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/de/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/de/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/de/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/de/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/de/knxUltimateLoadControl.html +0 -69
- package/nodes/locales/de/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/de/knxUltimateLogger.html +0 -126
- package/nodes/locales/de/knxUltimateLogger.json +0 -31
- package/nodes/locales/de/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/de/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/de/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/de/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/de/knxUltimateSceneController.html +0 -98
- package/nodes/locales/de/knxUltimateSceneController.json +0 -32
- package/nodes/locales/de/knxUltimateStaircase.html +0 -77
- package/nodes/locales/de/knxUltimateStaircase.json +0 -62
- package/nodes/locales/de/knxUltimateWatchDog.html +0 -178
- package/nodes/locales/de/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/de/matter-config.html +0 -47
- package/nodes/locales/de/matter-config.json +0 -47
- package/nodes/locales/de/matterbridge-config.html +0 -45
- package/nodes/locales/de/matterbridge-config.json +0 -25
- package/nodes/locales/en/hue-config.html +0 -31
- package/nodes/locales/en/hue-config.json +0 -21
- package/nodes/locales/en/knxUltimateAI.html +0 -13
- package/nodes/locales/en/knxUltimateAI.json +0 -234
- package/nodes/locales/en/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/en/knxUltimateAlerter.html +0 -164
- package/nodes/locales/en/knxUltimateAlerter.json +0 -27
- package/nodes/locales/en/knxUltimateAutoResponder.html +0 -94
- package/nodes/locales/en/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/en/knxUltimateDateTime.html +0 -67
- package/nodes/locales/en/knxUltimateDateTime.json +0 -32
- package/nodes/locales/en/knxUltimateGarage.html +0 -79
- package/nodes/locales/en/knxUltimateGarage.json +0 -51
- package/nodes/locales/en/knxUltimateGlobalContext.html +0 -124
- package/nodes/locales/en/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/en/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/en/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/en/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/en/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/en/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/en/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/en/knxUltimateHueButton.html +0 -52
- package/nodes/locales/en/knxUltimateHueButton.json +0 -34
- package/nodes/locales/en/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/en/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/en/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/en/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/en/knxUltimateHueController.html +0 -691
- package/nodes/locales/en/knxUltimateHueController.json +0 -64
- package/nodes/locales/en/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/en/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/en/knxUltimateHueLight.html +0 -124
- package/nodes/locales/en/knxUltimateHueLight.json +0 -94
- package/nodes/locales/en/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/en/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/en/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/en/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/en/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/en/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/en/knxUltimateHueScene.html +0 -45
- package/nodes/locales/en/knxUltimateHueScene.json +0 -41
- package/nodes/locales/en/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/en/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/en/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/en/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/en/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/en/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/en/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/en/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/en/knxUltimateLogger.html +0 -161
- package/nodes/locales/en/knxUltimateLogger.json +0 -31
- package/nodes/locales/en/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/en/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/en/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/en/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/en/knxUltimateSceneController.html +0 -117
- package/nodes/locales/en/knxUltimateSceneController.json +0 -32
- package/nodes/locales/en/knxUltimateStaircase.html +0 -77
- package/nodes/locales/en/knxUltimateStaircase.json +0 -62
- package/nodes/locales/en/knxUltimateWatchDog.html +0 -244
- package/nodes/locales/en/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/en/matter-config.html +0 -47
- package/nodes/locales/en/matter-config.json +0 -48
- package/nodes/locales/en/matterbridge-config.html +0 -45
- package/nodes/locales/en/matterbridge-config.json +0 -25
- package/nodes/locales/es/hue-config.html +0 -31
- package/nodes/locales/es/hue-config.json +0 -21
- package/nodes/locales/es/knxUltimateAI.html +0 -13
- package/nodes/locales/es/knxUltimateAI.json +0 -231
- package/nodes/locales/es/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/es/knxUltimateAlerter.html +0 -164
- package/nodes/locales/es/knxUltimateAlerter.json +0 -27
- package/nodes/locales/es/knxUltimateAutoResponder.html +0 -81
- package/nodes/locales/es/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/es/knxUltimateDateTime.html +0 -45
- package/nodes/locales/es/knxUltimateDateTime.json +0 -32
- package/nodes/locales/es/knxUltimateGarage.html +0 -79
- package/nodes/locales/es/knxUltimateGarage.json +0 -51
- package/nodes/locales/es/knxUltimateGlobalContext.html +0 -128
- package/nodes/locales/es/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/es/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/es/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/es/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/es/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/es/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/es/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/es/knxUltimateHueButton.html +0 -52
- package/nodes/locales/es/knxUltimateHueButton.json +0 -34
- package/nodes/locales/es/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/es/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/es/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/es/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/es/knxUltimateHueController.html +0 -691
- package/nodes/locales/es/knxUltimateHueController.json +0 -64
- package/nodes/locales/es/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/es/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/es/knxUltimateHueLight.html +0 -124
- package/nodes/locales/es/knxUltimateHueLight.json +0 -94
- package/nodes/locales/es/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/es/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/es/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/es/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/es/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/es/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/es/knxUltimateHueScene.html +0 -45
- package/nodes/locales/es/knxUltimateHueScene.json +0 -41
- package/nodes/locales/es/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/es/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/es/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/es/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/es/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/es/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/es/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/es/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/es/knxUltimateLogger.html +0 -162
- package/nodes/locales/es/knxUltimateLogger.json +0 -31
- package/nodes/locales/es/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/es/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/es/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/es/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/es/knxUltimateSceneController.html +0 -115
- package/nodes/locales/es/knxUltimateSceneController.json +0 -32
- package/nodes/locales/es/knxUltimateStaircase.html +0 -77
- package/nodes/locales/es/knxUltimateStaircase.json +0 -62
- package/nodes/locales/es/knxUltimateWatchDog.html +0 -230
- package/nodes/locales/es/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/es/matter-config.html +0 -47
- package/nodes/locales/es/matter-config.json +0 -47
- package/nodes/locales/es/matterbridge-config.html +0 -45
- package/nodes/locales/es/matterbridge-config.json +0 -25
- package/nodes/locales/fr/hue-config.html +0 -31
- package/nodes/locales/fr/hue-config.json +0 -21
- package/nodes/locales/fr/knxUltimateAI.html +0 -13
- package/nodes/locales/fr/knxUltimateAI.json +0 -231
- package/nodes/locales/fr/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/fr/knxUltimateAlerter.html +0 -164
- package/nodes/locales/fr/knxUltimateAlerter.json +0 -27
- package/nodes/locales/fr/knxUltimateAutoResponder.html +0 -92
- package/nodes/locales/fr/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/fr/knxUltimateDateTime.html +0 -45
- package/nodes/locales/fr/knxUltimateDateTime.json +0 -32
- package/nodes/locales/fr/knxUltimateGarage.html +0 -79
- package/nodes/locales/fr/knxUltimateGarage.json +0 -51
- package/nodes/locales/fr/knxUltimateGlobalContext.html +0 -122
- package/nodes/locales/fr/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/fr/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/fr/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/fr/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/fr/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/fr/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/fr/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/fr/knxUltimateHueButton.html +0 -52
- package/nodes/locales/fr/knxUltimateHueButton.json +0 -34
- package/nodes/locales/fr/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/fr/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/fr/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/fr/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/fr/knxUltimateHueController.html +0 -691
- package/nodes/locales/fr/knxUltimateHueController.json +0 -64
- package/nodes/locales/fr/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/fr/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/fr/knxUltimateHueLight.html +0 -124
- package/nodes/locales/fr/knxUltimateHueLight.json +0 -86
- package/nodes/locales/fr/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/fr/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/fr/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/fr/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/fr/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/fr/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/fr/knxUltimateHueScene.html +0 -45
- package/nodes/locales/fr/knxUltimateHueScene.json +0 -41
- package/nodes/locales/fr/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/fr/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/fr/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/fr/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/fr/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/fr/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/fr/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/fr/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/fr/knxUltimateLogger.html +0 -160
- package/nodes/locales/fr/knxUltimateLogger.json +0 -31
- package/nodes/locales/fr/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/fr/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/fr/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/fr/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/fr/knxUltimateSceneController.html +0 -117
- package/nodes/locales/fr/knxUltimateSceneController.json +0 -32
- package/nodes/locales/fr/knxUltimateStaircase.html +0 -77
- package/nodes/locales/fr/knxUltimateStaircase.json +0 -62
- package/nodes/locales/fr/knxUltimateWatchDog.html +0 -228
- package/nodes/locales/fr/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/fr/matter-config.html +0 -47
- package/nodes/locales/fr/matter-config.json +0 -47
- package/nodes/locales/fr/matterbridge-config.html +0 -45
- package/nodes/locales/fr/matterbridge-config.json +0 -25
- package/nodes/locales/it/hue-config.html +0 -33
- package/nodes/locales/it/hue-config.json +0 -21
- package/nodes/locales/it/knxUltimateAI.html +0 -13
- package/nodes/locales/it/knxUltimateAI.json +0 -234
- package/nodes/locales/it/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/it/knxUltimateAlerter.html +0 -159
- package/nodes/locales/it/knxUltimateAlerter.json +0 -27
- package/nodes/locales/it/knxUltimateAutoResponder.html +0 -96
- package/nodes/locales/it/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/it/knxUltimateDateTime.html +0 -67
- package/nodes/locales/it/knxUltimateDateTime.json +0 -32
- package/nodes/locales/it/knxUltimateGarage.html +0 -79
- package/nodes/locales/it/knxUltimateGarage.json +0 -51
- package/nodes/locales/it/knxUltimateGlobalContext.html +0 -81
- package/nodes/locales/it/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/it/knxUltimateHATranslator.html +0 -24
- package/nodes/locales/it/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/it/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/it/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/it/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/it/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/it/knxUltimateHueButton.html +0 -52
- package/nodes/locales/it/knxUltimateHueButton.json +0 -34
- package/nodes/locales/it/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/it/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/it/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/it/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/it/knxUltimateHueController.html +0 -690
- package/nodes/locales/it/knxUltimateHueController.json +0 -64
- package/nodes/locales/it/knxUltimateHueHumiditySensor 2.html +0 -11
- package/nodes/locales/it/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/it/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/it/knxUltimateHueLight.html +0 -124
- package/nodes/locales/it/knxUltimateHueLight.json +0 -94
- package/nodes/locales/it/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/it/knxUltimateHueLightSensor.json +0 -19
- package/nodes/locales/it/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/it/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/it/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/it/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/it/knxUltimateHueScene.html +0 -45
- package/nodes/locales/it/knxUltimateHueScene.json +0 -41
- package/nodes/locales/it/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/it/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/it/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/it/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/it/knxUltimateHuedevice_software_update.html +0 -35
- package/nodes/locales/it/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/it/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/it/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/it/knxUltimateLogger.html +0 -132
- package/nodes/locales/it/knxUltimateLogger.json +0 -31
- package/nodes/locales/it/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/it/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/it/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/it/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/it/knxUltimateSceneController.html +0 -101
- package/nodes/locales/it/knxUltimateSceneController.json +0 -32
- package/nodes/locales/it/knxUltimateStaircase.html +0 -77
- package/nodes/locales/it/knxUltimateStaircase.json +0 -62
- package/nodes/locales/it/knxUltimateWatchDog.html +0 -194
- package/nodes/locales/it/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/it/matter-config.html +0 -47
- package/nodes/locales/it/matter-config.json +0 -48
- package/nodes/locales/it/matterbridge-config.html +0 -45
- package/nodes/locales/it/matterbridge-config.json +0 -25
- package/nodes/locales/zh-CN/hue-config.html +0 -33
- package/nodes/locales/zh-CN/hue-config.json +0 -21
- package/nodes/locales/zh-CN/knxUltimateAI.html +0 -13
- package/nodes/locales/zh-CN/knxUltimateAI.json +0 -231
- package/nodes/locales/zh-CN/knxUltimateAIHomeAssistant.html +0 -11
- package/nodes/locales/zh-CN/knxUltimateAlerter.html +0 -159
- package/nodes/locales/zh-CN/knxUltimateAlerter.json +0 -27
- package/nodes/locales/zh-CN/knxUltimateAutoResponder.html +0 -94
- package/nodes/locales/zh-CN/knxUltimateAutoResponder.json +0 -8
- package/nodes/locales/zh-CN/knxUltimateDateTime.html +0 -45
- package/nodes/locales/zh-CN/knxUltimateDateTime.json +0 -32
- package/nodes/locales/zh-CN/knxUltimateGarage.html +0 -79
- package/nodes/locales/zh-CN/knxUltimateGarage.json +0 -51
- package/nodes/locales/zh-CN/knxUltimateGlobalContext.html +0 -77
- package/nodes/locales/zh-CN/knxUltimateGlobalContext.json +0 -24
- package/nodes/locales/zh-CN/knxUltimateHATranslator.html +0 -25
- package/nodes/locales/zh-CN/knxUltimateHATranslator.json +0 -8
- package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.html +0 -44
- package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.json +0 -31
- package/nodes/locales/zh-CN/knxUltimateHueBattery.html +0 -37
- package/nodes/locales/zh-CN/knxUltimateHueBattery.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueButton.html +0 -52
- package/nodes/locales/zh-CN/knxUltimateHueButton.json +0 -34
- package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueContactSensor.html +0 -35
- package/nodes/locales/zh-CN/knxUltimateHueContactSensor.json +0 -26
- package/nodes/locales/zh-CN/knxUltimateHueController.html +0 -693
- package/nodes/locales/zh-CN/knxUltimateHueController.json +0 -64
- package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueLight.html +0 -126
- package/nodes/locales/zh-CN/knxUltimateHueLight.json +0 -86
- package/nodes/locales/zh-CN/knxUltimateHueLightSensor.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueLightSensor.json +0 -9
- package/nodes/locales/zh-CN/knxUltimateHueMotion.html +0 -41
- package/nodes/locales/zh-CN/knxUltimateHueMotion.json +0 -27
- package/nodes/locales/zh-CN/knxUltimateHuePlug.html +0 -50
- package/nodes/locales/zh-CN/knxUltimateHuePlug.json +0 -33
- package/nodes/locales/zh-CN/knxUltimateHueScene.html +0 -45
- package/nodes/locales/zh-CN/knxUltimateHueScene.json +0 -41
- package/nodes/locales/zh-CN/knxUltimateHueTapDial.html +0 -40
- package/nodes/locales/zh-CN/knxUltimateHueTapDial.json +0 -28
- package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.html +0 -38
- package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.html +0 -39
- package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.html +0 -36
- package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.json +0 -30
- package/nodes/locales/zh-CN/knxUltimateLoadControl.html +0 -76
- package/nodes/locales/zh-CN/knxUltimateLoadControl.json +0 -28
- package/nodes/locales/zh-CN/knxUltimateLogger.html +0 -126
- package/nodes/locales/zh-CN/knxUltimateLogger.json +0 -31
- package/nodes/locales/zh-CN/knxUltimateMatterBridge.html +0 -65
- package/nodes/locales/zh-CN/knxUltimateMatterBridge.json +0 -123
- package/nodes/locales/zh-CN/knxUltimateMatterControllerDevice.html +0 -57
- package/nodes/locales/zh-CN/knxUltimateMatterControllerDevice.json +0 -146
- package/nodes/locales/zh-CN/knxUltimateSceneController.html +0 -98
- package/nodes/locales/zh-CN/knxUltimateSceneController.json +0 -32
- package/nodes/locales/zh-CN/knxUltimateStaircase.html +0 -77
- package/nodes/locales/zh-CN/knxUltimateStaircase.json +0 -62
- package/nodes/locales/zh-CN/knxUltimateWatchDog.html +0 -178
- package/nodes/locales/zh-CN/knxUltimateWatchDog.json +0 -27
- package/nodes/locales/zh-CN/matter-config.html +0 -47
- package/nodes/locales/zh-CN/matter-config.json +0 -47
- package/nodes/locales/zh-CN/matterbridge-config.html +0 -45
- package/nodes/locales/zh-CN/matterbridge-config.json +0 -25
- package/nodes/matter-config.html +0 -578
- package/nodes/matter-config.js +0 -387
- package/nodes/matterbridge-config.html +0 -198
- package/nodes/matterbridge-config.js +0 -261
- package/nodes/plugins/knxUltimate-cerebrum-runtime-plugin.js +0 -79
- package/nodes/plugins/knxUltimate-migration-notice-plugin.html +0 -44
- package/nodes/plugins/knxUltimateAI-vue/assets/app.css +0 -1
- package/nodes/plugins/knxUltimateAI-vue/assets/app.js +0 -13
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-html2canvas.esm.js +0 -5
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-index.es.js +0 -5
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-jspdf.es.min.js +0 -79
- package/nodes/plugins/knxUltimateAI-vue/assets/chunk-purify.es.js +0 -3
- package/nodes/plugins/knxUltimateAI-vue/index.html +0 -13
- package/nodes/utils/HueEventStream.mjs +0 -176
- package/nodes/utils/colorManipulators/XYFromRGB_Supergiovane.js +0 -113
- package/nodes/utils/colorManipulators/hueColorConverter.js +0 -521
- package/nodes/utils/http.js +0 -291
- package/nodes/utils/hueControllerProfileAdapter.js +0 -104
- package/nodes/utils/hueControllerProfiles/runtime/area_motion.js +0 -221
- package/nodes/utils/hueControllerProfiles/runtime/button.js +0 -295
- package/nodes/utils/hueControllerProfiles/runtime/camera_motion.js +0 -221
- package/nodes/utils/hueControllerProfiles/runtime/contact.js +0 -191
- package/nodes/utils/hueControllerProfiles/runtime/device_power.js +0 -185
- package/nodes/utils/hueControllerProfiles/runtime/device_software_update.js +0 -185
- package/nodes/utils/hueControllerProfiles/runtime/humidity.js +0 -204
- package/nodes/utils/hueControllerProfiles/runtime/light.js +0 -1585
- package/nodes/utils/hueControllerProfiles/runtime/light_level.js +0 -180
- package/nodes/utils/hueControllerProfiles/runtime/motion.js +0 -185
- package/nodes/utils/hueControllerProfiles/runtime/plug.js +0 -344
- package/nodes/utils/hueControllerProfiles/runtime/relative_rotary.js +0 -271
- package/nodes/utils/hueControllerProfiles/runtime/scene.js +0 -352
- package/nodes/utils/hueControllerProfiles/runtime/temperature.js +0 -187
- package/nodes/utils/hueControllerProfiles/runtime/zigbee_connectivity.js +0 -185
- package/nodes/utils/hueControllerResourceCatalog.js +0 -71
- package/nodes/utils/hueEngine.mjs +0 -469
- package/nodes/utils/knxAiCamera.js +0 -302
- package/nodes/utils/knxAiCatalogRetrieval.js +0 -349
- package/nodes/utils/knxAiCerebrum.js +0 -406
- package/nodes/utils/knxAiChatContext.js +0 -496
- package/nodes/utils/knxAiEventHistory.js +0 -521
- package/nodes/utils/knxAiHomeMemory.js +0 -1021
- package/nodes/utils/knxAiScheduler.js +0 -445
- package/nodes/utils/knxAiSemanticContext.js +0 -662
- package/nodes/utils/knxAiTelegramVoice.js +0 -545
- package/nodes/utils/knxAiWebAccess.js +0 -631
- package/nodes/utils/lightEngines/canonicalLight.js +0 -75
- package/nodes/utils/lightEngines/hueLightEngine.js +0 -51
- package/nodes/utils/lightEngines/index.js +0 -25
- package/nodes/utils/lightEngines/knxLightCommand.js +0 -79
- package/nodes/utils/lightEngines/lightEngine.js +0 -46
- package/nodes/utils/lightEngines/matterHueShim.js +0 -59
- package/nodes/utils/lightEngines/matterLightEngine.js +0 -117
- package/nodes/utils/matterBridgeDeviceFactory.mjs +0 -780
- package/nodes/utils/matterBridgeEngine.mjs +0 -297
- package/nodes/utils/matterControllerCommandGate.js +0 -47
- package/nodes/utils/matterControllerProfiles/doorLock.js +0 -258
- package/nodes/utils/matterControllerProfiles/fan.js +0 -19
- package/nodes/utils/matterControllerProfiles/index.js +0 -34
- package/nodes/utils/matterControllerProfiles/mappedEndpoint.js +0 -217
- package/nodes/utils/matterControllerProfiles/switch.js +0 -13
- package/nodes/utils/matterControllerProfiles/thermostat.js +0 -19
- package/nodes/utils/matterControllerProfiles/universal.js +0 -462
- package/nodes/utils/matterControllerProfiles/windowCovering.js +0 -19
- package/nodes/utils/matterControllerSemanticInput.js +0 -212
- package/nodes/utils/matterEngine.mjs +0 -894
- package/nodes/utils/matterEnvironmentLock.mjs +0 -32
- package/nodes/utils/matterKnxConverter.js +0 -204
- package/nodes/utils/matterStorageBackup.js +0 -100
- package/resources/HA-icon.png +0 -0
- package/resources/dim.png +0 -0
- package/resources/rgb.png +0 -0
- package/resources/tunablewhite.png +0 -0
- package/resources/zxing-browser-0.2.0.min.js +0 -1
- package/resources/zxing-browser-LICENSE.txt +0 -21
package/nodes/knxUltimateAI.html
DELETED
|
@@ -1,1826 +0,0 @@
|
|
|
1
|
-
<script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/htmlUtils.js"></script>
|
|
2
|
-
<script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/KNXAIChatAdapterMappings.js"></script>
|
|
3
|
-
<style type="text/css">
|
|
4
|
-
#knx-ai-ollama-install-row {
|
|
5
|
-
align-items: flex-start;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
#knx-ai-llm-connection-settings {
|
|
9
|
-
width: 100%;
|
|
10
|
-
max-width: 720px;
|
|
11
|
-
min-width: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
#knx-ai-llm-connection-settings .form-row {
|
|
15
|
-
min-width: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
#knx-ai-local-context-status,
|
|
19
|
-
.knx-ai-prompt-context-hint {
|
|
20
|
-
width: 100%;
|
|
21
|
-
max-width: 720px;
|
|
22
|
-
min-width: 0;
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
color: var(--red-ui-secondary-text-color, #777);
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
line-height: 1.4;
|
|
27
|
-
white-space: normal;
|
|
28
|
-
overflow-wrap: break-word;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
#knx-ai-local-context-status {
|
|
32
|
-
margin: -8px 0 12px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.knx-ai-prompt-context-hint {
|
|
36
|
-
margin: 6px 0 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#knx-ai-ollama-install-row>label {
|
|
40
|
-
padding-top: 6px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
#knx-ai-ollama-install-row .knx-ai-ollama-actions {
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-wrap: wrap;
|
|
46
|
-
gap: 8px;
|
|
47
|
-
align-items: center;
|
|
48
|
-
max-width: calc(100% - 300px);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
#knx-ai-ollama-install-row .knx-ai-ollama-actions .red-ui-button {
|
|
52
|
-
margin: 0 !important;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.knx-ai-chat-adapter-editor {
|
|
56
|
-
width: 100% !important;
|
|
57
|
-
height: 220px;
|
|
58
|
-
min-height: 180px;
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
#node-input-chatInputCode-editor .monaco-editor,
|
|
63
|
-
#node-input-chatInputCode-editor .monaco-editor-background,
|
|
64
|
-
#node-input-chatInputCode-editor .monaco-editor .margin,
|
|
65
|
-
#node-input-chatInputCode-editor .monaco-editor .overflow-guard,
|
|
66
|
-
#node-input-chatInputCode-editor .monaco-editor .lines-content,
|
|
67
|
-
#node-input-chatInputCode-editor .monaco-editor .editor-scrollable {
|
|
68
|
-
background-color: #e8f5e9 !important;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
#node-input-chatOutputCode-editor .monaco-editor,
|
|
72
|
-
#node-input-chatOutputCode-editor .monaco-editor-background,
|
|
73
|
-
#node-input-chatOutputCode-editor .monaco-editor .margin,
|
|
74
|
-
#node-input-chatOutputCode-editor .monaco-editor .overflow-guard,
|
|
75
|
-
#node-input-chatOutputCode-editor .monaco-editor .lines-content,
|
|
76
|
-
#node-input-chatOutputCode-editor .monaco-editor .editor-scrollable {
|
|
77
|
-
background-color: #fffde7 !important;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
#knx-ai-tabs.ui-tabs {
|
|
81
|
-
background: transparent;
|
|
82
|
-
border: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
#knx-ai-tabs>.ui-tabs-nav {
|
|
86
|
-
display: flex;
|
|
87
|
-
flex-wrap: wrap;
|
|
88
|
-
align-items: flex-end;
|
|
89
|
-
margin: 0;
|
|
90
|
-
padding: 0;
|
|
91
|
-
background: transparent;
|
|
92
|
-
border: none;
|
|
93
|
-
border-bottom: 1px solid #c0c0c0;
|
|
94
|
-
border-radius: 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
#knx-ai-tabs>.ui-tabs-nav>li.ui-state-default {
|
|
98
|
-
float: none;
|
|
99
|
-
margin: 0 2px -1px 0;
|
|
100
|
-
background: transparent;
|
|
101
|
-
border: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
#knx-ai-tabs>.ui-tabs-nav>li.ui-state-default>a {
|
|
105
|
-
padding: 0.5em 1em;
|
|
106
|
-
color: #878787;
|
|
107
|
-
outline: none;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
#knx-ai-tabs>.ui-tabs-nav>li.ui-state-active {
|
|
111
|
-
background: transparent no-repeat bottom center;
|
|
112
|
-
border: none;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
#knx-ai-tabs>.ui-tabs-nav>li.ui-state-active>a {
|
|
116
|
-
color: #377e00;
|
|
117
|
-
border-bottom: 1px solid #377e00;
|
|
118
|
-
outline: none;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
#knx-ai-tabs>.ui-tabs-nav>li>a>i {
|
|
122
|
-
color: inherit;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
#knx-ai-tabs>.ui-tabs-panel {
|
|
126
|
-
padding: 1em 1.4em;
|
|
127
|
-
overflow: visible;
|
|
128
|
-
background: transparent;
|
|
129
|
-
border: none;
|
|
130
|
-
border-radius: 0;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
#knx-ai-tabs .knx-ai-accordion-subsection {
|
|
134
|
-
padding: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
#knx-ai-tabs .knx-ai-accordion-subsection+.knx-ai-accordion-subsection {
|
|
138
|
-
margin-top: 18px;
|
|
139
|
-
padding-top: 16px;
|
|
140
|
-
border-top: 1px solid var(--red-ui-form-input-border-color, #ccc);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
#knx-ai-tabs .knx-ai-accordion-subsection>h4 {
|
|
144
|
-
margin: 0 0 14px;
|
|
145
|
-
color: var(--red-ui-primary-text-color, #555);
|
|
146
|
-
font-size: 14px;
|
|
147
|
-
font-weight: 600;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
#knx-ai-tabs .knx-ai-accordion-subsection>h4 i {
|
|
151
|
-
width: 18px;
|
|
152
|
-
text-align: center;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
#knx-ai-tabs .knx-ai-inline-subsection {
|
|
156
|
-
margin-top: 18px;
|
|
157
|
-
padding-top: 14px;
|
|
158
|
-
border-top: 1px dashed var(--red-ui-form-input-border-color, #ccc);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
#knx-ai-tabs .knx-ai-inline-subsection>h5 {
|
|
162
|
-
margin: 0 0 12px;
|
|
163
|
-
font-size: 13px;
|
|
164
|
-
font-weight: 600;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
#knx-ai-tabs .knx-ai-accordion-mount>div {
|
|
168
|
-
display: block;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
#knx-ai-setup-doctor-panel,
|
|
172
|
-
#knx-ai-detected-adapters-panel,
|
|
173
|
-
#knx-ai-chat-context-panel,
|
|
174
|
-
#knx-ai-chat-learning-link-panel {
|
|
175
|
-
margin: 0 0 18px;
|
|
176
|
-
padding: 12px 14px;
|
|
177
|
-
border: 1px solid var(--red-ui-form-input-border-color, #ccc);
|
|
178
|
-
border-radius: 4px;
|
|
179
|
-
background: var(--red-ui-secondary-background, #f7f7f7);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
#knx-ai-tabs-chat-home>#knx-ai-detected-adapters-panel {
|
|
183
|
-
margin: 18px 0 0;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
#knx-ai-tabs-chat-home>#knx-ai-detected-adapters-panel+#knx-ai-chat-context-panel {
|
|
187
|
-
margin: 18px 0 0;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
#knx-ai-detected-adapters-panel>h4,
|
|
191
|
-
#knx-ai-chat-context-panel>h4,
|
|
192
|
-
#knx-ai-chat-learning-link-panel>h4 {
|
|
193
|
-
margin: 0 0 9px;
|
|
194
|
-
font-size: 14px;
|
|
195
|
-
font-weight: 600;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
#knx-ai-setup-doctor-panel {
|
|
199
|
-
margin: 24px 0 0;
|
|
200
|
-
border-color: rgba(255, 152, 0, 0.55);
|
|
201
|
-
background: linear-gradient(135deg, rgba(255, 152, 0, 0.10), var(--red-ui-secondary-background, #f7f7f7));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.knx-ai-setup-doctor-toggle {
|
|
205
|
-
display: flex;
|
|
206
|
-
align-items: center;
|
|
207
|
-
justify-content: space-between;
|
|
208
|
-
gap: 12px;
|
|
209
|
-
margin: 0;
|
|
210
|
-
color: var(--red-ui-primary-text-color, #555);
|
|
211
|
-
font-size: 14px;
|
|
212
|
-
font-weight: 600;
|
|
213
|
-
cursor: pointer;
|
|
214
|
-
list-style: none;
|
|
215
|
-
user-select: none;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.knx-ai-setup-doctor-toggle::-webkit-details-marker {
|
|
219
|
-
display: none;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.knx-ai-setup-doctor-toggle>span>i {
|
|
223
|
-
width: 18px;
|
|
224
|
-
text-align: center;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.knx-ai-setup-doctor-toggle:focus-visible {
|
|
228
|
-
outline: 2px solid var(--red-ui-primary-color, #377e00);
|
|
229
|
-
outline-offset: 3px;
|
|
230
|
-
border-radius: 2px;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.knx-ai-setup-doctor-chevron {
|
|
234
|
-
flex: 0 0 auto;
|
|
235
|
-
transition: transform 0.16s ease;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
#knx-ai-setup-doctor-panel[open] .knx-ai-setup-doctor-chevron {
|
|
239
|
-
transform: rotate(90deg);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.knx-ai-setup-doctor-body {
|
|
243
|
-
margin-top: 11px;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
#knx-ai-setup-doctor-panel.status-ready {
|
|
247
|
-
border-color: rgba(46, 125, 50, 0.55);
|
|
248
|
-
background: linear-gradient(135deg, rgba(46, 125, 50, 0.10), var(--red-ui-secondary-background, #f7f7f7));
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
#knx-ai-setup-doctor-panel.status-blocked {
|
|
252
|
-
border-color: rgba(198, 40, 40, 0.52);
|
|
253
|
-
background: linear-gradient(135deg, rgba(198, 40, 40, 0.09), var(--red-ui-secondary-background, #f7f7f7));
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.knx-ai-setup-doctor-hero {
|
|
257
|
-
display: flex;
|
|
258
|
-
align-items: flex-start;
|
|
259
|
-
gap: 10px;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.knx-ai-setup-doctor-summary {
|
|
263
|
-
flex: 1 1 auto;
|
|
264
|
-
min-width: 0;
|
|
265
|
-
line-height: 1.45;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.knx-ai-setup-doctor-score {
|
|
269
|
-
flex: 0 0 auto;
|
|
270
|
-
min-width: 48px;
|
|
271
|
-
padding: 6px 8px;
|
|
272
|
-
border-radius: 16px;
|
|
273
|
-
color: #7a4200;
|
|
274
|
-
background: rgba(255, 152, 0, 0.18);
|
|
275
|
-
text-align: center;
|
|
276
|
-
font-size: 12px;
|
|
277
|
-
font-weight: 700;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
#knx-ai-setup-doctor-panel.status-ready .knx-ai-setup-doctor-score {
|
|
281
|
-
color: #256029;
|
|
282
|
-
background: rgba(46, 125, 50, 0.16);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
#knx-ai-setup-doctor-panel.status-blocked .knx-ai-setup-doctor-score {
|
|
286
|
-
color: #842029;
|
|
287
|
-
background: rgba(198, 40, 40, 0.14);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.knx-ai-setup-doctor-check {
|
|
291
|
-
display: flex;
|
|
292
|
-
align-items: flex-start;
|
|
293
|
-
gap: 8px;
|
|
294
|
-
padding: 7px 0;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.knx-ai-setup-doctor-check+.knx-ai-setup-doctor-check {
|
|
298
|
-
border-top: 1px solid var(--red-ui-form-input-border-color, #ddd);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.knx-ai-setup-doctor-check-copy {
|
|
302
|
-
flex: 1 1 auto;
|
|
303
|
-
min-width: 0;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.knx-ai-setup-doctor-check-detail,
|
|
307
|
-
#knx-ai-setup-doctor-status,
|
|
308
|
-
.knx-ai-setup-doctor-prompts-hint {
|
|
309
|
-
color: var(--red-ui-secondary-text-color, #777);
|
|
310
|
-
font-size: 12px;
|
|
311
|
-
line-height: 1.4;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.knx-ai-setup-doctor-badge {
|
|
315
|
-
flex: 0 0 auto;
|
|
316
|
-
min-width: 48px;
|
|
317
|
-
padding: 2px 7px;
|
|
318
|
-
border-radius: 10px;
|
|
319
|
-
text-align: center;
|
|
320
|
-
font-size: 11px;
|
|
321
|
-
font-weight: 700;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.knx-ai-setup-doctor-badge.pass {
|
|
325
|
-
color: #256029;
|
|
326
|
-
background: #dff0d8;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.knx-ai-setup-doctor-badge.warn {
|
|
330
|
-
color: #7a5200;
|
|
331
|
-
background: #fff3cd;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.knx-ai-setup-doctor-badge.fail {
|
|
335
|
-
color: #842029;
|
|
336
|
-
background: #f8d7da;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.knx-ai-setup-doctor-badge.info {
|
|
340
|
-
color: #245269;
|
|
341
|
-
background: #d9edf7;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.knx-ai-setup-doctor-prompts {
|
|
345
|
-
margin-top: 12px;
|
|
346
|
-
padding-top: 10px;
|
|
347
|
-
border-top: 1px dashed var(--red-ui-form-input-border-color, #ccc);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.knx-ai-setup-doctor-prompt-list {
|
|
351
|
-
display: flex;
|
|
352
|
-
flex-direction: column;
|
|
353
|
-
gap: 6px;
|
|
354
|
-
margin-top: 8px;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.knx-ai-setup-doctor-prompt {
|
|
358
|
-
width: 100%;
|
|
359
|
-
margin: 0 !important;
|
|
360
|
-
text-align: left;
|
|
361
|
-
white-space: normal;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
.knx-ai-setup-doctor-footer {
|
|
365
|
-
display: flex;
|
|
366
|
-
align-items: center;
|
|
367
|
-
justify-content: space-between;
|
|
368
|
-
gap: 10px;
|
|
369
|
-
margin-top: 10px;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
.knx-ai-setup-doctor-deploy-hint {
|
|
373
|
-
color: var(--red-ui-secondary-text-color, #777);
|
|
374
|
-
font-size: 11px;
|
|
375
|
-
line-height: 1.35;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
#knx-ai-setup-doctor-refresh {
|
|
379
|
-
flex: 0 0 auto;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.knx-ai-detected-adapter {
|
|
383
|
-
display: flex;
|
|
384
|
-
align-items: center;
|
|
385
|
-
gap: 8px;
|
|
386
|
-
padding: 7px 0;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.knx-ai-detected-adapter+.knx-ai-detected-adapter {
|
|
390
|
-
border-top: 1px solid var(--red-ui-form-input-border-color, #ddd);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.knx-ai-detected-adapter-main {
|
|
394
|
-
flex: 1 1 auto;
|
|
395
|
-
min-width: 0;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.knx-ai-detected-adapter-package,
|
|
399
|
-
.knx-ai-detected-adapter-counts,
|
|
400
|
-
#knx-ai-detected-adapters-status,
|
|
401
|
-
#knx-ai-chat-context-status,
|
|
402
|
-
.knx-ai-chat-context-intro,
|
|
403
|
-
.knx-ai-chat-context-metric,
|
|
404
|
-
.knx-ai-chat-context-description,
|
|
405
|
-
.knx-ai-chat-context-pattern {
|
|
406
|
-
color: var(--red-ui-secondary-text-color, #777);
|
|
407
|
-
font-size: 12px;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
#knx-ai-chat-learning-link-panel {
|
|
411
|
-
margin: 18px 0 0;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.knx-ai-chat-learning-link-copy {
|
|
415
|
-
margin: 0 0 10px;
|
|
416
|
-
color: var(--red-ui-secondary-text-color, #777);
|
|
417
|
-
font-size: 12px;
|
|
418
|
-
line-height: 1.45;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.knx-ai-chat-context-metric {
|
|
422
|
-
margin-top: 6px;
|
|
423
|
-
font-weight: 600;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.knx-ai-chat-context-group-title {
|
|
427
|
-
margin: 12px 0 2px;
|
|
428
|
-
font-size: 12px;
|
|
429
|
-
font-weight: 600;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.knx-ai-chat-context-path {
|
|
433
|
-
margin-top: 2px;
|
|
434
|
-
color: var(--red-ui-secondary-text-color, #777);
|
|
435
|
-
font-family: monospace;
|
|
436
|
-
font-size: 11px;
|
|
437
|
-
overflow-wrap: anywhere;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.knx-ai-chat-context-pattern {
|
|
441
|
-
margin-top: 8px;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.knx-ai-detected-adapter-badge {
|
|
445
|
-
flex: 0 0 auto;
|
|
446
|
-
padding: 2px 7px;
|
|
447
|
-
border-radius: 10px;
|
|
448
|
-
color: #256029;
|
|
449
|
-
background: #dff0d8;
|
|
450
|
-
font-size: 11px;
|
|
451
|
-
font-weight: 600;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
@media (max-width: 900px) {
|
|
455
|
-
#knx-ai-ollama-install-row>label {
|
|
456
|
-
width: 100% !important;
|
|
457
|
-
padding-top: 0;
|
|
458
|
-
margin-bottom: 6px;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
#knx-ai-ollama-install-row .knx-ai-ollama-actions {
|
|
462
|
-
max-width: 100%;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
}
|
|
466
|
-
</style>
|
|
467
|
-
|
|
468
|
-
<script type="text/javascript">
|
|
469
|
-
RED.nodes.registerType('knxUltimateAI', {
|
|
470
|
-
category: 'deprecated',
|
|
471
|
-
color: '#FF9800',
|
|
472
|
-
defaults: {
|
|
473
|
-
server: { type: "knxUltimate-config", required: true },
|
|
474
|
-
name: { value: "Legacy AI node", required: false },
|
|
475
|
-
topic: { value: "", required: false },
|
|
476
|
-
|
|
477
|
-
llmEnabled: { value: false },
|
|
478
|
-
llmProvider: { value: "openai_compat" },
|
|
479
|
-
llmBaseUrl: { value: "https://api.openai.com/v1/chat/completions" },
|
|
480
|
-
llmModel: { value: "gpt-5.4" },
|
|
481
|
-
llmReasoningEffort: { value: "default" },
|
|
482
|
-
llmContextLength: { value: 0 },
|
|
483
|
-
llmLocalContextTokens: { value: 0 },
|
|
484
|
-
llmAllowKnxCommands: { value: false },
|
|
485
|
-
llmRequireCommandConfirmation: { value: true },
|
|
486
|
-
etsExposedGAs: { value: [] },
|
|
487
|
-
etsReadOnlyGAs: { value: [] },
|
|
488
|
-
etsExposeConfigured: { value: false },
|
|
489
|
-
webAccessEnabled: { value: true },
|
|
490
|
-
webMaxCallsPerHour: { value: 40 },
|
|
491
|
-
chatAdapterPreset: { value: "none" },
|
|
492
|
-
chatInputCode: { value: "" },
|
|
493
|
-
chatOutputCode: { value: "" },
|
|
494
|
-
aiEducation: { value: "" }
|
|
495
|
-
},
|
|
496
|
-
credentials: {
|
|
497
|
-
llmApiKey: { type: "password" }
|
|
498
|
-
},
|
|
499
|
-
inputs: 1,
|
|
500
|
-
outputs: 5,
|
|
501
|
-
outputLabels: function (i) {
|
|
502
|
-
switch (i) {
|
|
503
|
-
case 0: return this._('knxUltimateAI.outputs.summary');
|
|
504
|
-
case 1: return this._('knxUltimateAI.outputs.anomalies');
|
|
505
|
-
case 2: return this._('knxUltimateAI.outputs.assistant');
|
|
506
|
-
case 3: return this._('knxUltimateAI.outputs.knxCommands');
|
|
507
|
-
case 4: return this._('knxUltimateAI.outputs.ttsUltimate');
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
icon: "node-eye-icon.svg",
|
|
511
|
-
label: function () {
|
|
512
|
-
return (this.name || "Legacy AI node");
|
|
513
|
-
},
|
|
514
|
-
paletteLabel: "Legacy AI node",
|
|
515
|
-
oneditprepare: function () {
|
|
516
|
-
try { RED.sidebar.show("help"); } catch (error) { }
|
|
517
|
-
const node = this;
|
|
518
|
-
const OPENAI_COMPAT_DEFAULT_CHAT_URL = "https://api.openai.com/v1/chat/completions";
|
|
519
|
-
const OLLAMA_DEFAULT_CHAT_URL = "http://localhost:11434/api/chat";
|
|
520
|
-
const ANTHROPIC_DEFAULT_CHAT_URL = "https://api.anthropic.com/v1/messages";
|
|
521
|
-
const LMSTUDIO_DEFAULT_CHAT_URL = "http://localhost:1234/v1/chat/completions";
|
|
522
|
-
const OLLAMA_LIBRARY_URL = "https://ollama.com/library";
|
|
523
|
-
const OPENAI_COMPAT_DEFAULT_MODELS = ["gpt-5.4", "gpt-4o-mini"];
|
|
524
|
-
const OLLAMA_DEFAULT_MODEL = "llama3.1";
|
|
525
|
-
const ANTHROPIC_DEFAULT_MODEL = "claude-opus-4-8";
|
|
526
|
-
|
|
527
|
-
const mountTabSection = (mountSelector, sectionSelector) => {
|
|
528
|
-
const $mount = $(mountSelector);
|
|
529
|
-
const $section = $(sectionSelector);
|
|
530
|
-
if ($mount.length && $section.length) $mount.append($section);
|
|
531
|
-
};
|
|
532
|
-
mountTabSection("#knx-ai-mount-assistant-setup", "#knx-ai-tab-llm-connection");
|
|
533
|
-
mountTabSection("#knx-ai-mount-ets-access", "#knx-ai-tab-ets-access");
|
|
534
|
-
mountTabSection("#knx-ai-mount-assistant-advanced", "#knx-ai-tab-advanced");
|
|
535
|
-
mountTabSection("#knx-ai-mount-chat-adapter", "#knx-ai-tab-chat-adapter");
|
|
536
|
-
mountTabSection("#knx-ai-mount-home-intelligence", "#knx-ai-tab-home-intelligence");
|
|
537
|
-
$("#knx-ai-tabs").tabs({ active: 0 });
|
|
538
|
-
|
|
539
|
-
const toggleLLM = () => {
|
|
540
|
-
const enabled = $("#node-input-llmEnabled").is(":checked");
|
|
541
|
-
$("#knx-ai-llm-connection-settings").toggle(enabled);
|
|
542
|
-
$("#knx-ai-llm-advanced-settings").toggle(enabled);
|
|
543
|
-
};
|
|
544
|
-
$("#node-input-llmEnabled").on("change", toggleLLM);
|
|
545
|
-
|
|
546
|
-
const toggleCommandConfirmation = () => {
|
|
547
|
-
const enabled = $("#node-input-llmAllowKnxCommands").is(":checked");
|
|
548
|
-
$("#knx-ai-command-confirmation-row").toggle(enabled);
|
|
549
|
-
};
|
|
550
|
-
$("#node-input-llmAllowKnxCommands").on("change", toggleCommandConfirmation);
|
|
551
|
-
|
|
552
|
-
toggleLLM();
|
|
553
|
-
toggleCommandConfirmation();
|
|
554
|
-
|
|
555
|
-
const nodeId = node.id;
|
|
556
|
-
const resolveAdminRoot = () => {
|
|
557
|
-
const raw = (RED.settings && typeof RED.settings.httpAdminRoot === "string") ? RED.settings.httpAdminRoot : "/";
|
|
558
|
-
const trimmed = String(raw || "/").trim();
|
|
559
|
-
if (trimmed === "" || trimmed === "/") return "";
|
|
560
|
-
return "/" + trimmed.replace(/^\/+|\/+$/g, "");
|
|
561
|
-
};
|
|
562
|
-
const resolveAccessToken = () => {
|
|
563
|
-
try {
|
|
564
|
-
const tokens = (RED.settings && typeof RED.settings.get === "function") ? RED.settings.get("auth-tokens") : null;
|
|
565
|
-
const token = tokens && typeof tokens.access_token === "string" ? tokens.access_token.trim() : "";
|
|
566
|
-
return token;
|
|
567
|
-
} catch (error) {
|
|
568
|
-
return "";
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
const t = (key, fallback) => {
|
|
572
|
-
const value = RED._(key);
|
|
573
|
-
if (!value || value === key) return fallback || "";
|
|
574
|
-
return value;
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
// Same ETS access selector used by the MQTT profile of IoT Bridge.
|
|
578
|
-
try {
|
|
579
|
-
const savedSet = new Set(Array.isArray(node.etsExposedGAs) ? node.etsExposedGAs : []);
|
|
580
|
-
const readOnlySet = new Set(Array.isArray(node.etsReadOnlyGAs) ? node.etsReadOnlyGAs : []);
|
|
581
|
-
const exposeConfigured = node.etsExposeConfigured === true;
|
|
582
|
-
|
|
583
|
-
const updateEtsCount = () => {
|
|
584
|
-
const total = $("#knx-ai-ets-ga-list input.knx-ai-ets-ga-cb").length;
|
|
585
|
-
const selected = $("#knx-ai-ets-ga-list input.knx-ai-ets-ga-cb:checked").length;
|
|
586
|
-
$("#knx-ai-ets-ga-count").text(selected + " / " + total + " " + t("knxUltimateAI.messages.etsSelected", "selected"));
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
const buildEtsGaList = () => {
|
|
590
|
-
const list = $("#knx-ai-ets-ga-list").empty();
|
|
591
|
-
const serverId = String($("#node-input-server").val() || "").trim();
|
|
592
|
-
if (!serverId) {
|
|
593
|
-
list.append($("<div/>").css("color", "#999").text(t("knxUltimateAI.messages.etsNoGateway", "Select a KNX gateway.")));
|
|
594
|
-
updateEtsCount();
|
|
595
|
-
return;
|
|
596
|
-
}
|
|
597
|
-
$.getJSON("knxUltimatecsv?nodeID=" + encodeURIComponent(serverId), function (data) {
|
|
598
|
-
list.empty();
|
|
599
|
-
if (!Array.isArray(data) || data.length === 0) {
|
|
600
|
-
list.append($("<div/>").css("color", "#999").text(t("knxUltimateAI.messages.etsNoGa", "No group addresses found. Import the ETS list in the KNX gateway.")));
|
|
601
|
-
updateEtsCount();
|
|
602
|
-
return;
|
|
603
|
-
}
|
|
604
|
-
data.forEach(function (item) {
|
|
605
|
-
if (!item || !item.ga) return;
|
|
606
|
-
const row = $("<div/>").addClass("knx-ai-ets-ga-row").css({
|
|
607
|
-
display: "flex", gap: "8px", alignItems: "center", padding: "3px 2px",
|
|
608
|
-
width: "100%", whiteSpace: "nowrap", cursor: "pointer", borderBottom: "1px solid #f3f3f3"
|
|
609
|
-
}).appendTo(list);
|
|
610
|
-
const include = $("<input/>", { type: "checkbox", class: "knx-ai-ets-ga-cb", value: item.ga, style: "width:auto; margin:0; flex:0 0 auto;" }).appendTo(row);
|
|
611
|
-
include.prop("checked", exposeConfigured ? savedSet.has(item.ga) : true);
|
|
612
|
-
$("<span/>").css({ flex: "0 0 auto", fontFamily: "monospace", minWidth: "64px" }).text(item.ga).appendTo(row);
|
|
613
|
-
const name = String(item.devicename || item.ga);
|
|
614
|
-
$("<span/>").addClass("knx-ai-ets-ga-name").css({ flex: "1 1 auto", minWidth: "0", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", color: "#444" }).text(name).attr("title", name).appendTo(row);
|
|
615
|
-
$("<span/>").css({ flex: "0 0 auto", color: "#888", fontSize: "11px" }).text("DPT" + (item.dpt || "")).appendTo(row);
|
|
616
|
-
const readOnlyLabel = $("<label/>").css({ flex: "0 0 auto", display: "flex", alignItems: "center", gap: "3px", margin: "0", fontSize: "11px", color: "#888", cursor: "pointer" }).appendTo(row);
|
|
617
|
-
const readOnly = $("<input/>", { type: "checkbox", class: "knx-ai-ets-ga-ro", value: item.ga, style: "width:auto; margin:0;" }).appendTo(readOnlyLabel);
|
|
618
|
-
readOnly.prop("checked", readOnlySet.has(item.ga));
|
|
619
|
-
$("<span/>").text(t("knxUltimateAI.messages.etsReadOnly", "Read only")).appendTo(readOnlyLabel);
|
|
620
|
-
readOnlyLabel.on("click", function (event) { event.stopPropagation(); });
|
|
621
|
-
row.on("click", function (event) {
|
|
622
|
-
if (event.target === include[0] || event.target === readOnly[0]) return;
|
|
623
|
-
include.prop("checked", !include.prop("checked"));
|
|
624
|
-
updateEtsCount();
|
|
625
|
-
});
|
|
626
|
-
});
|
|
627
|
-
$("#knx-ai-ets-ga-list input.knx-ai-ets-ga-cb").on("change", updateEtsCount);
|
|
628
|
-
updateEtsCount();
|
|
629
|
-
}).fail(function () {
|
|
630
|
-
list.empty().append($("<div/>").css("color", "#c0392b").text(t("knxUltimateAI.messages.etsCsvError", "Unable to load the group address list from the gateway.")));
|
|
631
|
-
updateEtsCount();
|
|
632
|
-
});
|
|
633
|
-
};
|
|
634
|
-
|
|
635
|
-
$("#knx-ai-ets-ga-all").on("click", function (event) { event.preventDefault(); $("#knx-ai-ets-ga-list .knx-ai-ets-ga-row:visible").find("input.knx-ai-ets-ga-cb").prop("checked", true); updateEtsCount(); });
|
|
636
|
-
$("#knx-ai-ets-ga-none").on("click", function (event) { event.preventDefault(); $("#knx-ai-ets-ga-list .knx-ai-ets-ga-row:visible").find("input.knx-ai-ets-ga-cb").prop("checked", false); updateEtsCount(); });
|
|
637
|
-
$("#knx-ai-ets-ga-ro-all").on("click", function (event) { event.preventDefault(); $("#knx-ai-ets-ga-list .knx-ai-ets-ga-row:visible").find("input.knx-ai-ets-ga-ro").prop("checked", true); });
|
|
638
|
-
$("#knx-ai-ets-ga-ro-none").on("click", function (event) { event.preventDefault(); $("#knx-ai-ets-ga-list .knx-ai-ets-ga-row:visible").find("input.knx-ai-ets-ga-ro").prop("checked", false); });
|
|
639
|
-
$("#knx-ai-ets-ga-filter").on("input", function () {
|
|
640
|
-
const term = String($(this).val() || "").toLowerCase();
|
|
641
|
-
$("#knx-ai-ets-ga-list .knx-ai-ets-ga-row").each(function () {
|
|
642
|
-
$(this).toggle($(this).text().toLowerCase().indexOf(term) !== -1);
|
|
643
|
-
});
|
|
644
|
-
});
|
|
645
|
-
$("#node-input-server").on("change.knxAiEtsAccess", buildEtsGaList);
|
|
646
|
-
buildEtsGaList();
|
|
647
|
-
} catch (error) { }
|
|
648
|
-
|
|
649
|
-
const applyChatEditorOptions = (editor) => {
|
|
650
|
-
try {
|
|
651
|
-
if (!editor) return;
|
|
652
|
-
if (typeof editor.updateOptions === "function") {
|
|
653
|
-
editor.updateOptions({
|
|
654
|
-
lineNumbers: "off",
|
|
655
|
-
minimap: { enabled: false },
|
|
656
|
-
scrollbar: { verticalScrollbarSize: 8, horizontalScrollbarSize: 8 }
|
|
657
|
-
});
|
|
658
|
-
} else if (editor.renderer && typeof editor.renderer.setShowGutter === "function") {
|
|
659
|
-
editor.renderer.setShowGutter(false);
|
|
660
|
-
}
|
|
661
|
-
if (typeof editor.setShowPrintMargin === "function") editor.setShowPrintMargin(false);
|
|
662
|
-
if (typeof editor.setOptions === "function") {
|
|
663
|
-
editor.setOptions({
|
|
664
|
-
enableBasicAutocompletion: true,
|
|
665
|
-
enableLiveAutocompletion: true
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
} catch (error) { }
|
|
669
|
-
};
|
|
670
|
-
const setChatEditorValue = (editor, value) => {
|
|
671
|
-
try {
|
|
672
|
-
if (!editor) return;
|
|
673
|
-
if (typeof editor.setValue === "function") {
|
|
674
|
-
editor.setValue(String(value || ""));
|
|
675
|
-
} else if (editor.session && typeof editor.session.setValue === "function") {
|
|
676
|
-
editor.session.setValue(String(value || ""));
|
|
677
|
-
}
|
|
678
|
-
} catch (error) { }
|
|
679
|
-
};
|
|
680
|
-
const destroyChatEditors = () => {
|
|
681
|
-
["chatInputCodeEditor", "chatOutputCodeEditor"].forEach(function (key) {
|
|
682
|
-
try {
|
|
683
|
-
if (node[key] && typeof node[key].destroy === "function") node[key].destroy();
|
|
684
|
-
} catch (error) { }
|
|
685
|
-
delete node[key];
|
|
686
|
-
});
|
|
687
|
-
try {
|
|
688
|
-
const $model = $("#node-input-llmModel");
|
|
689
|
-
$model.off(".knxUltimateAiModelPicker");
|
|
690
|
-
if (typeof $model.autocomplete === "function" && $model.data("ui-autocomplete")) {
|
|
691
|
-
$model.autocomplete("destroy");
|
|
692
|
-
}
|
|
693
|
-
} catch (error) { }
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
try {
|
|
697
|
-
node.chatInputCodeEditor = RED.editor.createEditor({
|
|
698
|
-
id: "node-input-chatInputCode-editor",
|
|
699
|
-
mode: "ace/mode/nrjavascript",
|
|
700
|
-
value: node.chatInputCode || ""
|
|
701
|
-
});
|
|
702
|
-
} catch (error) { }
|
|
703
|
-
try {
|
|
704
|
-
node.chatOutputCodeEditor = RED.editor.createEditor({
|
|
705
|
-
id: "node-input-chatOutputCode-editor",
|
|
706
|
-
mode: "ace/mode/nrjavascript",
|
|
707
|
-
value: node.chatOutputCode || ""
|
|
708
|
-
});
|
|
709
|
-
} catch (error) { }
|
|
710
|
-
applyChatEditorOptions(node.chatInputCodeEditor);
|
|
711
|
-
applyChatEditorOptions(node.chatOutputCodeEditor);
|
|
712
|
-
if (typeof monaco !== "undefined") {
|
|
713
|
-
try {
|
|
714
|
-
const globalScope = typeof window !== "undefined" ? window : globalThis;
|
|
715
|
-
if (!globalScope._knxAiChatEditorThemesDefined) {
|
|
716
|
-
monaco.editor.defineTheme("knx-ai-chat-input-theme", {
|
|
717
|
-
base: "vs",
|
|
718
|
-
inherit: true,
|
|
719
|
-
rules: [],
|
|
720
|
-
colors: {
|
|
721
|
-
"editor.background": "#e8f5e9",
|
|
722
|
-
"editorGutter.background": "#e8f5e9"
|
|
723
|
-
}
|
|
724
|
-
});
|
|
725
|
-
monaco.editor.defineTheme("knx-ai-chat-output-theme", {
|
|
726
|
-
base: "vs",
|
|
727
|
-
inherit: true,
|
|
728
|
-
rules: [],
|
|
729
|
-
colors: {
|
|
730
|
-
"editor.background": "#fffde7",
|
|
731
|
-
"editorGutter.background": "#fffde7"
|
|
732
|
-
}
|
|
733
|
-
});
|
|
734
|
-
globalScope._knxAiChatEditorThemesDefined = true;
|
|
735
|
-
}
|
|
736
|
-
if (node.chatInputCodeEditor && typeof node.chatInputCodeEditor.updateOptions === "function") {
|
|
737
|
-
node.chatInputCodeEditor.updateOptions({ theme: "knx-ai-chat-input-theme" });
|
|
738
|
-
}
|
|
739
|
-
if (node.chatOutputCodeEditor && typeof node.chatOutputCodeEditor.updateOptions === "function") {
|
|
740
|
-
node.chatOutputCodeEditor.updateOptions({ theme: "knx-ai-chat-output-theme" });
|
|
741
|
-
}
|
|
742
|
-
} catch (error) { }
|
|
743
|
-
}
|
|
744
|
-
node._destroyKnxAiChatEditors = destroyChatEditors;
|
|
745
|
-
|
|
746
|
-
const configureChatAdapterPicker = () => {
|
|
747
|
-
const adapters = Array.isArray(window.KNXAIChatAdapterMappings)
|
|
748
|
-
? window.KNXAIChatAdapterMappings.slice()
|
|
749
|
-
: [];
|
|
750
|
-
const $picker = $("#node-input-chatAdapterPreset");
|
|
751
|
-
if (!$picker.length) return;
|
|
752
|
-
const hideAdapterMappingFields = () => {
|
|
753
|
-
$("#knx-ai-chat-adapter-fields").hide();
|
|
754
|
-
};
|
|
755
|
-
$picker.empty();
|
|
756
|
-
$("<option></option>")
|
|
757
|
-
.attr("value", "none")
|
|
758
|
-
.text(t("knxUltimateAI.selectlists.chatAdapter.none", "No adapter"))
|
|
759
|
-
.appendTo($picker);
|
|
760
|
-
adapters.forEach(function (adapter) {
|
|
761
|
-
if (!adapter || !adapter.id) return;
|
|
762
|
-
$("<option></option>")
|
|
763
|
-
.attr("value", adapter.id)
|
|
764
|
-
.text(adapter.title || adapter.id)
|
|
765
|
-
.appendTo($picker);
|
|
766
|
-
});
|
|
767
|
-
|
|
768
|
-
const configuredPreset = String(this.chatAdapterPreset || "none");
|
|
769
|
-
if (configuredPreset !== "none" && !adapters.some(adapter => adapter && adapter.id === configuredPreset)) {
|
|
770
|
-
$("<option></option>")
|
|
771
|
-
.attr("value", configuredPreset)
|
|
772
|
-
.text(configuredPreset)
|
|
773
|
-
.appendTo($picker);
|
|
774
|
-
}
|
|
775
|
-
$picker.val(configuredPreset);
|
|
776
|
-
hideAdapterMappingFields();
|
|
777
|
-
$picker.on("change", function () {
|
|
778
|
-
const selected = String($(this).val() || "none");
|
|
779
|
-
if (selected === "none") {
|
|
780
|
-
setChatEditorValue(node.chatInputCodeEditor, "");
|
|
781
|
-
setChatEditorValue(node.chatOutputCodeEditor, "");
|
|
782
|
-
hideAdapterMappingFields();
|
|
783
|
-
return;
|
|
784
|
-
}
|
|
785
|
-
const adapter = adapters.find(item => item && item.id === selected);
|
|
786
|
-
if (!adapter) return;
|
|
787
|
-
setChatEditorValue(node.chatInputCodeEditor, adapter.inputCode || "");
|
|
788
|
-
setChatEditorValue(node.chatOutputCodeEditor, adapter.outputCode || "");
|
|
789
|
-
hideAdapterMappingFields();
|
|
790
|
-
});
|
|
791
|
-
};
|
|
792
|
-
configureChatAdapterPicker.call(node);
|
|
793
|
-
|
|
794
|
-
const renderDetectedAdapters = (adapters) => {
|
|
795
|
-
const $list = $("#knx-ai-detected-adapters-list");
|
|
796
|
-
const $status = $("#knx-ai-detected-adapters-status");
|
|
797
|
-
if (!$list.length) return;
|
|
798
|
-
$list.empty();
|
|
799
|
-
const entries = Array.isArray(adapters) ? adapters : [];
|
|
800
|
-
if (!entries.length) {
|
|
801
|
-
$status.text(t("knxUltimateAI.messages.detectedAdaptersNone", "No compatible node detected.")).show();
|
|
802
|
-
return;
|
|
803
|
-
}
|
|
804
|
-
$status.hide();
|
|
805
|
-
entries.forEach(function (adapter) {
|
|
806
|
-
if (!adapter || !adapter.id) return;
|
|
807
|
-
const providerCount = Number(adapter.providerCount) || 0;
|
|
808
|
-
const cameraCount = Number(adapter.cameraCount) || 0;
|
|
809
|
-
const nodeCount = Number(adapter.nodeCount) || 0;
|
|
810
|
-
const $row = $("<div></div>").addClass("knx-ai-detected-adapter");
|
|
811
|
-
const $main = $("<div></div>").addClass("knx-ai-detected-adapter-main");
|
|
812
|
-
$("<div></div>").text(adapter.title || adapter.id).appendTo($main);
|
|
813
|
-
if (adapter.packageName) {
|
|
814
|
-
$("<div></div>").addClass("knx-ai-detected-adapter-package").text(adapter.packageName).appendTo($main);
|
|
815
|
-
}
|
|
816
|
-
$("<div></div>")
|
|
817
|
-
.addClass("knx-ai-detected-adapter-counts")
|
|
818
|
-
.text(adapter.kind === "tts"
|
|
819
|
-
? t("knxUltimateAI.messages.detectedAdapterNodes", "Nodes") + ": " + nodeCount
|
|
820
|
-
: t("knxUltimateAI.messages.detectedAdapterControllers", "Controllers") + ": " + providerCount + " · " + t("knxUltimateAI.messages.detectedAdapterCameras", "Cameras") + ": " + cameraCount)
|
|
821
|
-
.appendTo($main);
|
|
822
|
-
$main.appendTo($row);
|
|
823
|
-
$("<span></span>")
|
|
824
|
-
.addClass("knx-ai-detected-adapter-badge")
|
|
825
|
-
.text(t("knxUltimateAI.messages.detectedAdapterDetected", "Detected"))
|
|
826
|
-
.appendTo($row);
|
|
827
|
-
$row.appendTo($list);
|
|
828
|
-
});
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
const renderSetupDoctor = (snapshot) => {
|
|
832
|
-
const $panel = $("#knx-ai-setup-doctor-panel");
|
|
833
|
-
const $status = $("#knx-ai-setup-doctor-status");
|
|
834
|
-
const $content = $("#knx-ai-setup-doctor-content");
|
|
835
|
-
const $checks = $("#knx-ai-setup-doctor-checks").empty();
|
|
836
|
-
const $prompts = $("#knx-ai-setup-doctor-prompt-list").empty();
|
|
837
|
-
if (!snapshot || typeof snapshot !== "object") {
|
|
838
|
-
$panel.removeClass("status-ready status-attention status-blocked");
|
|
839
|
-
$content.hide();
|
|
840
|
-
$status.text(t("knxUltimateAI.messages.setupDoctorUnavailable", "Setup Doctor is temporarily unavailable.")).show();
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
const badgeLabels = {
|
|
844
|
-
pass: t("knxUltimateAI.messages.setupDoctorPass", "OK"),
|
|
845
|
-
warn: t("knxUltimateAI.messages.setupDoctorWarn", "Check"),
|
|
846
|
-
fail: t("knxUltimateAI.messages.setupDoctorFail", "Fix"),
|
|
847
|
-
info: t("knxUltimateAI.messages.setupDoctorInfo", "Optional")
|
|
848
|
-
};
|
|
849
|
-
const snapshotStatus = ["ready", "attention", "blocked"].includes(String(snapshot.status)) ? String(snapshot.status) : "attention";
|
|
850
|
-
$panel.removeClass("status-ready status-attention status-blocked").addClass("status-" + snapshotStatus);
|
|
851
|
-
$("#knx-ai-setup-doctor-state").text(String(snapshot.statusLabel || snapshot.status || ""));
|
|
852
|
-
$("#knx-ai-setup-doctor-summary").text(String(snapshot.summary || ""));
|
|
853
|
-
$("#knx-ai-setup-doctor-score").text(String(Math.max(0, Number(snapshot.score) || 0)) + "%");
|
|
854
|
-
(Array.isArray(snapshot.checks) ? snapshot.checks : []).forEach(function (check) {
|
|
855
|
-
if (!check || !check.id) return;
|
|
856
|
-
const statusName = ["pass", "warn", "fail", "info"].includes(String(check.status)) ? String(check.status) : "info";
|
|
857
|
-
const $row = $("<div></div>").addClass("knx-ai-setup-doctor-check");
|
|
858
|
-
const $copy = $("<div></div>").addClass("knx-ai-setup-doctor-check-copy");
|
|
859
|
-
$("<strong></strong>").text(String(check.title || check.id)).appendTo($copy);
|
|
860
|
-
$("<div></div>").addClass("knx-ai-setup-doctor-check-detail").text(String(check.detail || "")).appendTo($copy);
|
|
861
|
-
$copy.appendTo($row);
|
|
862
|
-
$("<span></span>")
|
|
863
|
-
.addClass("knx-ai-setup-doctor-badge " + statusName)
|
|
864
|
-
.text(badgeLabels[statusName])
|
|
865
|
-
.appendTo($row);
|
|
866
|
-
$row.appendTo($checks);
|
|
867
|
-
});
|
|
868
|
-
const promptItems = snapshot.firstRun && Array.isArray(snapshot.firstRun.prompts) ? snapshot.firstRun.prompts : [];
|
|
869
|
-
promptItems.forEach(function (prompt) {
|
|
870
|
-
if (!prompt || !prompt.text) return;
|
|
871
|
-
$("<button type=\"button\"></button>")
|
|
872
|
-
.addClass("red-ui-button knx-ai-setup-doctor-prompt")
|
|
873
|
-
.text(String(prompt.text))
|
|
874
|
-
.on("click", function (evt) {
|
|
875
|
-
evt.preventDefault();
|
|
876
|
-
openKnxAiWebPage("cerebrum", String(prompt.text));
|
|
877
|
-
})
|
|
878
|
-
.appendTo($prompts);
|
|
879
|
-
});
|
|
880
|
-
$(".knx-ai-setup-doctor-prompts").toggle(promptItems.length > 0);
|
|
881
|
-
$status.hide();
|
|
882
|
-
$content.show();
|
|
883
|
-
};
|
|
884
|
-
|
|
885
|
-
let lastChatContextOverview = null;
|
|
886
|
-
const selectedLocalContextTokens = () => Math.max(0, Number($("#node-input-llmLocalContextTokens").val()) || 0);
|
|
887
|
-
const formatCompactContextTokens = (value) => {
|
|
888
|
-
const tokens = Math.max(0, Number(value) || 0);
|
|
889
|
-
if (!tokens) return "?";
|
|
890
|
-
if (tokens >= 1024 && tokens % 1024 === 0) return (tokens / 1024) + "K";
|
|
891
|
-
return tokens.toLocaleString();
|
|
892
|
-
};
|
|
893
|
-
const selectedLocalContextLabel = () => {
|
|
894
|
-
const selectedTokens = selectedLocalContextTokens();
|
|
895
|
-
return selectedTokens
|
|
896
|
-
? formatCompactContextTokens(selectedTokens)
|
|
897
|
-
: t("knxUltimateAI.selectlists.localContext.maximum", "Maximum");
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
const renderChatContextOverview = (overview) => {
|
|
901
|
-
const $status = $("#knx-ai-chat-context-status");
|
|
902
|
-
const $content = $("#knx-ai-chat-context-content");
|
|
903
|
-
const $sources = $("#knx-ai-chat-context-sources-list").empty();
|
|
904
|
-
const $files = $("#knx-ai-chat-context-files-list").empty();
|
|
905
|
-
const $directories = $("#knx-ai-chat-context-directories-list").empty();
|
|
906
|
-
const $contextLimit = $("#knx-ai-chat-context-limit");
|
|
907
|
-
const $lastPromptUsage = $("#knx-ai-chat-context-last-prompt");
|
|
908
|
-
if (!overview || typeof overview !== "object") {
|
|
909
|
-
lastChatContextOverview = null;
|
|
910
|
-
$content.hide();
|
|
911
|
-
$status
|
|
912
|
-
.text(t("knxUltimateAI.messages.chatContextUnavailable", "The chat context summary is temporarily unavailable."))
|
|
913
|
-
.show();
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
lastChatContextOverview = overview;
|
|
917
|
-
|
|
918
|
-
const addRow = function ($list, title, description, pathText, badge) {
|
|
919
|
-
const $row = $("<div></div>").addClass("knx-ai-detected-adapter");
|
|
920
|
-
const $main = $("<div></div>").addClass("knx-ai-detected-adapter-main");
|
|
921
|
-
$("<div></div>").text(title || "").appendTo($main);
|
|
922
|
-
if (description) {
|
|
923
|
-
$("<div></div>").addClass("knx-ai-chat-context-description").text(description).appendTo($main);
|
|
924
|
-
}
|
|
925
|
-
if (pathText) {
|
|
926
|
-
$("<div></div>").addClass("knx-ai-chat-context-path").text(pathText).appendTo($main);
|
|
927
|
-
}
|
|
928
|
-
$main.appendTo($row);
|
|
929
|
-
$("<span></span>").addClass("knx-ai-detected-adapter-badge").text(badge).appendTo($row);
|
|
930
|
-
$row.appendTo($list);
|
|
931
|
-
};
|
|
932
|
-
|
|
933
|
-
const formatBytes = function (value) {
|
|
934
|
-
const bytes = Math.max(0, Number(value) || 0);
|
|
935
|
-
if (bytes >= (1024 * 1024)) return (bytes / (1024 * 1024)).toLocaleString(undefined, { maximumFractionDigits: 1 }) + " MB";
|
|
936
|
-
if (bytes >= 1024) return (bytes / 1024).toLocaleString(undefined, { maximumFractionDigits: 1 }) + " KB";
|
|
937
|
-
return bytes.toLocaleString() + " B";
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
const contextLimit = overview.contextLimit && typeof overview.contextLimit === "object" ? overview.contextLimit : {};
|
|
941
|
-
const deployedProvider = String(contextLimit.provider || "").toLowerCase();
|
|
942
|
-
const currentProvider = String($("#node-input-llmProvider").val() || deployedProvider).toLowerCase();
|
|
943
|
-
let contextLimitTokens = currentProvider === deployedProvider
|
|
944
|
-
? Math.max(0, Number(contextLimit.tokens) || 0)
|
|
945
|
-
: 0;
|
|
946
|
-
const localProvider = currentProvider === "lmstudio" || currentProvider === "ollama";
|
|
947
|
-
if (localProvider) {
|
|
948
|
-
const modelContextTokens = contextLimitTokens || Math.max(0, Number($("#node-input-llmContextLength").val()) || 0);
|
|
949
|
-
const selectedTokens = selectedLocalContextTokens();
|
|
950
|
-
contextLimitTokens = selectedTokens > 0
|
|
951
|
-
? (modelContextTokens > 0 ? Math.min(modelContextTokens, selectedTokens) : selectedTokens)
|
|
952
|
-
: modelContextTokens;
|
|
953
|
-
}
|
|
954
|
-
const contextLimitValue = contextLimitTokens
|
|
955
|
-
? formatCompactContextTokens(contextLimitTokens) + " " + t("knxUltimateAI.messages.chatContextTokens", "tokens")
|
|
956
|
-
: t("knxUltimateAI.messages.chatContextProviderManaged", "managed by the selected provider/model");
|
|
957
|
-
const localBudgetValue = localProvider
|
|
958
|
-
? " · " + t("knxUltimateAI.messages.localContextBudget", "Local chat context") + ": " + selectedLocalContextLabel()
|
|
959
|
-
: "";
|
|
960
|
-
$contextLimit
|
|
961
|
-
.text(t("knxUltimateAI.messages.chatContextLimitLabel", "Maximum operational context") + ": " + contextLimitValue + localBudgetValue)
|
|
962
|
-
.attr("title", contextLimitTokens ? contextLimitTokens.toLocaleString() + " tokens" : contextLimitValue);
|
|
963
|
-
|
|
964
|
-
const promptUsage = overview.lastPromptUsage && typeof overview.lastPromptUsage === "object" ? overview.lastPromptUsage : null;
|
|
965
|
-
if (promptUsage && Number(promptUsage.bytes) > 0) {
|
|
966
|
-
const exactInputTokens = Math.max(0, Number(promptUsage.exactInputTokens) || 0);
|
|
967
|
-
const estimatedInputTokens = Math.max(0, Number(promptUsage.estimatedInputTokens) || 0);
|
|
968
|
-
const tokenText = exactInputTokens
|
|
969
|
-
? formatCompactContextTokens(exactInputTokens) + " " + t("knxUltimateAI.messages.chatContextExactInputTokens", "input tokens measured by the provider")
|
|
970
|
-
: "~" + formatCompactContextTokens(estimatedInputTokens) + " " + t("knxUltimateAI.messages.chatContextEstimatedInputTokens", "estimated input tokens");
|
|
971
|
-
const imageText = Number(promptUsage.imageCount) > 0
|
|
972
|
-
? " · " + Number(promptUsage.imageCount).toLocaleString() + " " + t("knxUltimateAI.messages.chatContextImages", "images")
|
|
973
|
-
: "";
|
|
974
|
-
$lastPromptUsage.text(
|
|
975
|
-
t("knxUltimateAI.messages.chatContextLastPromptLabel", "Last chat prompt actual size") + ": " +
|
|
976
|
-
formatBytes(promptUsage.bytes) + " · " + tokenText + imageText
|
|
977
|
-
);
|
|
978
|
-
} else {
|
|
979
|
-
$lastPromptUsage.text(
|
|
980
|
-
t("knxUltimateAI.messages.chatContextLastPromptLabel", "Last chat prompt actual size") + ": " +
|
|
981
|
-
t("knxUltimateAI.messages.chatContextLastPromptUnavailable", "not available until the first chat request")
|
|
982
|
-
);
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
const sourceLabels = {
|
|
986
|
-
knxTraffic: t("knxUltimateAI.messages.chatContextSourceKnxTraffic", "Derived KNX analysis plus the latest exact events from the default 20-minute or explicit interval, automatically bounded for the active local-model window."),
|
|
987
|
-
adapterHistory: t("knxUltimateAI.messages.chatContextSourceAdapterHistory", "Latest exact adapter events from the same interval, automatically bounded for the active local-model window."),
|
|
988
|
-
etsProject: t("knxUltimateAI.messages.chatContextSourceEtsProject", "Complete selected semantic ETS catalog for cloud models. Local models receive the full catalog when it fits; otherwise they receive a window-sized manifest and exact model-requested details. Function source only for explicit code review."),
|
|
989
|
-
memoryEducation: t("knxUltimateAI.messages.chatContextSourceMemoryEducation", "Session context, AI Education, bounded home memory and active plans."),
|
|
990
|
-
cameras: t("knxUltimateAI.messages.chatContextSourceCameras", "Detected cameras and their available capabilities.")
|
|
991
|
-
};
|
|
992
|
-
(Array.isArray(overview.sources) ? overview.sources : []).forEach(function (sourceId) {
|
|
993
|
-
addRow(
|
|
994
|
-
$sources,
|
|
995
|
-
sourceLabels[sourceId] || String(sourceId),
|
|
996
|
-
"",
|
|
997
|
-
"",
|
|
998
|
-
t("knxUltimateAI.messages.chatContextSourceBadge", "Source")
|
|
999
|
-
);
|
|
1000
|
-
});
|
|
1001
|
-
|
|
1002
|
-
const fileDescriptions = {
|
|
1003
|
-
chatContext: t("knxUltimateAI.messages.chatContextFileChatContext", "Persistent conversation turns, instructions and camera notification rules."),
|
|
1004
|
-
homeMemory: t("knxUltimateAI.messages.chatContextFileHomeMemory", "Bounded learned home memory only; AI Education remains in the node property."),
|
|
1005
|
-
schedules: t("knxUltimateAI.messages.chatContextFileSchedules", "Authoritative structured plans and reminders for this node."),
|
|
1006
|
-
schedulesReadable: t("knxUltimateAI.messages.chatContextFileSchedulesReadable", "Human-readable plans and reminders generated from the scheduler state."),
|
|
1007
|
-
assistantConfig: t("knxUltimateAI.messages.chatContextFileAssistantConfig", "Persistent Cerebrum configuration and semantic areas for this node."),
|
|
1008
|
-
lastChatPrompt: t("knxUltimateAI.messages.chatContextFileLastChatPrompt", "Temporary local copy of the latest system and user messages sent to the chat model; overwritten on every chat request.")
|
|
1009
|
-
};
|
|
1010
|
-
(Array.isArray(overview.files) ? overview.files : []).forEach(function (item) {
|
|
1011
|
-
if (!item || !item.name || !item.path) return;
|
|
1012
|
-
addRow(
|
|
1013
|
-
$files,
|
|
1014
|
-
item.name,
|
|
1015
|
-
fileDescriptions[item.id] || "",
|
|
1016
|
-
item.path,
|
|
1017
|
-
t("knxUltimateAI.messages.chatContextFileBadge", "File")
|
|
1018
|
-
);
|
|
1019
|
-
});
|
|
1020
|
-
|
|
1021
|
-
const directoryLabels = {
|
|
1022
|
-
archiveRoot: t("knxUltimateAI.messages.chatContextDirectoryRoot", "Telegram archive root"),
|
|
1023
|
-
nodeArchive: t("knxUltimateAI.messages.chatContextDirectoryNode", "This node's telegram archive"),
|
|
1024
|
-
adapterArchiveRoot: t("knxUltimateAI.messages.chatContextDirectoryAdapterRoot", "Adapter event archive root"),
|
|
1025
|
-
adapterNodeArchive: t("knxUltimateAI.messages.chatContextDirectoryAdapterNode", "This node's adapter event archive")
|
|
1026
|
-
};
|
|
1027
|
-
(Array.isArray(overview.telegramDirectories) ? overview.telegramDirectories : []).forEach(function (item) {
|
|
1028
|
-
if (!item || !item.path) return;
|
|
1029
|
-
addRow(
|
|
1030
|
-
$directories,
|
|
1031
|
-
directoryLabels[item.id] || String(item.id || ""),
|
|
1032
|
-
"",
|
|
1033
|
-
item.path,
|
|
1034
|
-
/^adapter/.test(String(item.id || ""))
|
|
1035
|
-
? t("knxUltimateAI.messages.chatContextDirectoryAdapterBadge", "Adapter")
|
|
1036
|
-
: t("knxUltimateAI.messages.chatContextDirectoryBadge", "KNX")
|
|
1037
|
-
);
|
|
1038
|
-
});
|
|
1039
|
-
|
|
1040
|
-
$("#knx-ai-chat-context-pattern")
|
|
1041
|
-
.text(t("knxUltimateAI.messages.chatContextTelegramPattern", "Daily files") + ": " + String(overview.telegramFilePattern || "YYYY-MM-DD.knxctx"));
|
|
1042
|
-
$status.hide();
|
|
1043
|
-
$content.show();
|
|
1044
|
-
};
|
|
1045
|
-
const editorLanguage = String((RED.settings && RED.settings.lang) || (window.navigator && window.navigator.language) || "en");
|
|
1046
|
-
const loadKnxAiOverview = function (refreshSetup) {
|
|
1047
|
-
const $refresh = $("#knx-ai-setup-doctor-refresh");
|
|
1048
|
-
$refresh.prop("disabled", true).find("i.fa-refresh").addClass("fa-spin");
|
|
1049
|
-
const requestData = { language: editorLanguage };
|
|
1050
|
-
if (nodeId) requestData.nodeId = nodeId;
|
|
1051
|
-
if (refreshSetup) requestData.refreshSetup = "1";
|
|
1052
|
-
$.ajax({
|
|
1053
|
-
url: "knxUltimateAI/adapters",
|
|
1054
|
-
type: "GET",
|
|
1055
|
-
data: requestData
|
|
1056
|
-
})
|
|
1057
|
-
.done(function (data) {
|
|
1058
|
-
renderSetupDoctor(data && data.setupDoctor);
|
|
1059
|
-
renderDetectedAdapters(data && data.adapters);
|
|
1060
|
-
renderChatContextOverview(data && data.chatContext);
|
|
1061
|
-
})
|
|
1062
|
-
.fail(function () {
|
|
1063
|
-
renderSetupDoctor(null);
|
|
1064
|
-
$("#knx-ai-detected-adapters-status")
|
|
1065
|
-
.text(t("knxUltimateAI.messages.detectedAdaptersUnavailable", "Compatible-node detection is temporarily unavailable."))
|
|
1066
|
-
.show();
|
|
1067
|
-
renderChatContextOverview(null);
|
|
1068
|
-
})
|
|
1069
|
-
.always(function () {
|
|
1070
|
-
$refresh.prop("disabled", false).find("i.fa-refresh").removeClass("fa-spin");
|
|
1071
|
-
});
|
|
1072
|
-
};
|
|
1073
|
-
loadKnxAiOverview(false);
|
|
1074
|
-
$("#knx-ai-setup-doctor-refresh").on("click", function (evt) {
|
|
1075
|
-
evt.preventDefault();
|
|
1076
|
-
loadKnxAiOverview(true);
|
|
1077
|
-
});
|
|
1078
|
-
|
|
1079
|
-
const openKnxAiWebPage = function (view, prompt) {
|
|
1080
|
-
const adminRoot = resolveAdminRoot();
|
|
1081
|
-
const targetBase = adminRoot + "/knxUltimateAI/sidebar/page";
|
|
1082
|
-
const params = new URLSearchParams();
|
|
1083
|
-
if (nodeId) params.set("nodeId", nodeId);
|
|
1084
|
-
if (view === "chat-learning") {
|
|
1085
|
-
params.set("tab", "cerebrum");
|
|
1086
|
-
params.set("cerebrumTab", "learning");
|
|
1087
|
-
} else if (view === "cerebrum-memory") {
|
|
1088
|
-
params.set("tab", "cerebrum");
|
|
1089
|
-
params.set("cerebrumTab", "memory");
|
|
1090
|
-
} else if (view === "cerebrum") {
|
|
1091
|
-
params.set("tab", "cerebrum");
|
|
1092
|
-
params.set("cerebrumTab", "conversation");
|
|
1093
|
-
if (prompt) params.set("prompt", String(prompt));
|
|
1094
|
-
}
|
|
1095
|
-
const accessToken = resolveAccessToken();
|
|
1096
|
-
if (accessToken) params.set("access_token", accessToken);
|
|
1097
|
-
const target = targetBase + (params.toString() ? ("?" + params.toString()) : "");
|
|
1098
|
-
const wnd = window.open(target, "_blank", "noopener,noreferrer");
|
|
1099
|
-
try { if (wnd && typeof wnd.focus === "function") wnd.focus(); } catch (e) { }
|
|
1100
|
-
};
|
|
1101
|
-
|
|
1102
|
-
$("#knx-ai-open-web-page-vue").on("click", function (evt) {
|
|
1103
|
-
evt.preventDefault();
|
|
1104
|
-
openKnxAiWebPage();
|
|
1105
|
-
});
|
|
1106
|
-
|
|
1107
|
-
$("#knx-ai-open-chat-learning").on("click", function (evt) {
|
|
1108
|
-
evt.preventDefault();
|
|
1109
|
-
openKnxAiWebPage("chat-learning");
|
|
1110
|
-
});
|
|
1111
|
-
|
|
1112
|
-
$("#knx-ai-open-cerebrum-memory").on("click", function (evt) {
|
|
1113
|
-
evt.preventDefault();
|
|
1114
|
-
openKnxAiWebPage("cerebrum-memory");
|
|
1115
|
-
});
|
|
1116
|
-
|
|
1117
|
-
const setRefreshModelsBusy = (busy) => {
|
|
1118
|
-
const $button = $("#knx-ai-refreshModels");
|
|
1119
|
-
$button.prop("disabled", !!busy);
|
|
1120
|
-
$button.find("i.fa-refresh").toggleClass("fa-spin", !!busy);
|
|
1121
|
-
};
|
|
1122
|
-
|
|
1123
|
-
const setOllamaInstallUiState = (busy) => {
|
|
1124
|
-
$("#knx-ai-installOllamaModel").prop("disabled", !!busy);
|
|
1125
|
-
$("#knx-ai-downloadOllamaModel").prop("disabled", !!busy);
|
|
1126
|
-
};
|
|
1127
|
-
|
|
1128
|
-
let localModelDetailsById = new Map();
|
|
1129
|
-
let availableModelItems = [];
|
|
1130
|
-
let modelPickerMouseDown = false;
|
|
1131
|
-
let localContextRequestVersion = 0;
|
|
1132
|
-
|
|
1133
|
-
const formatContextTokens = (value) => {
|
|
1134
|
-
const tokens = Math.max(0, Number(value) || 0);
|
|
1135
|
-
return tokens ? tokens.toLocaleString() : "?";
|
|
1136
|
-
};
|
|
1137
|
-
|
|
1138
|
-
const updateLocalContextTokenOptions = (detail) => {
|
|
1139
|
-
const $select = $("#node-input-llmLocalContextTokens");
|
|
1140
|
-
if (!$select.length) return;
|
|
1141
|
-
const maxContextLength = Math.max(0, Number(detail && detail.maxContextLength) || 0);
|
|
1142
|
-
$select.find("option[data-context-tokens]").each(function () {
|
|
1143
|
-
const optionTokens = Math.max(0, Number($(this).attr("data-context-tokens")) || 0);
|
|
1144
|
-
const unavailable = maxContextLength > 0 && optionTokens > maxContextLength;
|
|
1145
|
-
$(this).prop("disabled", unavailable).prop("hidden", unavailable).toggle(!unavailable);
|
|
1146
|
-
});
|
|
1147
|
-
if (maxContextLength > 0 && selectedLocalContextTokens() > maxContextLength) {
|
|
1148
|
-
$select.val("0");
|
|
1149
|
-
}
|
|
1150
|
-
if (lastChatContextOverview) renderChatContextOverview(lastChatContextOverview);
|
|
1151
|
-
};
|
|
1152
|
-
|
|
1153
|
-
const setLocalModelContextStatus = (detail, state, errorText) => {
|
|
1154
|
-
const $status = $("#knx-ai-local-context-status");
|
|
1155
|
-
const provider = $("#node-input-llmProvider").val();
|
|
1156
|
-
updateLocalContextTokenOptions(detail);
|
|
1157
|
-
if (!$status.length || (provider !== "lmstudio" && provider !== "ollama") || !detail) {
|
|
1158
|
-
$status.hide();
|
|
1159
|
-
return;
|
|
1160
|
-
}
|
|
1161
|
-
const maxTokens = formatContextTokens(detail.maxContextLength);
|
|
1162
|
-
const loadedTokens = formatContextTokens(detail.loadedContextLength);
|
|
1163
|
-
let text = t("knxUltimateAI.messages.lmStudioContextAvailable", "Maximum model context") + ": " + maxTokens + " token";
|
|
1164
|
-
let color = "#555";
|
|
1165
|
-
if (state === "loading") {
|
|
1166
|
-
text = t("knxUltimateAI.messages.lmStudioContextLoading", "Checking the active model context") + "…";
|
|
1167
|
-
color = "#1565c0";
|
|
1168
|
-
} else if (state === "inactive") {
|
|
1169
|
-
text = t("knxUltimateAI.messages.lmStudioContextInactive", "Model inactive; Bionic defaults will be used on the first request");
|
|
1170
|
-
color = "#555";
|
|
1171
|
-
} else if (state === "configured") {
|
|
1172
|
-
const configuredTokens = formatContextTokens(detail.configuredContextLength || detail.loadedContextLength || detail.maxContextLength);
|
|
1173
|
-
text = t("knxUltimateAI.messages.lmStudioContextConfigured", "Active model context") + ": " + configuredTokens + " token";
|
|
1174
|
-
color = "#2e7d32";
|
|
1175
|
-
} else if (state === "error") {
|
|
1176
|
-
text = String(errorText || t("knxUltimateAI.messages.lmStudioContextFailed", "Unable to configure the model context"));
|
|
1177
|
-
color = "#c62828";
|
|
1178
|
-
} else if (detail.loadedContextLength > 0) {
|
|
1179
|
-
text += " · " + t("knxUltimateAI.messages.lmStudioContextCurrentlyLoaded", "currently loaded") + ": " + loadedTokens + " token";
|
|
1180
|
-
}
|
|
1181
|
-
text += " · " + t("knxUltimateAI.messages.localContextBudget", "Local chat context") + ": " + selectedLocalContextLabel();
|
|
1182
|
-
$status.text(text).css("color", color).show();
|
|
1183
|
-
};
|
|
1184
|
-
|
|
1185
|
-
const populateModels = (models, modelDetails) => {
|
|
1186
|
-
localModelDetailsById = new Map();
|
|
1187
|
-
(modelDetails || []).forEach(function (detail) {
|
|
1188
|
-
if (detail && detail.id) localModelDetailsById.set(String(detail.id), detail);
|
|
1189
|
-
});
|
|
1190
|
-
availableModelItems = (models || []).map(function (m) {
|
|
1191
|
-
const detail = localModelDetailsById.get(String(m));
|
|
1192
|
-
const label = detail
|
|
1193
|
-
? String(detail.displayName || detail.id) + " · " + formatContextTokens(detail.maxContextLength) + " token"
|
|
1194
|
-
: String(m);
|
|
1195
|
-
return { label: label, value: String(m) };
|
|
1196
|
-
});
|
|
1197
|
-
};
|
|
1198
|
-
|
|
1199
|
-
const configureModelPicker = () => {
|
|
1200
|
-
const $model = $("#node-input-llmModel");
|
|
1201
|
-
if (!$model.length || typeof $model.autocomplete !== "function") return;
|
|
1202
|
-
$model.autocomplete({
|
|
1203
|
-
minLength: 0,
|
|
1204
|
-
source: function (request, response) {
|
|
1205
|
-
const term = String(request && request.term ? request.term : "").trim().toLowerCase();
|
|
1206
|
-
if (!term) {
|
|
1207
|
-
response(availableModelItems.slice());
|
|
1208
|
-
return;
|
|
1209
|
-
}
|
|
1210
|
-
response(availableModelItems.filter(function (item) {
|
|
1211
|
-
return item.value.toLowerCase().includes(term) || item.label.toLowerCase().includes(term);
|
|
1212
|
-
}));
|
|
1213
|
-
},
|
|
1214
|
-
select: function (event, ui) {
|
|
1215
|
-
$(this).val(ui.item.value).trigger("change");
|
|
1216
|
-
return false;
|
|
1217
|
-
}
|
|
1218
|
-
});
|
|
1219
|
-
$model.on("mousedown.knxUltimateAiModelPicker", function () {
|
|
1220
|
-
modelPickerMouseDown = true;
|
|
1221
|
-
}).on("focus.knxUltimateAiModelPicker", function () {
|
|
1222
|
-
if (!modelPickerMouseDown) $(this).autocomplete("search", "");
|
|
1223
|
-
}).on("click.knxUltimateAiModelPicker", function () {
|
|
1224
|
-
modelPickerMouseDown = false;
|
|
1225
|
-
const input = this;
|
|
1226
|
-
setTimeout(function () {
|
|
1227
|
-
try { $(input).autocomplete("search", ""); } catch (error) { }
|
|
1228
|
-
}, 0);
|
|
1229
|
-
}).on("blur.knxUltimateAiModelPicker", function () {
|
|
1230
|
-
modelPickerMouseDown = false;
|
|
1231
|
-
});
|
|
1232
|
-
};
|
|
1233
|
-
|
|
1234
|
-
configureModelPicker();
|
|
1235
|
-
|
|
1236
|
-
const normalizeUrl = (value) => String(value || "").trim().replace(/\/+$/, "").toLowerCase();
|
|
1237
|
-
const isOpenAiDefaultUrl = (value) => normalizeUrl(value) === normalizeUrl(OPENAI_COMPAT_DEFAULT_CHAT_URL);
|
|
1238
|
-
const isOllamaDefaultUrl = (value) => normalizeUrl(value) === normalizeUrl(OLLAMA_DEFAULT_CHAT_URL);
|
|
1239
|
-
const isOpenAiDefaultModel = (value) => OPENAI_COMPAT_DEFAULT_MODELS.indexOf(String(value || "").trim().toLowerCase()) >= 0;
|
|
1240
|
-
const DEFAULT_CHAT_URLS = [OPENAI_COMPAT_DEFAULT_CHAT_URL, OLLAMA_DEFAULT_CHAT_URL, ANTHROPIC_DEFAULT_CHAT_URL, LMSTUDIO_DEFAULT_CHAT_URL];
|
|
1241
|
-
const DEFAULT_MODELS = OPENAI_COMPAT_DEFAULT_MODELS.concat([OLLAMA_DEFAULT_MODEL, ANTHROPIC_DEFAULT_MODEL]);
|
|
1242
|
-
const isAnyDefaultUrl = (value) => DEFAULT_CHAT_URLS.some((u) => normalizeUrl(u) === normalizeUrl(value));
|
|
1243
|
-
const isAnyDefaultModel = (value) => DEFAULT_MODELS.indexOf(String(value || "").trim().toLowerCase()) >= 0;
|
|
1244
|
-
|
|
1245
|
-
const applyProviderDefaults = (provider) => {
|
|
1246
|
-
const $baseUrl = $("#node-input-llmBaseUrl");
|
|
1247
|
-
const $model = $("#node-input-llmModel");
|
|
1248
|
-
const currentBaseUrl = String($baseUrl.val() || "").trim();
|
|
1249
|
-
const currentModel = String($model.val() || "").trim();
|
|
1250
|
-
|
|
1251
|
-
const urlByProvider = { ollama: OLLAMA_DEFAULT_CHAT_URL, anthropic: ANTHROPIC_DEFAULT_CHAT_URL, lmstudio: LMSTUDIO_DEFAULT_CHAT_URL, openai_compat: OPENAI_COMPAT_DEFAULT_CHAT_URL };
|
|
1252
|
-
const modelByProvider = { ollama: OLLAMA_DEFAULT_MODEL, anthropic: ANTHROPIC_DEFAULT_MODEL, lmstudio: "", openai_compat: OPENAI_COMPAT_DEFAULT_MODELS[0] };
|
|
1253
|
-
const targetUrl = urlByProvider[provider] || OPENAI_COMPAT_DEFAULT_CHAT_URL;
|
|
1254
|
-
const targetModel = Object.prototype.hasOwnProperty.call(modelByProvider, provider)
|
|
1255
|
-
? modelByProvider[provider]
|
|
1256
|
-
: OPENAI_COMPAT_DEFAULT_MODELS[0];
|
|
1257
|
-
|
|
1258
|
-
// Only overwrite when the field is empty or still holds another provider's default,
|
|
1259
|
-
// so a user's custom base URL / model is never clobbered when switching providers.
|
|
1260
|
-
if (!currentBaseUrl || isAnyDefaultUrl(currentBaseUrl)) $baseUrl.val(targetUrl);
|
|
1261
|
-
if (!currentModel || isAnyDefaultModel(currentModel)) $model.val(targetModel);
|
|
1262
|
-
};
|
|
1263
|
-
|
|
1264
|
-
const configureSelectedLocalModel = () => {
|
|
1265
|
-
const provider = $("#node-input-llmProvider").val();
|
|
1266
|
-
if (provider !== "lmstudio" && provider !== "ollama") return;
|
|
1267
|
-
const model = String($("#node-input-llmModel").val() || "").trim();
|
|
1268
|
-
const detail = localModelDetailsById.get(model);
|
|
1269
|
-
if (!detail || !(Number(detail.maxContextLength) > 0)) {
|
|
1270
|
-
$("#node-input-llmContextLength").val(0);
|
|
1271
|
-
updateLocalContextTokenOptions(null);
|
|
1272
|
-
setLocalModelContextStatus(null);
|
|
1273
|
-
return;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
const requestVersion = ++localContextRequestVersion;
|
|
1277
|
-
const activeContextLength = Number(detail.loadedContextLength) > 0
|
|
1278
|
-
? Number(detail.loadedContextLength)
|
|
1279
|
-
: Number(detail.maxContextLength);
|
|
1280
|
-
$("#node-input-llmContextLength").val(activeContextLength);
|
|
1281
|
-
if (provider === "ollama") {
|
|
1282
|
-
detail.configuredContextLength = Number(detail.maxContextLength);
|
|
1283
|
-
$("#node-input-llmContextLength").val(detail.configuredContextLength);
|
|
1284
|
-
setLocalModelContextStatus(detail);
|
|
1285
|
-
return;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
setLocalModelContextStatus(detail, "loading");
|
|
1289
|
-
$("#node-input-llmModel").prop("disabled", true);
|
|
1290
|
-
$("#knx-ai-refreshModels").prop("disabled", true);
|
|
1291
|
-
|
|
1292
|
-
const payload = {
|
|
1293
|
-
nodeId: nodeId,
|
|
1294
|
-
baseUrl: $("#node-input-llmBaseUrl").val() || LMSTUDIO_DEFAULT_CHAT_URL,
|
|
1295
|
-
model: model,
|
|
1296
|
-
localContextTokens: selectedLocalContextTokens()
|
|
1297
|
-
};
|
|
1298
|
-
const apiKey = $("#node-input-llmApiKey").val() || "";
|
|
1299
|
-
if (apiKey && apiKey !== "__PWRD__") payload.apiKey = apiKey;
|
|
1300
|
-
|
|
1301
|
-
$.ajax({
|
|
1302
|
-
url: "knxUltimateAI/lmstudio/select-model",
|
|
1303
|
-
type: "POST",
|
|
1304
|
-
contentType: "application/json",
|
|
1305
|
-
data: JSON.stringify(payload)
|
|
1306
|
-
})
|
|
1307
|
-
.done(function (data) {
|
|
1308
|
-
if (requestVersion !== localContextRequestVersion) return;
|
|
1309
|
-
const resolvedContextLength = Math.max(0, Number(data && data.contextLength) || 0);
|
|
1310
|
-
detail.loadedContextLength = data && data.active === true ? resolvedContextLength : 0;
|
|
1311
|
-
detail.configuredContextLength = resolvedContextLength;
|
|
1312
|
-
$("#node-input-llmContextLength").val(resolvedContextLength);
|
|
1313
|
-
setLocalModelContextStatus(detail, data && data.active === true ? "configured" : "inactive");
|
|
1314
|
-
})
|
|
1315
|
-
.fail(function (xhr) {
|
|
1316
|
-
if (requestVersion !== localContextRequestVersion) return;
|
|
1317
|
-
let errorText = t("knxUltimateAI.messages.lmStudioContextFailed", "Unable to configure the model context");
|
|
1318
|
-
try {
|
|
1319
|
-
if (xhr && xhr.responseJSON && xhr.responseJSON.error) errorText = xhr.responseJSON.error;
|
|
1320
|
-
} catch (e) { }
|
|
1321
|
-
setLocalModelContextStatus(detail, "error", errorText);
|
|
1322
|
-
try { RED.notify(errorText, "error"); } catch (e) { }
|
|
1323
|
-
})
|
|
1324
|
-
.always(function () {
|
|
1325
|
-
if (requestVersion !== localContextRequestVersion) return;
|
|
1326
|
-
$("#node-input-llmModel").prop("disabled", false);
|
|
1327
|
-
$("#knx-ai-refreshModels").prop("disabled", false);
|
|
1328
|
-
});
|
|
1329
|
-
};
|
|
1330
|
-
|
|
1331
|
-
const refreshModels = () => {
|
|
1332
|
-
const provider = $("#node-input-llmProvider").val();
|
|
1333
|
-
const baseUrl = $("#node-input-llmBaseUrl").val() || "";
|
|
1334
|
-
const apiKey = $("#node-input-llmApiKey").val() || "";
|
|
1335
|
-
const payload = { nodeId: nodeId, provider: provider, baseUrl: baseUrl };
|
|
1336
|
-
if (provider === "ollama") payload.autoStart = true;
|
|
1337
|
-
// Node-RED uses "__PWRD__" as placeholder for stored credentials: don't send it.
|
|
1338
|
-
if (apiKey && apiKey !== "__PWRD__") payload.apiKey = apiKey;
|
|
1339
|
-
|
|
1340
|
-
setRefreshModelsBusy(true);
|
|
1341
|
-
|
|
1342
|
-
$.ajax({
|
|
1343
|
-
url: "knxUltimateAI/models",
|
|
1344
|
-
type: "POST",
|
|
1345
|
-
contentType: "application/json",
|
|
1346
|
-
data: JSON.stringify(payload)
|
|
1347
|
-
})
|
|
1348
|
-
.done(function (data) {
|
|
1349
|
-
const models = (data && data.models) ? data.models : [];
|
|
1350
|
-
populateModels(models, data && data.modelDetails);
|
|
1351
|
-
let selectedAutomatically = false;
|
|
1352
|
-
if (provider === "lmstudio" && models.length > 0 && !String($("#node-input-llmModel").val() || "").trim()) {
|
|
1353
|
-
$("#node-input-llmModel").val(models[0]);
|
|
1354
|
-
selectedAutomatically = true;
|
|
1355
|
-
}
|
|
1356
|
-
if (provider === "lmstudio" || provider === "ollama") {
|
|
1357
|
-
const selectedDetail = localModelDetailsById.get(String($("#node-input-llmModel").val() || ""));
|
|
1358
|
-
if (selectedDetail) {
|
|
1359
|
-
setLocalModelContextStatus(selectedDetail);
|
|
1360
|
-
configureSelectedLocalModel();
|
|
1361
|
-
} else if (selectedAutomatically) {
|
|
1362
|
-
configureSelectedLocalModel();
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
if (provider === "ollama" && data && data.ollamaStarted) {
|
|
1366
|
-
try {
|
|
1367
|
-
const startedMsg = t('knxUltimateAI.messages.ollamaStartedAuto', "Ollama server started automatically.");
|
|
1368
|
-
RED.notify(startedMsg, "success");
|
|
1369
|
-
} catch (e) { }
|
|
1370
|
-
}
|
|
1371
|
-
if (provider === "ollama" && models.length === 0) {
|
|
1372
|
-
const msg = t('knxUltimateAI.messages.ollamaNoModels', "No local Ollama model found. Install one from https://ollama.com/library.");
|
|
1373
|
-
try { RED.notify(msg, "warning"); } catch (e) { }
|
|
1374
|
-
}
|
|
1375
|
-
})
|
|
1376
|
-
.fail(function (xhr) {
|
|
1377
|
-
let err = "Failed to load models";
|
|
1378
|
-
try {
|
|
1379
|
-
const resp = xhr && xhr.responseJSON;
|
|
1380
|
-
if (resp && resp.error) err = resp.error;
|
|
1381
|
-
} catch (e) { }
|
|
1382
|
-
try { RED.notify(err, "error"); } catch (e) { }
|
|
1383
|
-
})
|
|
1384
|
-
.always(function () {
|
|
1385
|
-
setRefreshModelsBusy(false);
|
|
1386
|
-
});
|
|
1387
|
-
};
|
|
1388
|
-
|
|
1389
|
-
const installOllamaModel = () => {
|
|
1390
|
-
const provider = $("#node-input-llmProvider").val();
|
|
1391
|
-
if (provider !== "ollama") return;
|
|
1392
|
-
const baseUrl = $("#node-input-llmBaseUrl").val() || "";
|
|
1393
|
-
const model = String($("#node-input-llmModel").val() || "").trim() || OLLAMA_DEFAULT_MODEL;
|
|
1394
|
-
const payload = { nodeId: nodeId, baseUrl: baseUrl, model: model };
|
|
1395
|
-
|
|
1396
|
-
$("#knx-ai-refreshModels").prop("disabled", true);
|
|
1397
|
-
setOllamaInstallUiState(true);
|
|
1398
|
-
|
|
1399
|
-
$.ajax({
|
|
1400
|
-
url: "knxUltimateAI/ollama/pull",
|
|
1401
|
-
type: "POST",
|
|
1402
|
-
contentType: "application/json",
|
|
1403
|
-
data: JSON.stringify(payload)
|
|
1404
|
-
})
|
|
1405
|
-
.done(function (data) {
|
|
1406
|
-
try {
|
|
1407
|
-
const okMsg = t('knxUltimateAI.messages.installedOllamaModel', "Ollama model installed") + ": " + model;
|
|
1408
|
-
RED.notify(okMsg, "success");
|
|
1409
|
-
if (data && data.ollamaStarted) {
|
|
1410
|
-
const startedMsg = t('knxUltimateAI.messages.ollamaStartedAuto', "Ollama server started automatically.");
|
|
1411
|
-
RED.notify(startedMsg, "success");
|
|
1412
|
-
}
|
|
1413
|
-
} catch (e) { }
|
|
1414
|
-
refreshModels();
|
|
1415
|
-
})
|
|
1416
|
-
.fail(function (xhr) {
|
|
1417
|
-
let err = t('knxUltimateAI.messages.installOllamaModelFailed', "Failed to install Ollama model");
|
|
1418
|
-
try {
|
|
1419
|
-
const resp = xhr && xhr.responseJSON;
|
|
1420
|
-
if (resp && resp.error) err = resp.error;
|
|
1421
|
-
} catch (e) { }
|
|
1422
|
-
try { RED.notify(err, "error"); } catch (e) { }
|
|
1423
|
-
$("#knx-ai-refreshModels").prop("disabled", false);
|
|
1424
|
-
})
|
|
1425
|
-
.always(function () {
|
|
1426
|
-
setOllamaInstallUiState(false);
|
|
1427
|
-
});
|
|
1428
|
-
};
|
|
1429
|
-
|
|
1430
|
-
const openOllamaLibrary = () => {
|
|
1431
|
-
const wnd = window.open(OLLAMA_LIBRARY_URL, "_blank", "noopener,noreferrer");
|
|
1432
|
-
try { if (wnd && typeof wnd.focus === "function") wnd.focus(); } catch (e) { }
|
|
1433
|
-
};
|
|
1434
|
-
|
|
1435
|
-
const toggleProvider = ({ applyDefaults = false, autoLoadModels = false } = {}) => {
|
|
1436
|
-
const provider = $("#node-input-llmProvider").val();
|
|
1437
|
-
const localProvider = provider === "lmstudio" || provider === "ollama";
|
|
1438
|
-
if (applyDefaults) applyProviderDefaults(provider);
|
|
1439
|
-
$("#knx-ai-local-context-row").toggle(localProvider);
|
|
1440
|
-
if (localProvider) {
|
|
1441
|
-
updateLocalContextTokenOptions(localModelDetailsById.get(String($("#node-input-llmModel").val() || "").trim()));
|
|
1442
|
-
}
|
|
1443
|
-
if (provider === "ollama") {
|
|
1444
|
-
$("#knx-ai-apikey-row").hide();
|
|
1445
|
-
$("#knx-ai-ollama-install-row").show();
|
|
1446
|
-
if (autoLoadModels) refreshModels();
|
|
1447
|
-
} else {
|
|
1448
|
-
$("#knx-ai-apikey-row").show();
|
|
1449
|
-
$("#knx-ai-ollama-install-row").hide();
|
|
1450
|
-
if (provider === "lmstudio" && autoLoadModels) refreshModels();
|
|
1451
|
-
if (provider !== "lmstudio") {
|
|
1452
|
-
$("#node-input-llmContextLength").val(0);
|
|
1453
|
-
if (provider !== "ollama") $("#knx-ai-local-context-status").hide();
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
const toggleWebAccess = () => {
|
|
1458
|
-
const enabled = $("#node-input-webAccessEnabled").prop("checked") === true;
|
|
1459
|
-
$("#knx-ai-web-access-settings").toggle(enabled);
|
|
1460
|
-
};
|
|
1461
|
-
$("#node-input-webAccessEnabled").on("change", toggleWebAccess);
|
|
1462
|
-
toggleWebAccess();
|
|
1463
|
-
$("#node-input-llmProvider").on("change", function () {
|
|
1464
|
-
toggleProvider({ applyDefaults: true, autoLoadModels: true });
|
|
1465
|
-
});
|
|
1466
|
-
toggleProvider({ applyDefaults: true });
|
|
1467
|
-
|
|
1468
|
-
$("#knx-ai-refreshModels").on("click", function (evt) {
|
|
1469
|
-
evt.preventDefault();
|
|
1470
|
-
refreshModels();
|
|
1471
|
-
});
|
|
1472
|
-
$("#node-input-llmModel").on("change", function () {
|
|
1473
|
-
configureSelectedLocalModel();
|
|
1474
|
-
});
|
|
1475
|
-
$("#node-input-llmLocalContextTokens").on("change", function () {
|
|
1476
|
-
const detail = localModelDetailsById.get(String($("#node-input-llmModel").val() || "").trim());
|
|
1477
|
-
updateLocalContextTokenOptions(detail);
|
|
1478
|
-
if (detail) setLocalModelContextStatus(detail, detail.loadedContextLength > 0 ? "configured" : undefined);
|
|
1479
|
-
});
|
|
1480
|
-
$("#knx-ai-downloadOllamaModel").on("click", function (evt) {
|
|
1481
|
-
evt.preventDefault();
|
|
1482
|
-
openOllamaLibrary();
|
|
1483
|
-
});
|
|
1484
|
-
$("#knx-ai-installOllamaModel").on("click", function (evt) {
|
|
1485
|
-
evt.preventDefault();
|
|
1486
|
-
installOllamaModel();
|
|
1487
|
-
});
|
|
1488
|
-
},
|
|
1489
|
-
oneditsave: function () {
|
|
1490
|
-
try { RED.sidebar.show("info"); } catch (error) { }
|
|
1491
|
-
try {
|
|
1492
|
-
const checkboxes = $("#knx-ai-ets-ga-list input.knx-ai-ets-ga-cb");
|
|
1493
|
-
if (checkboxes.length > 0) {
|
|
1494
|
-
const exposed = [];
|
|
1495
|
-
const readOnly = [];
|
|
1496
|
-
checkboxes.each(function () { if ($(this).is(":checked")) exposed.push($(this).val()); });
|
|
1497
|
-
$("#knx-ai-ets-ga-list input.knx-ai-ets-ga-ro").each(function () { if ($(this).is(":checked")) readOnly.push($(this).val()); });
|
|
1498
|
-
this.etsExposedGAs = exposed;
|
|
1499
|
-
this.etsReadOnlyGAs = readOnly;
|
|
1500
|
-
this.etsExposeConfigured = true;
|
|
1501
|
-
}
|
|
1502
|
-
} catch (error) { }
|
|
1503
|
-
try {
|
|
1504
|
-
if (this.chatInputCodeEditor && typeof this.chatInputCodeEditor.getValue === "function") {
|
|
1505
|
-
this.chatInputCode = this.chatInputCodeEditor.getValue();
|
|
1506
|
-
$("#node-input-chatInputCode").val(this.chatInputCode);
|
|
1507
|
-
}
|
|
1508
|
-
} catch (error) { }
|
|
1509
|
-
try {
|
|
1510
|
-
if (this.chatOutputCodeEditor && typeof this.chatOutputCodeEditor.getValue === "function") {
|
|
1511
|
-
this.chatOutputCode = this.chatOutputCodeEditor.getValue();
|
|
1512
|
-
$("#node-input-chatOutputCode").val(this.chatOutputCode);
|
|
1513
|
-
}
|
|
1514
|
-
} catch (error) { }
|
|
1515
|
-
try {
|
|
1516
|
-
if (typeof this._destroyKnxAiChatEditors === "function") this._destroyKnxAiChatEditors();
|
|
1517
|
-
} catch (error) { }
|
|
1518
|
-
delete this._destroyKnxAiChatEditors;
|
|
1519
|
-
},
|
|
1520
|
-
oneditcancel: function () {
|
|
1521
|
-
try { RED.sidebar.show("info"); } catch (error) { }
|
|
1522
|
-
try {
|
|
1523
|
-
if (typeof this._destroyKnxAiChatEditors === "function") this._destroyKnxAiChatEditors();
|
|
1524
|
-
} catch (error) { }
|
|
1525
|
-
delete this._destroyKnxAiChatEditors;
|
|
1526
|
-
},
|
|
1527
|
-
oneditresize: function () {
|
|
1528
|
-
try {
|
|
1529
|
-
if (this.chatInputCodeEditor && typeof this.chatInputCodeEditor.resize === "function") this.chatInputCodeEditor.resize();
|
|
1530
|
-
if (this.chatOutputCodeEditor && typeof this.chatOutputCodeEditor.resize === "function") this.chatOutputCodeEditor.resize();
|
|
1531
|
-
} catch (error) { }
|
|
1532
|
-
}
|
|
1533
|
-
})
|
|
1534
|
-
// The historical type remains registered so deployed flows keep loading,
|
|
1535
|
-
// but new Cerebrum nodes belong to node-red-contrib-cerebrum-ultimate.
|
|
1536
|
-
try { RED.palette.remove('knxUltimateAI'); } catch (error) { }
|
|
1537
|
-
</script>
|
|
1538
|
-
|
|
1539
|
-
<script type="text/html" data-template-name="knxUltimateAI">
|
|
1540
|
-
<div class="form-row knx-ultimate-v8-upgrade-row">
|
|
1541
|
-
<button type="button" class="red-ui-button knx-ultimate-v8-upgrade-button" data-i18n="[title]node-red-contrib-knx-ultimate/knxUltimateUtility:knxUltimateUtility.v8_upgrade.button_title">
|
|
1542
|
-
<i class="fa fa-arrow-circle-up" aria-hidden="true"></i>
|
|
1543
|
-
<span data-i18n="node-red-contrib-knx-ultimate/knxUltimateUtility:knxUltimateUtility.v8_upgrade.button"></span>
|
|
1544
|
-
</button>
|
|
1545
|
-
</div>
|
|
1546
|
-
<div class="form-tips" style="margin-bottom:10px;"><b>Legacy node:</b> existing flow instances remain supported. For new installations use <a href="https://github.com/Supergiovane/node-red-contrib-cerebrum-ultimate#readme" target="_blank"><b>Cerebrum Ultimate</b></a>.</div>
|
|
1547
|
-
<div class="form-row" style="margin-bottom:10px;">
|
|
1548
|
-
<span style="color:#ff0000"><i class="fa fa-youtube"></i></span> <a target="_blank" href="https://www.youtube.com/playlist?list=PL9Yh1bjbLAYrU8PsVhW4xzEug2WtVFv3E"><b>KNX-Ultimate video tutorials (YouTube playlist)</b></a>
|
|
1549
|
-
</div>
|
|
1550
|
-
<b><span data-i18n="knxUltimateAI.title"></span></b>  <span style="color:#ff9800"     <i class="fa fa-youtube"></i></span><a
|
|
1551
|
-
target="_blank" href="https://www.youtube.com/watch?v=qw7kjQ_mvdg&t=10s">See sample video</a>
|
|
1552
|
-
<br /><br />
|
|
1553
|
-
<div class="form-row">
|
|
1554
|
-
|
|
1555
|
-
<label for="node-input-server"><i class="fa fa-tag"></i> <span data-i18n="knxUltimateAI.properties.server"></span></label>
|
|
1556
|
-
<input type="text" id="node-input-server">
|
|
1557
|
-
</div>
|
|
1558
|
-
|
|
1559
|
-
<div class="form-row">
|
|
1560
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="knxUltimateAI.properties.name"></span></label>
|
|
1561
|
-
<input type="text" id="node-input-name" data-i18n="[placeholder]knxUltimateAI.properties.name" style="flex:1 1 240px; min-width:240px; max-width:240px;">
|
|
1562
|
-
</div>
|
|
1563
|
-
|
|
1564
|
-
<div class="form-row">
|
|
1565
|
-
<label for="node-input-topic"><i class="fa fa-tasks"></i> <span data-i18n="knxUltimateAI.properties.topic"></span></label>
|
|
1566
|
-
<input type="text" id="node-input-topic" data-i18n="[placeholder]knxUltimateAI.properties.topic">
|
|
1567
|
-
</div>
|
|
1568
|
-
<div class="form-row">
|
|
1569
|
-
<label><i class="fa fa-external-link"></i> Web UI</label>
|
|
1570
|
-
<div style="display:flex; gap:8px; flex-wrap:wrap;">
|
|
1571
|
-
<button type="button" class="red-ui-button" id="knx-ai-open-web-page-vue" style="background-color:#ff9800; border-color:#ff9800; color:#ffffff !important; -webkit-text-fill-color:#ffffff;">
|
|
1572
|
-
<i class="fa fa-external-link" style="color:#ffffff !important;"></i> <span style="color:#ffffff !important;">Open Cerebrum Ultimate Web Page</span>
|
|
1573
|
-
</button>
|
|
1574
|
-
</div>
|
|
1575
|
-
</div>
|
|
1576
|
-
|
|
1577
|
-
<div id="knx-ai-tabs">
|
|
1578
|
-
<ul>
|
|
1579
|
-
<li><a href="#knx-ai-tabs-assistant"><i class="fa fa-magic"></i> <span data-i18n="knxUltimateAI.sections.groupAssistant"></span></a></li>
|
|
1580
|
-
<li><a href="#knx-ai-tabs-chat-home"><i class="fa fa-comments"></i> <span data-i18n="knxUltimateAI.sections.groupChatHome"></span></a></li>
|
|
1581
|
-
</ul>
|
|
1582
|
-
<div id="knx-ai-tabs-assistant">
|
|
1583
|
-
<div class="knx-ai-accordion-subsection">
|
|
1584
|
-
<h4><i class="fa fa-cog"></i> <span data-i18n="knxUltimateAI.sections.quickSetup"></span></h4>
|
|
1585
|
-
<div class="knx-ai-accordion-mount" id="knx-ai-mount-assistant-setup"></div>
|
|
1586
|
-
</div>
|
|
1587
|
-
<div class="knx-ai-accordion-subsection">
|
|
1588
|
-
<h4><i class="fa fa-list"></i> <span data-i18n="knxUltimateAI.sections.etsAccess"></span></h4>
|
|
1589
|
-
<div class="knx-ai-accordion-mount" id="knx-ai-mount-ets-access"></div>
|
|
1590
|
-
</div>
|
|
1591
|
-
<div class="knx-ai-accordion-subsection">
|
|
1592
|
-
<h4><i class="fa fa-sliders"></i> <span data-i18n="knxUltimateAI.sections.advanced"></span></h4>
|
|
1593
|
-
<div class="knx-ai-accordion-mount" id="knx-ai-mount-assistant-advanced"></div>
|
|
1594
|
-
</div>
|
|
1595
|
-
</div>
|
|
1596
|
-
|
|
1597
|
-
<div id="knx-ai-tabs-chat-home">
|
|
1598
|
-
<div class="knx-ai-accordion-subsection">
|
|
1599
|
-
<h4><i class="fa fa-plug"></i> <span data-i18n="knxUltimateAI.sections.chatAdapter"></span></h4>
|
|
1600
|
-
<div class="knx-ai-accordion-mount" id="knx-ai-mount-chat-adapter"></div>
|
|
1601
|
-
</div>
|
|
1602
|
-
<div class="knx-ai-accordion-subsection">
|
|
1603
|
-
<h4><i class="fa fa-home"></i> <span data-i18n="knxUltimateAI.sections.homeIntelligence"></span></h4>
|
|
1604
|
-
<div class="knx-ai-accordion-mount" id="knx-ai-mount-home-intelligence"></div>
|
|
1605
|
-
</div>
|
|
1606
|
-
<div id="knx-ai-chat-learning-link-panel">
|
|
1607
|
-
<h4><i class="fa fa-graduation-cap"></i> <span data-i18n="knxUltimateAI.sections.chatLearning"></span></h4>
|
|
1608
|
-
<p class="knx-ai-chat-learning-link-copy" data-i18n="knxUltimateAI.messages.chatLearningOpenHint"></p>
|
|
1609
|
-
<button type="button" class="red-ui-button" id="knx-ai-open-chat-learning">
|
|
1610
|
-
<i class="fa fa-external-link"></i> <span data-i18n="knxUltimateAI.buttons.openChatLearning"></span>
|
|
1611
|
-
</button>
|
|
1612
|
-
<h4 style="margin-top:14px;"><i class="fa fa-database"></i> <span data-i18n="knxUltimateAI.sections.cerebrumMemory"></span></h4>
|
|
1613
|
-
<p class="knx-ai-chat-learning-link-copy" data-i18n="knxUltimateAI.messages.cerebrumMemoryOpenHint"></p>
|
|
1614
|
-
<button type="button" class="red-ui-button" id="knx-ai-open-cerebrum-memory">
|
|
1615
|
-
<i class="fa fa-external-link"></i> <span data-i18n="knxUltimateAI.buttons.openCerebrumMemory"></span>
|
|
1616
|
-
</button>
|
|
1617
|
-
</div>
|
|
1618
|
-
<div id="knx-ai-detected-adapters-panel">
|
|
1619
|
-
<h4><i class="fa fa-puzzle-piece"></i> <span data-i18n="knxUltimateAI.sections.detectedAdapters"></span></h4>
|
|
1620
|
-
<div id="knx-ai-detected-adapters-status" data-i18n="knxUltimateAI.messages.detectedAdaptersLoading"></div>
|
|
1621
|
-
<div id="knx-ai-detected-adapters-list"></div>
|
|
1622
|
-
</div>
|
|
1623
|
-
<div id="knx-ai-chat-context-panel">
|
|
1624
|
-
<h4><i class="fa fa-database"></i> <span data-i18n="knxUltimateAI.sections.chatContextOverview"></span></h4>
|
|
1625
|
-
<div id="knx-ai-chat-context-status" data-i18n="knxUltimateAI.messages.chatContextLoading"></div>
|
|
1626
|
-
<div id="knx-ai-chat-context-content" style="display:none;">
|
|
1627
|
-
<div class="knx-ai-chat-context-intro" data-i18n="knxUltimateAI.messages.chatContextIntro"></div>
|
|
1628
|
-
<div id="knx-ai-chat-context-limit" class="knx-ai-chat-context-metric"></div>
|
|
1629
|
-
<div id="knx-ai-chat-context-last-prompt" class="knx-ai-chat-context-metric"></div>
|
|
1630
|
-
<div class="knx-ai-chat-context-group-title" data-i18n="knxUltimateAI.messages.chatContextSourcesTitle"></div>
|
|
1631
|
-
<div id="knx-ai-chat-context-sources-list"></div>
|
|
1632
|
-
<div class="knx-ai-chat-context-group-title" data-i18n="knxUltimateAI.messages.chatContextFilesTitle"></div>
|
|
1633
|
-
<div id="knx-ai-chat-context-files-list"></div>
|
|
1634
|
-
<div class="knx-ai-chat-context-group-title" data-i18n="knxUltimateAI.messages.chatContextDirectoriesTitle"></div>
|
|
1635
|
-
<div id="knx-ai-chat-context-directories-list"></div>
|
|
1636
|
-
<div id="knx-ai-chat-context-pattern" class="knx-ai-chat-context-pattern"></div>
|
|
1637
|
-
</div>
|
|
1638
|
-
</div>
|
|
1639
|
-
<details id="knx-ai-setup-doctor-panel">
|
|
1640
|
-
<summary class="knx-ai-setup-doctor-toggle">
|
|
1641
|
-
<span><i class="fa fa-magic"></i> <span data-i18n="knxUltimateAI.sections.setupDoctor"></span></span>
|
|
1642
|
-
<i class="fa fa-chevron-right knx-ai-setup-doctor-chevron" aria-hidden="true"></i>
|
|
1643
|
-
</summary>
|
|
1644
|
-
<div class="knx-ai-setup-doctor-body">
|
|
1645
|
-
<div id="knx-ai-setup-doctor-status" data-i18n="knxUltimateAI.messages.setupDoctorLoading"></div>
|
|
1646
|
-
<div id="knx-ai-setup-doctor-content" style="display:none;">
|
|
1647
|
-
<div class="knx-ai-setup-doctor-hero">
|
|
1648
|
-
<div class="knx-ai-setup-doctor-summary">
|
|
1649
|
-
<strong id="knx-ai-setup-doctor-state"></strong>
|
|
1650
|
-
<div id="knx-ai-setup-doctor-summary"></div>
|
|
1651
|
-
</div>
|
|
1652
|
-
<div id="knx-ai-setup-doctor-score" class="knx-ai-setup-doctor-score"></div>
|
|
1653
|
-
</div>
|
|
1654
|
-
<div id="knx-ai-setup-doctor-checks"></div>
|
|
1655
|
-
<div class="knx-ai-setup-doctor-prompts">
|
|
1656
|
-
<strong data-i18n="knxUltimateAI.messages.setupDoctorPromptsTitle"></strong>
|
|
1657
|
-
<div class="knx-ai-setup-doctor-prompts-hint" data-i18n="knxUltimateAI.messages.setupDoctorPromptsHint"></div>
|
|
1658
|
-
<div id="knx-ai-setup-doctor-prompt-list" class="knx-ai-setup-doctor-prompt-list"></div>
|
|
1659
|
-
</div>
|
|
1660
|
-
<div class="knx-ai-setup-doctor-footer">
|
|
1661
|
-
<div class="knx-ai-setup-doctor-deploy-hint">
|
|
1662
|
-
<i class="fa fa-info-circle"></i> <span data-i18n="knxUltimateAI.messages.setupDoctorDeployHint"></span>
|
|
1663
|
-
</div>
|
|
1664
|
-
<button type="button" class="red-ui-button" id="knx-ai-setup-doctor-refresh">
|
|
1665
|
-
<i class="fa fa-refresh"></i> <span data-i18n="knxUltimateAI.buttons.refreshSetupDoctor"></span>
|
|
1666
|
-
</button>
|
|
1667
|
-
</div>
|
|
1668
|
-
</div>
|
|
1669
|
-
</div>
|
|
1670
|
-
</details>
|
|
1671
|
-
</div>
|
|
1672
|
-
|
|
1673
|
-
</div>
|
|
1674
|
-
|
|
1675
|
-
<div id="knx-ai-accordion-source" style="display:none;">
|
|
1676
|
-
|
|
1677
|
-
<div id="knx-ai-tab-llm-connection">
|
|
1678
|
-
<div class="form-row">
|
|
1679
|
-
<input type="checkbox" id="node-input-llmEnabled" style="display:inline-block; width:auto; vertical-align:top;">
|
|
1680
|
-
<label style="width:auto" for="node-input-llmEnabled"> <span data-i18n="knxUltimateAI.properties.llmEnabled"></span></label>
|
|
1681
|
-
</div>
|
|
1682
|
-
|
|
1683
|
-
<div id="knx-ai-llm-connection-settings">
|
|
1684
|
-
<div class="form-row">
|
|
1685
|
-
<label style="width:290px" for="node-input-llmProvider"><i class="fa fa-cog"></i> <span data-i18n="knxUltimateAI.properties.llmProvider"></span></label>
|
|
1686
|
-
<select style="width:100%" id="node-input-llmProvider">
|
|
1687
|
-
<option value="openai_compat" data-i18n="knxUltimateAI.selectlists.llmProvider.openai_compat"></option>
|
|
1688
|
-
<option value="anthropic" data-i18n="knxUltimateAI.selectlists.llmProvider.anthropic"></option>
|
|
1689
|
-
<option value="ollama" data-i18n="knxUltimateAI.selectlists.llmProvider.ollama"></option>
|
|
1690
|
-
<option value="lmstudio" data-i18n="knxUltimateAI.selectlists.llmProvider.lmstudio"></option>
|
|
1691
|
-
</select>
|
|
1692
|
-
</div>
|
|
1693
|
-
<div class="form-row" id="knx-ai-apikey-row">
|
|
1694
|
-
<label style="width:290px" for="node-input-llmApiKey"><i class="fa fa-key"></i> <span data-i18n="knxUltimateAI.properties.llmApiKey"></span></label>
|
|
1695
|
-
<input type="password" id="node-input-llmApiKey" data-i18n="[placeholder]knxUltimateAI.placeholder.llmApiKey">
|
|
1696
|
-
</div>
|
|
1697
|
-
|
|
1698
|
-
<div class="form-row">
|
|
1699
|
-
<label style="width:290px" for="node-input-llmModel"><i class="fa fa-cube"></i> <span data-i18n="knxUltimateAI.properties.llmModel"></span></label>
|
|
1700
|
-
<input style="width:calc(100% - 110px)" type="text" id="node-input-llmModel" autocomplete="off" data-i18n="[placeholder]knxUltimateAI.placeholder.llmModel">
|
|
1701
|
-
<button type="button" class="red-ui-button" id="knx-ai-refreshModels" style="margin-left:6px;" title="Refresh models">
|
|
1702
|
-
<i class="fa fa-refresh"></i> <span data-i18n="knxUltimateAI.buttons.refreshModels"></span>
|
|
1703
|
-
</button>
|
|
1704
|
-
</div>
|
|
1705
|
-
<div class="form-row">
|
|
1706
|
-
<label style="width:290px" for="node-input-llmReasoningEffort"><i class="fa fa-tachometer"></i> <span data-i18n="knxUltimateAI.properties.llmReasoningEffort"></span></label>
|
|
1707
|
-
<select style="width:100%" id="node-input-llmReasoningEffort">
|
|
1708
|
-
<option value="default" data-i18n="knxUltimateAI.selectlists.reasoningEffort.default"></option>
|
|
1709
|
-
<option value="none" data-i18n="knxUltimateAI.selectlists.reasoningEffort.none"></option>
|
|
1710
|
-
<option value="minimal" data-i18n="knxUltimateAI.selectlists.reasoningEffort.minimal"></option>
|
|
1711
|
-
<option value="low" data-i18n="knxUltimateAI.selectlists.reasoningEffort.low"></option>
|
|
1712
|
-
<option value="medium" data-i18n="knxUltimateAI.selectlists.reasoningEffort.medium"></option>
|
|
1713
|
-
<option value="high" data-i18n="knxUltimateAI.selectlists.reasoningEffort.high"></option>
|
|
1714
|
-
<option value="xhigh" data-i18n="knxUltimateAI.selectlists.reasoningEffort.xhigh"></option>
|
|
1715
|
-
<option value="max" data-i18n="knxUltimateAI.selectlists.reasoningEffort.max"></option>
|
|
1716
|
-
</select>
|
|
1717
|
-
<div class="knx-ai-prompt-context-hint" data-i18n="knxUltimateAI.messages.reasoningEffortHint"></div>
|
|
1718
|
-
</div>
|
|
1719
|
-
<input type="hidden" id="node-input-llmContextLength">
|
|
1720
|
-
<div id="knx-ai-local-context-status" style="display:none;"></div>
|
|
1721
|
-
<div class="form-row" id="knx-ai-local-context-row" style="display:none;">
|
|
1722
|
-
<label style="width:290px" for="node-input-llmLocalContextTokens"><i class="fa fa-database"></i> <span data-i18n="knxUltimateAI.properties.llmLocalContextTokens"></span></label>
|
|
1723
|
-
<select style="width:100%" id="node-input-llmLocalContextTokens">
|
|
1724
|
-
<option value="0" data-i18n="knxUltimateAI.selectlists.localContext.maximum"></option>
|
|
1725
|
-
<option value="4096" data-context-tokens="4096" data-i18n="knxUltimateAI.selectlists.localContext.k4"></option>
|
|
1726
|
-
<option value="8192" data-context-tokens="8192" data-i18n="knxUltimateAI.selectlists.localContext.k8"></option>
|
|
1727
|
-
<option value="16384" data-context-tokens="16384" data-i18n="knxUltimateAI.selectlists.localContext.k16"></option>
|
|
1728
|
-
<option value="32768" data-context-tokens="32768" data-i18n="knxUltimateAI.selectlists.localContext.k32"></option>
|
|
1729
|
-
<option value="65536" data-context-tokens="65536" data-i18n="knxUltimateAI.selectlists.localContext.k64"></option>
|
|
1730
|
-
<option value="131072" data-context-tokens="131072" data-i18n="knxUltimateAI.selectlists.localContext.k128"></option>
|
|
1731
|
-
<option value="262144" data-context-tokens="262144" data-i18n="knxUltimateAI.selectlists.localContext.k256"></option>
|
|
1732
|
-
</select>
|
|
1733
|
-
<div class="knx-ai-prompt-context-hint" data-i18n="knxUltimateAI.messages.localContextHint"></div>
|
|
1734
|
-
</div>
|
|
1735
|
-
<div class="form-row">
|
|
1736
|
-
<input type="checkbox" id="node-input-llmAllowKnxCommands" style="display:inline-block; width:auto; vertical-align:top;">
|
|
1737
|
-
<label style="width:auto" for="node-input-llmAllowKnxCommands"> <span data-i18n="knxUltimateAI.properties.llmAllowKnxCommands"></span></label>
|
|
1738
|
-
</div>
|
|
1739
|
-
<div class="form-row" id="knx-ai-command-confirmation-row">
|
|
1740
|
-
<input type="checkbox" id="node-input-llmRequireCommandConfirmation" style="display:inline-block; width:auto; vertical-align:top;">
|
|
1741
|
-
<label style="width:auto" for="node-input-llmRequireCommandConfirmation"> <span data-i18n="knxUltimateAI.properties.llmRequireCommandConfirmation"></span></label>
|
|
1742
|
-
</div>
|
|
1743
|
-
</div>
|
|
1744
|
-
</div>
|
|
1745
|
-
|
|
1746
|
-
<div id="knx-ai-tab-chat-adapter">
|
|
1747
|
-
<div class="form-row">
|
|
1748
|
-
<label style="width:290px" for="node-input-chatAdapterPreset"><i class="fa fa-plug"></i> <span data-i18n="knxUltimateAI.properties.chatAdapterPreset"></span></label>
|
|
1749
|
-
<select style="width:100%" id="node-input-chatAdapterPreset">
|
|
1750
|
-
<option value="none" data-i18n="knxUltimateAI.selectlists.chatAdapter.none"></option>
|
|
1751
|
-
</select>
|
|
1752
|
-
</div>
|
|
1753
|
-
<div id="knx-ai-chat-adapter-fields" style="display:none;">
|
|
1754
|
-
<div class="form-row">
|
|
1755
|
-
<label style="width:100%" for="node-input-chatInputCode"><i class="fa fa-sign-in"></i> <span data-i18n="knxUltimateAI.properties.chatInputCode"></span></label>
|
|
1756
|
-
<input type="hidden" id="node-input-chatInputCode">
|
|
1757
|
-
<div id="node-input-chatInputCode-editor" class="node-text-editor knx-ai-chat-adapter-editor"></div>
|
|
1758
|
-
</div>
|
|
1759
|
-
<div class="form-row">
|
|
1760
|
-
<label style="width:100%" for="node-input-chatOutputCode"><i class="fa fa-sign-out"></i> <span data-i18n="knxUltimateAI.properties.chatOutputCode"></span></label>
|
|
1761
|
-
<input type="hidden" id="node-input-chatOutputCode">
|
|
1762
|
-
<div id="node-input-chatOutputCode-editor" class="node-text-editor knx-ai-chat-adapter-editor"></div>
|
|
1763
|
-
</div>
|
|
1764
|
-
</div>
|
|
1765
|
-
</div>
|
|
1766
|
-
|
|
1767
|
-
<div id="knx-ai-tab-home-intelligence">
|
|
1768
|
-
<div class="form-row">
|
|
1769
|
-
<strong><i class="fa fa-globe"></i> <span data-i18n="knxUltimateAI.sections.webIntelligence"></span></strong>
|
|
1770
|
-
</div>
|
|
1771
|
-
<div class="form-row">
|
|
1772
|
-
<input type="checkbox" id="node-input-webAccessEnabled" style="display:inline-block; width:auto; vertical-align:top;">
|
|
1773
|
-
<label style="width:auto" for="node-input-webAccessEnabled"> <span data-i18n="knxUltimateAI.properties.webAccessEnabled"></span></label>
|
|
1774
|
-
<!-- <div class="knx-ai-prompt-context-hint" data-i18n="knxUltimateAI.messages.webAccessHint"></div> -->
|
|
1775
|
-
</div>
|
|
1776
|
-
<div id="knx-ai-web-access-settings">
|
|
1777
|
-
<div class="form-row">
|
|
1778
|
-
<label style="width:290px" for="node-input-webMaxCallsPerHour"><i class="fa fa-tachometer"></i> <span data-i18n="knxUltimateAI.properties.webMaxCallsPerHour"></span></label>
|
|
1779
|
-
<input type="number" id="node-input-webMaxCallsPerHour" min="1" max="60" step="1" style="width:100%;">
|
|
1780
|
-
<!-- <div class="knx-ai-prompt-context-hint" data-i18n="knxUltimateAI.messages.webBudgetHint"></div> -->
|
|
1781
|
-
</div>
|
|
1782
|
-
</div>
|
|
1783
|
-
<hr>
|
|
1784
|
-
<div class="form-row">
|
|
1785
|
-
<label style="width:100%" for="node-input-aiEducation"><i class="fa fa-graduation-cap"></i> <span data-i18n="knxUltimateAI.properties.aiEducation"></span></label>
|
|
1786
|
-
<textarea id="node-input-aiEducation" maxlength="16000" style="width:100%; min-height:180px; box-sizing:border-box;" data-i18n="[placeholder]knxUltimateAI.placeholder.aiEducation"></textarea>
|
|
1787
|
-
</div>
|
|
1788
|
-
</div>
|
|
1789
|
-
|
|
1790
|
-
<div id="knx-ai-tab-ets-access">
|
|
1791
|
-
<div class="form-row">
|
|
1792
|
-
<div class="knx-ai-prompt-context-hint" data-i18n="knxUltimateAI.messages.etsAccessHint"></div>
|
|
1793
|
-
<div style="margin:8px 0 4px; display:flex; gap:6px; align-items:center;">
|
|
1794
|
-
<input type="text" id="knx-ai-ets-ga-filter" data-i18n="[placeholder]knxUltimateAI.messages.etsFilterPlaceholder" style="flex:1 1 auto;">
|
|
1795
|
-
<button type="button" id="knx-ai-ets-ga-all" class="ui-button ui-corner-all ui-widget" style="width:auto;" data-i18n="knxUltimateAI.buttons.etsSelectAll"></button>
|
|
1796
|
-
<button type="button" id="knx-ai-ets-ga-none" class="ui-button ui-corner-all ui-widget" style="width:auto;" data-i18n="knxUltimateAI.buttons.etsSelectNone"></button>
|
|
1797
|
-
<span style="border-left:1px solid #ccc; align-self:stretch;"></span>
|
|
1798
|
-
<button type="button" id="knx-ai-ets-ga-ro-all" class="ui-button ui-corner-all ui-widget" style="width:auto;" data-i18n="[title]knxUltimateAI.messages.etsReadOnlyBulk;knxUltimateAI.buttons.etsReadOnlyAll"></button>
|
|
1799
|
-
<button type="button" id="knx-ai-ets-ga-ro-none" class="ui-button ui-corner-all ui-widget" style="width:auto;" data-i18n="[title]knxUltimateAI.messages.etsReadOnlyBulk;knxUltimateAI.buttons.etsReadOnlyNone"></button>
|
|
1800
|
-
</div>
|
|
1801
|
-
<div id="knx-ai-ets-ga-count" style="font-size:11px; color:#666; margin:2px 0;"></div>
|
|
1802
|
-
<div id="knx-ai-ets-ga-list" style="max-height:220px; overflow:auto; border:1px solid #ccc; padding:6px; border-radius:4px; background:#fff;"></div>
|
|
1803
|
-
</div>
|
|
1804
|
-
</div>
|
|
1805
|
-
|
|
1806
|
-
<div id="knx-ai-tab-advanced">
|
|
1807
|
-
<div id="knx-ai-llm-advanced-settings">
|
|
1808
|
-
<div class="form-row">
|
|
1809
|
-
<label style="width:290px" for="node-input-llmBaseUrl"><i class="fa fa-link"></i> <span data-i18n="knxUltimateAI.properties.llmBaseUrl"></span></label>
|
|
1810
|
-
<input type="text" id="node-input-llmBaseUrl" data-i18n="[placeholder]knxUltimateAI.placeholder.llmBaseUrl">
|
|
1811
|
-
</div>
|
|
1812
|
-
<div class="form-row" id="knx-ai-ollama-install-row" style="display:none;">
|
|
1813
|
-
<label style="width:290px"><i class="fa fa-download"></i> Ollama</label>
|
|
1814
|
-
<div class="knx-ai-ollama-actions">
|
|
1815
|
-
<button type="button" class="red-ui-button" id="knx-ai-downloadOllamaModel">
|
|
1816
|
-
<i class="fa fa-cloud-download"></i> <span data-i18n="knxUltimateAI.buttons.downloadOllamaModel"></span>
|
|
1817
|
-
</button>
|
|
1818
|
-
<button type="button" class="red-ui-button" id="knx-ai-installOllamaModel">
|
|
1819
|
-
<i class="fa fa-download"></i> <span data-i18n="knxUltimateAI.buttons.installOllamaModel"></span>
|
|
1820
|
-
</button>
|
|
1821
|
-
</div>
|
|
1822
|
-
</div>
|
|
1823
|
-
</div>
|
|
1824
|
-
</div>
|
|
1825
|
-
</div>
|
|
1826
|
-
</script>
|