merge: sync current dev into v2 readiness
This commit is contained in:
commit
0501c6f213
60 files changed
+25361
-23414
No files matched your search
@@ -20,7 +20,7 @@ import Alert from "@theme/Admonition";
|
||||
<IntegrationCapabilites items={[{ widget: healthMonitoringWidget }, { widget: systemResourcesWidget }]} />
|
||||
|
||||
Disk space uses each pool's root dataset to account for RAIDZ parity and dataset limits. If dataset space is unavailable,
|
||||
Homarr falls back to physical pool space and keeps reporting pool health.
|
||||
Homarr falls back to physical pool space, which reads higher on RAIDZ, and keeps reporting pool health.
|
||||
|
||||
### Adding the integration
|
||||
|
||||
|
||||
@@ -64,3 +64,8 @@ Below you can find instructions for some of the integrations.
|
||||
Since version 6 of Pi-hole, the web interface can be accessed through HTTPS.
|
||||
The certificate can be found in the path `/etc/pihole/tls_ca.crt`. To add the certificate, this file needs to be copied and uploaded to Homarr.
|
||||
You can find more details regarding SSL / TLS for Pi-hole [here](https://docs.pi-hole.net/api/tls/).
|
||||
|
||||
### Proxmox
|
||||
|
||||
For the default Proxmox VE cluster certificates, trust the cluster CA from `/etc/pve/pve-root-ca.pem` on any node.
|
||||
See [Proxmox certificate management](https://pve.proxmox.com/wiki/Certificate_Management).
|
||||
@@ -12,7 +12,7 @@ import { appWidget } from ".";
|
||||
<WidgetHeader widget={appWidget} categories={["Links", "Apps"]} />
|
||||
|
||||
The App widget opens an application or website and can show whether Homarr can reach it. Configure the target and status
|
||||
check from the tile's edit actions.
|
||||
check from the tile's edit actions. In view mode, right-click uses the browser's link menu; Homarr's widget menu remains available in edit mode.
|
||||
|
||||
### Adding the widget
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import temperature from "./img/temperature.png";
|
||||
### Interactions
|
||||
|
||||
- Toggle entity state by clicking on the entity (only when clickable enabled).
|
||||
- After a successful toggle, the displayed state refreshes immediately.
|
||||
- If Homarr cannot refresh an entity, the last known state stays visible but toggling is disabled until the connection recovers.
|
||||
|
||||
<WidgetInteractionGuide />
|
||||
|
||||
@@ -51,4 +51,6 @@ import withDisplayname from "./img/with-displayname.png";
|
||||
|
||||
### Configuration
|
||||
|
||||
Use the Home Assistant entity ID (for example, `automation.turn_on_lights`) in the **Automation ID** field, not the automation's internal ID.
|
||||
|
||||
<WidgetConfig configuration={smartHomeExecuteAutomationWidget.configuration} />
|
||||
@@ -4,6 +4,7 @@ import { callMcpTool } from "@homarr/api/mcp";
|
||||
import type { McpTool } from "@homarr/api/mcp";
|
||||
|
||||
import { toAssistantToolOutput } from "../assistant/chat/assistant-tool-output";
|
||||
import { serializeMcpToolResult } from "./_serialize-result";
|
||||
|
||||
interface CreateMcpProtocolHandlerOptions {
|
||||
caller: unknown;
|
||||
@@ -53,7 +54,7 @@ export const createMcpProtocolHandler = ({
|
||||
content: [
|
||||
{
|
||||
type: "text" as const,
|
||||
text: JSON.stringify(toAssistantToolOutput(result)),
|
||||
text: serializeMcpToolResult(toAssistantToolOutput(result)),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { serializeMcpToolResult } from "./_serialize-result";
|
||||
|
||||
describe("serializeMcpToolResult", () => {
|
||||
it("serializes objects as JSON strings", () => {
|
||||
expect(serializeMcpToolResult({ boardId: "1" })).toBe('{"boardId":"1"}');
|
||||
});
|
||||
|
||||
it("serializes primitive values", () => {
|
||||
expect(serializeMcpToolResult("hello")).toBe('"hello"');
|
||||
expect(serializeMcpToolResult(42)).toBe("42");
|
||||
expect(serializeMcpToolResult(true)).toBe("true");
|
||||
});
|
||||
|
||||
it("serializes null as the string null", () => {
|
||||
expect(serializeMcpToolResult(null)).toBe("null");
|
||||
});
|
||||
|
||||
it("serializes void results as the string null so MCP content text is always a string", () => {
|
||||
expect(serializeMcpToolResult(undefined)).toBe("null");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
export function serializeMcpToolResult(result: unknown): string {
|
||||
return JSON.stringify(result) ?? "null";
|
||||
}
|
||||
Reference in new issue
Block a user