utilitas 1998.2.51 → 1998.2.53

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.
package/lib/alan.mjs CHANGED
@@ -861,7 +861,6 @@ const buildPrompts = async (model, input, options = {}) => {
861
861
  content = trimTailing(trimTailing(content).slice(0, -1)) + '...';
862
862
  }
863
863
  }, model.maxInputTokens - options.attachments?.length * ATTACHMENT_TOKEN_COST);
864
- print(JSON.stringify(history));
865
864
  return { systemPrompt, history, prompt };
866
865
  };
867
866
 
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1998.2.51",
4
+ "version": "1998.2.53",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/lib/tape.mjs CHANGED
@@ -1,12 +1,13 @@
1
1
  import {
2
- ensureArray, ensureInt, ensureString, insensitiveCompare, log as _log,
2
+ log as _log,
3
+ ensureArray, ensureInt, ensureString, insensitiveCompare,
3
4
  renderCode,
4
5
  } from './utilitas.mjs';
5
6
 
7
+ import { MESSAGE_SOFT_LIMIT, sendMd } from './bot.mjs';
8
+ import { isPrimary, on, report } from './callosum.mjs';
6
9
  import { default as color } from './color.mjs';
7
10
  import { end as _end, loop } from './event.mjs';
8
- import { isPrimary, on, report } from './callosum.mjs';
9
- import { MESSAGE_SOFT_LIMIT, sendMd } from './bot.mjs';
10
11
 
11
12
  const consoleMap = ['log', 'info', 'debug', 'warn', 'error'];
12
13
  const trace = { trace: true };
@@ -18,7 +19,7 @@ const getSndSize = arr => getSendTxt(arr).length;
18
19
  const getBufSize = () => MESSAGE_SOFT_LIMIT * bufferCycle;
19
20
  const nextEvent = () => botBuffer?.[0];
20
21
  const stringify = any => ensureString(any, trace);
21
- const packLine = text => `\`\`\`Log\n${text || ''}\n\`\`\``;
22
+ const packLine = text => `\`\`\`Log\n${(text || '').replaceAll('```', '\\`\\`\\`')}\n\`\`\``;
22
23
  const AVAILABLE_LENGTH = MESSAGE_SOFT_LIMIT - (packLine('') + '000 | ').length;
23
24
 
24
25
  let botBuffer, bufferCycle, chatIds, extLog, tarLevel;
@@ -130,5 +131,5 @@ export {
130
131
  addChatId,
131
132
  end,
132
133
  init,
133
- removeChatId,
134
+ removeChatId
134
135
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1998.2.51",
4
+ "version": "1998.2.53",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",