Conversation
|
@jasonk000 @krumts Hey guys, if you have a chance, please review. Example output (snippet): |
1. Add a new API AIDetailsProvider class that may be optionally set in a query's getResultMetaData. 1. Bump MAT to 1.18.0 for the new API. 1. Add an AIDetailsProvider to the ThreadOverviewQuery so that 2 depths of the tree are exported including all stack frames and all stack frame locals. 1. Add a new AITextOutputter and associated export button (Export to TXT for AI...). Uses the extension .text to differentiate it from the old TextOutputter that uses .txt. AITextOutputter inherits from TextOutputter and is largely the same with the addition of a prefix to help prompt AI consumers by explaining the format of the output (e.g. nesting with pipe character prefixes) and optionally an additional prefix through AIDetailsProvider to further prompt AI consumers by explaining the output. 1. The other differences between AITextOutputter and TextOutputter are dictated by the logic in ExportActions: the totals row is suppressed as that adds a lot of fluff especially with expanded rows, and, most importantly, check if the ResultMetaData includes a non-default tree export depth. By default, we don't expand trees. Unlike the TextOutputter, the AITextOutputter ignores current expansion in the Tree and always has a uniform output. 1. I installed a fresh Eclipse 2026-06 and after loading the project and without doing anything, lots of Eclipse .project, .classpath, .prefs, etc. files were updated. I reviewed the updates and they seemed benign/reasonable, so I guess since we're still keeping Eclipse project files checked in, I'm guessing it's reasonable to commit all of these changes. I'm not sure why Eclipse changed org.eclipse.jdt.core.compiler.release from enabled to disabled. 1. Add a test that checks that the AITextOutputter works and includes the thread overview query prefix in its output. Signed-off-by: Kevin Grigorenko <kevin.grigorenko@us.ibm.com>
Signed-off-by: Kevin Grigorenko <kevin.grigorenko@us.ibm.com>
Signed-off-by: Kevin Grigorenko <kevin.grigorenko@us.ibm.com>
|
@kgibm , I haven't looked in detail yet - but I suggest we name it "Export to Markdown (.md)" or similar, and emit standard markdown. Markdown is lingua franca standard text format for AI tooling. |
|
That seems reasonable although will require some larger changes. I don't think Markdown has a concept of nested tables (for
|
jasonk000
left a comment
There was a problem hiding this comment.
Mostly, looks OK - only question is are we missing a null check at at result.getMetadata(), and should the file list include .txt?.
| @@ -0,0 +1,4 @@ | |||
| activeProfiles= | |||
There was a problem hiding this comment.
This and related files, to 1.18 bump, are required for this PR?
| </projects> | ||
| <buildSpec> | ||
| <buildCommand> | ||
| <name>org.eclipse.m2e.core.maven2Builder</name> |
There was a problem hiding this comment.
Should be different PR, not blocking.
| org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
| org.eclipse.jdt.core.compiler.release=disabled | ||
| org.eclipse.jdt.core.compiler.source=1.8 | ||
| org.eclipse.jdt.core.compiler.release=enabled |
There was a problem hiding this comment.
We could align these across all plugins -- any reason not to? Not sure if J9 impact.
| eclipse.preferences.version=1 | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
| org.eclipse.jdt.core.compiler.compliance=1.8 | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 |
There was a problem hiding this comment.
Similar here, we could make them all 21 for consistency unless there is a blocker.
| @Override | ||
| public void embedd(Context context, IResult result, Writer writer) throws IOException | ||
| { | ||
| AIDetailsProvider aiDetailsProvider = result.getResultMetaData().getAIDetailsProvider(); |
There was a problem hiding this comment.
Null check required here for result.getResultMetadata().
| { | ||
| ExportDialog dialog = new ExportDialog(control.getShell(), // | ||
| new String[] { Messages.ExportActions_PlainAiText }, // | ||
| new String[] { "*.text" });//$NON-NLS-1$ |
There was a problem hiding this comment.
this is a bit odd to me, should be .txt, or both .txt and .text? :)
|
re: Markdown nested. Good point that it does not support nested tables. I looked online, this stackoverflow says that we should put html inside md table cell, but that does not seem like an improvement in end user readability. |
|
Thanks @jasonk000 for the review. I do still plan on converting this PR to markdown but just haven't found the cycles yet. Do you think it's okay to use nested bulleted list to simulate the table? HTML tables would work but one of the use cases I wanted for this was a simple, human-readable output (as well as LLM readable). |
Yes I think bullets are a good choice. If it is for human + LLM consumption (vs structured like CSV!) then we have flexibility too. The structure can be tweaked over time as well, since the reader (human or LLM) can adapt. |

Fixes #192