chore: restore null! placeholders for forward-reference pattern (#1284)
Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
@@ -3686,7 +3686,7 @@ export default function App({
|
||||
// removed. Git-backed memory uses standard git merge conflict resolution via the agent.
|
||||
|
||||
// Core streaming function - iterative loop that processes conversation turns
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: refs read .current dynamically, complex callback with intentional deps
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: blanket suppression — this callback has ~16 omitted deps (refs, stable functions, etc.). Refs are safe (read .current dynamically), but the blanket ignore also hides any genuinely missing reactive deps. If stale-closure bugs appear in processConversation, audit the dep array here first.
|
||||
const processConversation = useCallback(
|
||||
async (
|
||||
initialInput: Array<MessageCreate | ApprovalCreate>,
|
||||
@@ -6733,7 +6733,7 @@ export default function App({
|
||||
queueApprovalResults,
|
||||
]);
|
||||
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: refs read .current dynamically, complex callback with intentional deps
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: blanket suppression — same caveat as processConversation above. Omitted deps are mostly refs and stable callbacks, but this hides any genuinely missing reactive deps too.
|
||||
const onSubmit = useCallback(
|
||||
async (message?: string): Promise<{ submitted: boolean }> => {
|
||||
const msg = message?.trim() ?? "";
|
||||
|
||||
@@ -73,18 +73,13 @@ export function createCommandRunner({
|
||||
onCommandFinished,
|
||||
}: RunnerDeps) {
|
||||
function getHandle(id: string, input: string): CommandHandle {
|
||||
// biome-ignore lint/style/noNonNullAssertion: forward-reference pattern — overwritten synchronously below. null! preferred over no-ops to crash loudly if invariant breaks.
|
||||
const handle: CommandHandle = {
|
||||
id,
|
||||
input,
|
||||
// Placeholders are overwritten below before the handle is returned.
|
||||
update: (_update: CommandUpdate) => {},
|
||||
finish: (
|
||||
_output: string,
|
||||
_success?: boolean,
|
||||
_dimOutput?: boolean,
|
||||
_preformatted?: boolean,
|
||||
) => {},
|
||||
fail: (_output: string) => {},
|
||||
update: null!,
|
||||
finish: null!,
|
||||
fail: null!,
|
||||
};
|
||||
|
||||
const update = (updateData: CommandUpdate) => {
|
||||
|
||||
Reference in New Issue
Block a user