MCPcopy
hub / github.com/openai/codex-plugin-cc / shorten

Function shorten

plugins/codex/scripts/lib/codex.mjs:90–99  ·  view source on GitHub ↗
(text, limit = 72)

Source from the content-addressed store, hash-verified

88}
89
90function shorten(text, limit = 72) {
91 const normalized = String(text ?? "").trim().replace(/\s+/g, " ");
92 if (!normalized) {
93 return "";
94 }
95 if (normalized.length <= limit) {
96 return normalized;
97 }
98 return `${normalized.slice(0, limit - 3)}...`;
99}
100
101function looksLikeVerificationCommand(command) {
102 return /\b(test|tests|lint|build|typecheck|type-check|check|verify|validate|pytest|jest|vitest|cargo test|npm test|pnpm test|yarn test|go test|mvn test|gradle test|tsc|eslint|ruff)\b/i.test(

Callers 4

buildTaskThreadNameFunction · 0.70
describeStartedItemFunction · 0.70
describeCompletedItemFunction · 0.70
recordItemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected