nsmcp::QuestionService method continue (public)

 <instance of nsmcp::QuestionService[i]> continue context handle \
    turn [ peerAddress ]

Defined in /usr/local/ns/tcl/nsmcp/question-service.tcl

Derive handles from owned server state; the browser cannot substitute another job or change its original time window. send rechecks the turn under its queue lock, so a stale button cannot resume an older turn.

Parameters:
context (required)
handle (required)
turn (required)
peerAddress (optional)

Testcases:
No testcase defined.
Source code:
ns_mutex lock ${:mutex}
try {
    set record [:owned $context $handle]
    if {$turn eq "" || [dict get $record current] ne $turn} {error "The conversation has moved on; refresh its status before continuing"}
    set jobs [:continuationJobs $record]
    if {$jobs eq {}} {error "No retained background jobs are available to continue"}
    set original [dict get [lindex [dict get $record turns] end] question]
    set sourceTurn $turn
    foreach previous [dict get $record turns] {
        set found false
        foreach job $jobs {if {[dict exists $previous jobs $job]} {set found true; break}}
        if {$found} {set original [dict get $previous question]; set sourceTurn [dict get $previous id]; break}
    }
} finally {ns_mutex unlock ${:mutex}}
set excerpt [string range $original 0 1023]
if {[string length $original]>1024} {append excerpt " (original question excerpt)"}
set question "Continue the retained analysis and finish the answer. Retrieve only these existing background jobs with log_results; keep polling them if needed. Do not start duplicate scans or reinterpret relative times: use the jobs' original fixed time windows. If a job has expired or failed, report that rather than starting a replacement.\nJob handles: [join $jobs {, }].\nOriginal request (context only): $excerpt"
return [:send $context {Continue the previous analysis.} $handle {} {} $peerAddress $turn $question $sourceTurn]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: