diff --git a/Index.md b/Index.md index 2e56228..3ef141a 100644 --- a/Index.md +++ b/Index.md @@ -157,10 +157,10 @@ The direct comparison of Stratimux to an LLM, during runtime these actions are o ### The anatomy of a Stratimux sentence ``` -preposition(/+)decision + body + denoter +preposition + body + denoter example: Finally + Open Muxium + to Notify Subscribers of State changes. ``` -This allows for a Stratimux Dialog to be constructed in the same formalization of that of a paragraph. Where the strategy topic is the literal topic sentence of a paragraph. And is followed by all steps and possible decision that create a muxified paragraph. +This allows for a Stratimux Dialog to be constructed in the same formalization of that of a paragraph. Where the strategy topic is the literal topic sentence of a paragraph. And is followed by all steps and possible decisions that formalizes a muxified paragraph when paired with the quality definition. ``` TOPIC + SENTENCE + SENTENCE + SENTENCE Example: diff --git a/README.md b/README.md index a9bebf9..b49bce4 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ When in doubt simplify. * [Muxified Turing Machine](https://github.com/Phuire-Research/Stratimux/blob/main/The-Muxified-Turing-Machine.md) - The governing concept for this entire framework.:| ## Change Log ![Tests](https://github.com/Phuire-Research/Stratimux/actions/workflows/node.js.yml/badge +### Restored Dialog Functionality 0.2.44 +* Moved the handling of the decision action node notes to the consumer function itself. ### QoL 0.2.42 * Broke up complex files into distinguishable parts * Hooked in deck functionality into method creators properly diff --git a/package.json b/package.json index a33959f..0dbfad9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stratimux", "license": "GPL-3.0", - "version": "0.2.43", + "version": "0.2.44", "description": "Muxified Turing Machine", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/model/action/strategy/actionStrategyConsumers.ts b/src/model/action/strategy/actionStrategyConsumers.ts index 3533bcd..554cc8f 100644 --- a/src/model/action/strategy/actionStrategyConsumers.ts +++ b/src/model/action/strategy/actionStrategyConsumers.ts @@ -62,8 +62,7 @@ const strategyConsumer = ( let nextAction: Action; const actionListEntry = createSentence( strategy.currentNode, - notes, - notes?.preposition ? notes.preposition : defaultPreposition + notes !== undefined ? notes : {preposition: defaultPreposition}, ); if (nextNode !== null) { const origin = strategy.currentNode.action?.origin; @@ -174,13 +173,17 @@ export function strategyFailed(_strategy: ActionStrategy, data?: Record, + notes?: ActionNotes ) => { if (_strategy.currentNode.decisionNodes) { const decisionNodes = _strategy.currentNode.decisionNodes as Record; @@ -192,7 +195,7 @@ export const strategyDecide = ( _strategy, nextNode, decideKey, - _strategy.currentNode.decisionNotes, + notes ? notes : _strategy.currentNode.decisionNotes, data ); } diff --git a/src/model/action/strategy/actionStrategyHelpers.ts b/src/model/action/strategy/actionStrategyHelpers.ts index 32a514b..2116e67 100644 --- a/src/model/action/strategy/actionStrategyHelpers.ts +++ b/src/model/action/strategy/actionStrategyHelpers.ts @@ -18,19 +18,18 @@ export function isNotPunctuated(str: string): boolean { return notPunctuated; } -export function createSentence(actionNode: ActionNode, actionNotes?: ActionNotes , decisionKey?: string): string { - const preposition = actionNotes?.preposition ? `${actionNotes.preposition} ` : ''; - const decision = decisionKey ? `${decisionKey} ` : ''; +export function createSentence(actionNode: ActionNode, actionNotes?: ActionNotes): string { + const preposition = actionNotes?.preposition !== undefined ? `${actionNotes.preposition} ` : ''; const body = `${actionNode.actionType}`; let denoter = '.'; - if (actionNotes?.denoter) { + if (actionNotes?.denoter !== undefined) { if (isNotPunctuated(actionNotes.denoter)) { denoter = ` ${actionNotes.denoter}`; } else { denoter = actionNotes.denoter; } } - return preposition + decision + body + denoter; + return preposition + body + denoter; } /*#>*/ \ No newline at end of file