IP-Scan instrumentiert: loggt Eingabe-Subnetz vs. gescanntes Subnetz

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-05-19 19:49:49 +02:00
parent d389ee924d
commit c81871f010

View file

@ -9,6 +9,7 @@
*/
import { scanner } from '../../scanner';
import { debugLog } from '../../debuglog.svelte';
import type { Tool } from '../types';
export const ipScanTool: Tool = {
@ -58,7 +59,14 @@ export const ipScanTool: Tool = {
ctx.protocol.subnet = subnet;
}
debugLog.add(
'info',
`IP-Scan: Dialog-Eingabe="${String(ctx.params.subnet ?? '')}", ` +
`Protokoll-Subnetz="${String(ctx.protocol.subnet ?? '')}" → ` +
`gescannt wird "${subnet}" (Quelle: ${source})`,
);
const { devices } = await scanner.ipScan({ subnet });
debugLog.add('info', `IP-Scan Ergebnis: ${devices.length} Geräte in ${subnet}`);
const via = source === 'adapter' ? ' (Adapter erkannt)' : '';
return {
label: `${devices.length} Geräte im Netz ${subnet}${via}`,