the lists re-read when the agent changes something
an agent deleted two proxy hosts and both stayed on screen. the person had the answer in the transcript and a stale list six inches above it — which is the one thing a chat beside a list has to get right, and the reason it is beside the list at all. so the chat panel bumps the refresh channel when a turn ran tools, and every section re-reads. gated on hadToolCalls: a turn that only talked changed nothing, and re-reading after every sentence would put six requests behind every reply. the channel is renamed with it. it was proxy-manager:connection-changed, named after its only publisher; it has two now and the second is the bigger one, so it says what it MEANS — something at NPM changed, read it again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
@@ -4,7 +4,7 @@ import { useClient } from 'hooks/useClient';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { readableError } from './errors';
|
||||
import { useConnectionChanged } from './channel';
|
||||
import { useNpmChanged } from './channel';
|
||||
import { useSearchParams } from 'react-router';
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,7 @@ export const ConnectionPanel = () => {
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [busy, setBusy] = useState<'test' | 'save' | 'delete' | null>(null);
|
||||
const [confirming, setConfirming] = useState(false);
|
||||
const [, connectionChanged] = useConnectionChanged();
|
||||
const [, npmChanged] = useNpmChanged();
|
||||
const [, setParams] = useSearchParams();
|
||||
|
||||
/**
|
||||
@@ -135,8 +135,8 @@ export const ConnectionPanel = () => {
|
||||
},
|
||||
{ replace: true },
|
||||
);
|
||||
connectionChanged();
|
||||
}, [setParams, connectionChanged]);
|
||||
npmChanged();
|
||||
}, [setParams, npmChanged]);
|
||||
|
||||
const load = useCallback(async () => {
|
||||
try {
|
||||
@@ -208,7 +208,7 @@ export const ConnectionPanel = () => {
|
||||
setSecret('');
|
||||
await load();
|
||||
// Disconnecting is a change too — the panels must stop showing hosts that are no longer reachable.
|
||||
connectionChanged();
|
||||
npmChanged();
|
||||
} catch (err) {
|
||||
setError(errorText(err));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user