CommandTranscriptclass | report.t[606] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
class
CommandTranscript : OutputFilter
CommandTranscript
OutputFilter
object
isActive
isFailure
iter_
reports_
transforms_
actionFailed
activate
addCommandSep
addMarker
addReport
announceAmbigActionObject
announceDefaultObject
announceImplicit
announceMultiActionObject
announceRemappedAction
applyTransforms
canShowReport
clearReports
construct
currentActionHasReport
deactivate
deleteLastReport
deleteRange
endDescription
filterText
findCurrentActionReport
flushForInput
forEachReport
getLastReport
moveRangeAppend
newIter
noteFailure
showReports
summarizeAction
isActive | report.t[648] |
isFailure | report.t[617] |
iter_ | report.t[1235] |
reports_ | report.t[1238] |
transforms_ | report.t[1241] |
actionFailed (action) | report.t[634] |
activate ( ) | report.t[842] |
addCommandSep ( ) | report.t[1148] |
addMarker ( ) | report.t[1005] |
addReport (report) | report.t[934] |
announceAmbigActionObject (obj, whichObj) | report.t[1129] |
announceDefaultObject (obj, whichObj, action, allResolved) | report.t[1138] |
announceImplicit (action, msgProp) | report.t[1080] |
announceMultiActionObject (preCalcMsg, obj, whichObj) | report.t[1119] |
announceRemappedAction ( ) | report.t[1109] |
applyTransforms ( ) | report.t[1203] |
canShowReport (report) | report.t[1169] |
clearReports ( ) | report.t[1157] |
construct ( ) | report.t[607] |
currentActionHasReport (func) | report.t[1214] |
deactivate ( ) | report.t[849] |
deleteLastReport ( ) | report.t[991] |
deleteRange (marker1, marker2) | report.t[1018] |
endDescription ( ) | report.t[1071] |
filterText (ostr, txt) OVERRIDDEN | report.t[1177] |
findCurrentActionReport (func) | report.t[1221] |
flushForInput ( ) | report.t[871] |
We return the former activation status - that is, we return true if the transcript was activated before the call, nil if not.
forEachReport (func) | report.t[1060] |
getLastReport ( ) | report.t[984] |
moveRangeAppend (marker1, marker2) | report.t[1035] |
newIter ( ) | report.t[859] |
noteFailure ( ) | report.t[623] |
showReports (deact) | report.t[887] |
summarizeAction (cond, report) | report.t[693] |
gold coin: Bob accepts the gold coin.
gold coin: Bob accepts the gold coin.
gold coin: Bob accepts the gold coin.
into this:
Bob accepts the three gold coins.
This function runs through the reports for the current action, submitting each one to the 'cond' callback to see if it's of interest to the summary. For each consecutive run of two or more reports that can be summarized, we'll remove the reports that 'cond' accepted, and we'll remove the multiple-object announcement reports associated with them, and we'll insert a new report with the message returned by the 'report' callback.
'cond' is called as cond(x), where 'x' is a report object. This callback returns true if the report can be summarized for the caller's purposes, nil if not.
'report' is called as report(vec), where 'vec' is a Vector consisting of all of the consecutive report objects that we're now summarizing. This function returns a string giving the message to use in place of the reports we're removing. This should be a summary message, standing in for the set of individual reports we're removing.
There's an important subtlety to note. If the messages you're summarizing are conversational (that is, if they're generated by TopicEntry responses), you should take care to generate the full replacement text in the 'report' part, rather than doing so in separate code that you run after summarizeAction() returns. This is important because it ensures that the Conversation Manager knows that your replacement message is part of the same conversation. If you wait until after summarizeAction() returns to generate more response text, the conversation manager won't realize that the additional text is part of the same conversation.