newtype-profile 1.0.57 → 1.0.58

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/dist/cli/index.js CHANGED
@@ -2253,7 +2253,7 @@ var require_picocolors = __commonJS((exports, module) => {
2253
2253
  var require_package = __commonJS((exports, module) => {
2254
2254
  module.exports = {
2255
2255
  name: "newtype-profile",
2256
- version: "1.0.57",
2256
+ version: "1.0.58",
2257
2257
  description: "AI Agent Collaboration System for Content Creation - Based on oh-my-opencode",
2258
2258
  main: "dist/index.js",
2259
2259
  types: "dist/index.d.ts",
package/dist/index.js CHANGED
@@ -24367,44 +24367,17 @@ function summarizeFullTranscript(content) {
24367
24367
  const decisions = [];
24368
24368
  const lessons = [];
24369
24369
  for (const block of blocks) {
24370
+ if (block.role !== "user")
24371
+ continue;
24370
24372
  const text = block.content;
24371
- const preferencePatterns = [
24372
- /\u504F\u597D[\uFF1A:](.+)/g,
24373
- /\u559C\u6B22[\uFF1A:](.+)/g,
24374
- /prefer(?:s|red)?[\uFF1A:](.+)/gi,
24375
- /preference(?:s)?[\uFF1A:](.+)/gi
24376
- ];
24377
- for (const pattern of preferencePatterns) {
24378
- for (const match of text.matchAll(pattern)) {
24379
- if (match[1])
24380
- userPreferences.push(match[1].trim());
24381
- }
24382
- }
24383
- const decisionPatterns = [
24384
- /\u51B3\u5B9A[\uFF1A:](.+)/g,
24385
- /\u51B3\u7B56[\uFF1A:](.+)/g,
24386
- /decided?[\uFF1A:](.+)/gi,
24387
- /chosen?[\uFF1A:](.+)/gi,
24388
- /going with\s+(.+)/gi,
24389
- /will use\s+(.+)/gi
24390
- ];
24391
- for (const pattern of decisionPatterns) {
24392
- for (const match of text.matchAll(pattern)) {
24393
- if (match[1])
24394
- decisions.push(match[1].trim());
24395
- }
24396
- }
24397
- const lessonPatterns = [
24398
- /\u7ED3\u8BBA[\uFF1A:](.+)/g,
24399
- /\u7ECF\u9A8C[\uFF1A:](.+)/g,
24400
- /\u6559\u8BAD[\uFF1A:](.+)/g,
24401
- /lesson(?:s)?[\uFF1A:](.+)/gi,
24402
- /insight(?:s)?[\uFF1A:](.+)/gi
24403
- ];
24404
- for (const pattern of lessonPatterns) {
24405
- for (const match of text.matchAll(pattern)) {
24406
- if (match[1])
24407
- lessons.push(match[1].trim());
24373
+ const lines = text.split(`
24374
+ `).filter((l) => l.trim().length > 0);
24375
+ for (const line of lines) {
24376
+ const trimmed = line.trim();
24377
+ if (trimmed.length < 10 || trimmed.length > 200)
24378
+ continue;
24379
+ if (/^(\u6211(\u51B3\u5B9A|\u9009\u62E9|\u8981\u7528|\u6253\u7B97)|let'?s go with|decided|going with|will use)/i.test(trimmed)) {
24380
+ decisions.push(trimmed);
24408
24381
  }
24409
24382
  }
24410
24383
  }
@@ -24525,10 +24498,6 @@ function extractTextFromParts(parts) {
24525
24498
  return parts.filter((p) => p.type === "text" && p.text).map((p) => p.text).join(`
24526
24499
  `);
24527
24500
  }
24528
- function isSystemInstruction(text) {
24529
- const trimmed = text.trim();
24530
- return SYSTEM_INSTRUCTION_PATTERNS.some((pattern) => pattern.test(trimmed));
24531
- }
24532
24501
  function stripSystemInstructionPrefix(text) {
24533
24502
  let result = text.trim();
24534
24503
  for (const pattern of SYSTEM_INSTRUCTION_BLOCKS) {
@@ -24562,11 +24531,13 @@ function stripSystemInstructionPrefix(text) {
24562
24531
  function prepareMessagesForSummary(messages) {
24563
24532
  const result = [];
24564
24533
  for (const msg of messages) {
24565
- const text = extractTextFromParts(msg.parts);
24534
+ let text = extractTextFromParts(msg.parts);
24566
24535
  if (!text.trim())
24567
24536
  continue;
24568
- if (msg.info.role === "user" && isSystemInstruction(text)) {
24569
- continue;
24537
+ if (msg.info.role === "user") {
24538
+ text = stripSystemInstructionPrefix(text);
24539
+ if (!text.trim())
24540
+ continue;
24570
24541
  }
24571
24542
  result.push({
24572
24543
  role: msg.info.role,
@@ -24590,10 +24561,12 @@ function generateSummaryPrompt(transcript) {
24590
24561
  - \u53EA\u8F93\u51FA Markdown\uFF0C\u4E0D\u8981\u6709\u5176\u4ED6\u5185\u5BB9
24591
24562
  - \u5173\u6CE8\uFF1A\u7528\u6237\u7684\u5B9E\u9645\u95EE\u9898\u3001\u8FBE\u6210\u7684\u7ED3\u8BBA\u3001\u505A\u51FA\u7684\u51B3\u5B9A
24592
24563
  - \u5FFD\u7565\uFF1A\u7CFB\u7EDF\u6307\u4EE4\u3001\u5DE5\u5177\u8C03\u7528\u7EC6\u8282\u3001\u4E2D\u95F4\u8FC7\u7A0B
24564
+ - \u5FFD\u7565\u4EE5\u4E0B\u7CFB\u7EDF\u6307\u4EE4\u6B8B\u7559\uFF08\u5982\u4ECD\u51FA\u73B0\u5728\u5BF9\u8BDD\u4E2D\uFF09\uFF1A[search-mode]\u3001[analyze-mode]\u3001[write-mode]\u3001[edit-mode]\u3001MAXIMIZE SEARCH EFFORT\u3001ANALYSIS MODE\u3001chief_task(...)\u3001delegate to deputy \u7B49
24565
+ - Topic \u5FC5\u987B\u662F\u5BF9\u8BDD\u7684\u5B9E\u8D28\u5185\u5BB9\uFF0C\u7EDD\u4E0D\u80FD\u662F\u7CFB\u7EDF\u6307\u4EE4\u6216\u6A21\u5F0F\u540D\u79F0
24593
24566
  - \u5982\u679C\u5BF9\u8BDD\u6CA1\u6709\u6709\u4EF7\u503C\u7684\u5185\u5BB9\uFF0C\u53EA\u8FD4\u56DE "NO_VALUABLE_CONTENT"
24594
24567
 
24595
24568
  \u8F93\u51FA\u683C\u5F0F\uFF08\u4E25\u683C\u9075\u5FAA\uFF09\uFF1A
24596
- **Topic:** [\u4E00\u53E5\u8BDD\u63CF\u8FF0\u5BF9\u8BDD\u4E3B\u9898\uFF0C\u8981\u5177\u4F53\uFF0C\u4E0D\u8981\u592A\u62BD\u8C61]
24569
+ **Topic:** [\u4E00\u53E5\u8BDD\u63CF\u8FF0\u5BF9\u8BDD\u4E3B\u9898\uFF0C\u8981\u5177\u4F53\uFF0C\u4E0D\u8981\u592A\u62BD\u8C61\uFF0C\u4E0D\u80FD\u5305\u542B\u7CFB\u7EDF\u6307\u4EE4]
24597
24570
 
24598
24571
  **Key Points:**
24599
24572
  - [\u5173\u952E\u8981\u70B91\uFF0C\u5B8C\u6574\u8868\u8FBE\uFF0C\u4E0D\u8981\u622A\u65AD]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newtype-profile",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "AI Agent Collaboration System for Content Creation - Based on oh-my-opencode",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",