@prism-d1/cli 1.0.40 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -85,6 +85,7 @@ if [[ -n "${AI_TOOL}" ]] && (command -v codeburn &>/dev/null || command -v prism
|
|
|
85
85
|
|
|
86
86
|
# Kiro: CLI (KIRO_SESSION_ID) uses kiro-cli, IDE uses kiro-ide
|
|
87
87
|
# Everything else: use codeburn
|
|
88
|
+
CODEBURN_JSON=""
|
|
88
89
|
if [[ "${AI_TOOL}" == "kiro" ]] && command -v prism-cli &>/dev/null; then
|
|
89
90
|
if [[ -n "${KIRO_SESSION_ID:-}" ]]; then
|
|
90
91
|
CODEBURN_JSON=$(prism-cli parse-code-tool kiro-cli --session-id "${KIRO_SESSION_ID}" --project "${PROJECT_BASENAME}" --format json 2>/dev/null || echo "")
|
|
@@ -116,6 +117,8 @@ if [[ -n "${AI_TOOL}" ]] && (command -v codeburn &>/dev/null || command -v prism
|
|
|
116
117
|
AI_COST=$(echo "${CURRENT_COST} - ${PREV_COST}" | bc 2>/dev/null || echo "0")
|
|
117
118
|
[[ "${AI_INPUT_TOKENS}" -lt 0 ]] && AI_INPUT_TOKENS=0
|
|
118
119
|
[[ "${AI_OUTPUT_TOKENS}" -lt 0 ]] && AI_OUTPUT_TOKENS=0
|
|
120
|
+
AI_COST_NEGATIVE=$(echo "${AI_COST} < 0" | bc 2>/dev/null || echo "0")
|
|
121
|
+
[[ "${AI_COST_NEGATIVE}" == "1" ]] && AI_COST="0"
|
|
119
122
|
else
|
|
120
123
|
AI_INPUT_TOKENS=0; AI_OUTPUT_TOKENS=0; AI_COST="0"
|
|
121
124
|
fi
|