refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings * fix(signal): annotate async context manager as a generator
This commit is contained in:
1 parent
cb3ba45317
commit
a4d2430140
922 files changed
+406
-7738
No files matched your search
@@ -49,7 +49,6 @@ const VISIBLE_STREAM_FLUSH_INTERVAL_MS = 50;
|
||||
const EMPTY_INITIAL_MESSAGES: UIMessage[] = [];
|
||||
const EMPTY_COMPLETED_TURN_IDS: readonly string[] = [];
|
||||
|
||||
/** Own the received transcript, accepting fetched pages and live events together. */
|
||||
/** Payload passed to ``send`` when the user attaches one or more files.
|
||||
*
|
||||
* ``media`` is handed to the wire client verbatim; ``preview`` powers the
|
||||
@@ -153,7 +152,6 @@ export function useNanobotStream(
|
||||
isStreaming: boolean;
|
||||
/** Unix epoch seconds when the current user turn started (WebSocket ``goal_status``). */
|
||||
runStartedAt: number | null;
|
||||
/** Transient model retry state for the active turn. */
|
||||
retryStatus: RetryStatus | null;
|
||||
/** Latest sustained goal for this ``chatId`` (``goal_state`` WS events). */
|
||||
goalState: GoalStateWsPayload | undefined;
|
||||
@@ -174,8 +172,6 @@ export function useNanobotStream(
|
||||
/** Latest transport-level fault raised since the last ``dismissStreamError``.
|
||||
* ``null`` when there is nothing to show. */
|
||||
streamError: StreamError | null;
|
||||
/** Clear the current ``streamError`` (e.g. after the user dismisses the
|
||||
* notification or starts a fresh action). */
|
||||
dismissStreamError: () => void;
|
||||
} {
|
||||
const { client, getToken } = useClient();
|
||||
@@ -210,7 +206,6 @@ export function useNanobotStream(
|
||||
setHistoryState(transcriptRef.current.paging);
|
||||
}, []);
|
||||
const [messageScope, setMessageScope] = useState({ chatId, historyKey, client });
|
||||
/** If history ends in unfinished agent activity, keep the loading spinner alive. */
|
||||
const initialStreaming = useMemo(() => {
|
||||
if (completedTurnIds.length === 0) return hasPendingAgentActivity(initialMessages);
|
||||
const completedInitialTurns = new Set(completedTurnIds);
|
||||
@@ -502,7 +497,6 @@ export function useNanobotStream(
|
||||
setGoalState(chatId ? client.getGoalState(chatId) : undefined);
|
||||
setRecoveryState(null);
|
||||
clearPendingStreamWork();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [chatId, client, historyKey, clearActivitySegment, clearPendingStreamWork, setMessages]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user