You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CHAT_CONTINUITY_IMPLEMENTATION_PLAN.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1674,6 +1674,17 @@ This is the next Pine-facing implementation slice after the current Logs / Profi
1674
1674
1675
1675
#### Slice D-next-2 — Pine Version History top visible revision metadata summaries
1676
1676
1677
+
**Status:** First slice completed in working tree
1678
+
1679
+
**Delivered so far**
1680
+
- extended `src/main/tradingview/pine-workflows.js` with a `provenance-summary` evidence mode for `pine-version-history`
1681
+
- Version History metadata requests such as `summarize the top visible revision metadata` now preserve or auto-append bounded `get_text` provenance-summary readback
assert(pineWorkflowContent.includes('pineEvidenceMode'),'Pine get_text steps should preserve evidence mode metadata');
250
250
assert(pineWorkflowContent.includes('compile-result text for a bounded diagnostics summary'),'Pine workflows should use compile-result-specific readback wording');
251
251
assert(pineWorkflowContent.includes('diagnostics and warnings text'),'Pine workflows should use diagnostics-specific readback wording');
252
+
assert(pineWorkflowContent.includes('provenance-summary'),'Pine workflows should support version-history provenance-summary evidence mode');
253
+
assert(pineWorkflowContent.includes('top visible Pine Version History revision metadata'),'Pine workflows should use provenance-summary-specific readback wording');
252
254
});
253
255
254
256
test('system prompt includes Pine diagnostics guidance',()=>{
@@ -258,6 +260,8 @@ test('system prompt includes Pine diagnostics guidance', () => {
assert(systemPromptContent.includes('TradingView Pine diagnostics rule'),'System prompt should include Pine diagnostics guidance');
263
+
assert(systemPromptContent.includes('visible revision/provenance details'),'System prompt should steer Pine provenance requests toward verified Version History text');
264
+
assert(systemPromptContent.includes('treat visible Pine Version History entries as bounded audit/provenance evidence only'),'Pine provenance guidance should prevent overclaiming from visible revision history');
261
265
assert(systemPromptContent.includes('compile success'),'System prompt should mention compile success bounds');
262
266
assert(systemPromptContent.includes('realtime rollback'),'System prompt should mention Pine execution-model caveats');
Copy file name to clipboardExpand all lines: scripts/test-pine-diagnostics-bounds.js
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,15 @@ async function main() {
63
63
assert(evidenceMessage.content.includes('Rule: Surface visible compiler errors and warnings as bounded diagnostics evidence; do not infer hidden causes or chart-state effects unless the visible text states them.'));
64
64
assert(evidenceMessage.content.includes('mention Pine execution-model caveats such as realtime rollback, confirmed vs unconfirmed bars, and indicator vs strategy recalculation differences'));
assert(evidenceMessage.content.includes('Treat Pine Version History as bounded provenance evidence only'));
73
+
assert(evidenceMessage.content.includes('Do not infer hidden diffs, full script history, authorship, or runtime/chart behavior from the visible revision list alone.'));
assert(/topvisiblePineVersionHistoryrevisionmetadata/i.test(rewritten[4].reason),'version-history metadata readback should use provenance-summary wording');
{type: 'get_text',text: 'Pine Version History',reason: 'Read top visible Pine Version History revision metadata',pineEvidenceMode: 'provenance-summary'}
332
+
],{
333
+
userMessage: 'open pine version history in tradingview and summarize the top visible revision metadata'
334
+
});
335
+
336
+
assert(Array.isArray(rewritten),'workflow should rewrite');
returnforegroundSequence.shift()||{success: true,hwnd: 891,title: 'Pine Version History - TradingView',processName: 'tradingview',windowKind: 'owned'};
{type: 'key',key: 'alt+h',reason: 'Open Pine Version History',verify: {kind: 'panel-visible',appName: 'TradingView',target: 'pine-version-history',keywords: ['pine version history','version history','pine']}},
556
+
{type: 'get_text',text: 'Pine Version History',reason: 'Read top visible Pine Version History revision metadata',pineEvidenceMode: 'provenance-summary'}
557
+
]
558
+
},null,null,{
559
+
userMessage: 'open pine version history in tradingview and summarize the top visible revision metadata',
assert.strictEqual(execResult.success,true,'Execution should proceed after Pine Version History metadata view is observed');
577
+
assert.deepStrictEqual(executed,['focus_window','key','get_text'],'Version History metadata summary should continue to read text after panel verification');
578
+
assert.deepStrictEqual(evidenceModes,['provenance-summary'],'Version History metadata workflow should preserve provenance-summary evidence mode');
579
+
assert.strictEqual(execResult.observationCheckpoints[0].verified,true,'Pine Version History panel observation should pass');
580
+
assert.strictEqual(execResult.results[2].text,'Revision 18 saved 2m ago; Revision 17 saved 18m ago; showing 2 visible revisions','Version History metadata text should be preserved on the get_text result');
581
+
assert(!execResult.screenshotCaptured,'Pine Version History metadata gathering should not require a screenshot loop');
582
+
});
583
+
});
584
+
517
585
awaittestAsync('verified pine editor diagnostics workflow gathers compile text without screenshot loop',async()=>{
@@ -78,6 +83,11 @@ function buildPineEvidenceConstraint({ foreground, userMessage }) {
78
83
lines.push('- Rule: Pine scripts are capped at 500 lines in TradingView. Treat visible line-count hints as bounded editor evidence, and prefer targeted edits over full rewrites when the budget is tight.');
79
84
}
80
85
86
+
if(requestKind==='provenance-summary'){
87
+
lines.push('- Rule: Treat Pine Version History as bounded provenance evidence only; summarize only the top visible revision labels, relative times, and other metadata that are directly visible.');
88
+
lines.push('- Rule: Do not infer hidden diffs, full script history, authorship, or runtime/chart behavior from the visible revision list alone.');
89
+
}
90
+
81
91
lines.push('- Rule: If the user asks for Pine runtime or strategy diagnosis, mention Pine execution-model caveats such as realtime rollback, confirmed vs unconfirmed bars, and indicator vs strategy recalculation differences before inferring behavior from compile status alone.');
Copy file name to clipboardExpand all lines: src/main/ai-service/system-prompt.js
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,7 @@ When the user asks you to DO something, respond with a JSON action block:
229
229
- **Continuity rule**: if the active page title or recent action output indicates the requested browser objective is already achieved, acknowledge completion and avoid proposing additional screenshot steps.
230
230
- **TradingView Pine evidence rule**: if the user wants concrete Pine output, errors, profiler-style evidence, visible Pine Editor status/output, or visible revision/provenance details, prefer \`open/show Pine Editor, Logs, Profiler, or Version History\` + verified panel opening + \`get_text\` before relying on screenshot analysis.
231
231
- **TradingView Pine diagnostics rule**: treat visible Pine Editor compile results, compiler errors, warnings, and diagnostics as bounded text evidence. Do not turn \`no errors\` into claims about runtime correctness, market validity, or trading edge.
232
+
- **TradingView Pine provenance rule**: treat visible Pine Version History entries as bounded audit/provenance evidence only. Summarize top visible revision labels, relative times, and other directly visible metadata, but do not infer hidden diffs, full script history, authorship, or runtime/chart behavior from the visible list alone.
232
233
- **TradingView Pine line-budget rule**: Pine scripts are limited to 500 lines. Do not propose pasting or generating Pine scripts longer than 500 lines; prefer bounded edits, read visible line/status hints first when needed, and mention the limit explicitly when it affects read/write guidance.
233
234
- **If you need to interact with web content inside an app** (like VS Code panels, browser tabs): Use keyboard shortcuts or coordinate-based clicks since web UI may not appear in UIA tree
0 commit comments