abapgit-agent 1.15.3 → 1.16.1

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.
@@ -11,6 +11,30 @@ module.exports = {
11
11
  async execute(args, context) {
12
12
  const { loadConfig, AbapHttp } = context;
13
13
 
14
+ if (args.includes('--help') || args.includes('-h')) {
15
+ console.log(`
16
+ Usage:
17
+ abapgit-agent where --objects <obj1>,<obj2>,... [--type <type>] [--limit <n>] [--offset <n>] [--json]
18
+
19
+ Description:
20
+ Find where-used list for ABAP objects (classes, interfaces, programs, etc.).
21
+
22
+ Parameters:
23
+ --objects <obj1,...> Comma-separated object names (required).
24
+ --type <type> Object type (e.g. CLAS, INTF — auto-detected if omitted).
25
+ --limit <n> Maximum number of results (default: 50).
26
+ --offset <n> Skip first N results (for pagination).
27
+ --json Output as JSON.
28
+
29
+ Examples:
30
+ abapgit-agent where --objects ZCL_MY_CLASS
31
+ abapgit-agent where --objects ZIF_MY_INTERFACE
32
+ abapgit-agent where --objects ZCL_MY_CLASS --limit 20
33
+ abapgit-agent where --objects ZCL_MY_CLASS --offset 50 --limit 20
34
+ `);
35
+ return;
36
+ }
37
+
14
38
  const objectsArgIndex = args.indexOf('--objects');
15
39
  if (objectsArgIndex === -1 || objectsArgIndex + 1 >= args.length) {
16
40
  console.error('Error: --objects parameter required');
@@ -531,8 +531,8 @@ async function getTopic(topic) {
531
531
  return {
532
532
  topic,
533
533
  file: guidelineFile,
534
- content: content.slice(0, 15000),
535
- truncated: content.length > 15000,
534
+ content: content.slice(0, 20000),
535
+ truncated: content.length > 20000,
536
536
  totalLength: content.length,
537
537
  source: 'guidelines'
538
538
  };
@@ -616,8 +616,8 @@ async function getTopic(topic) {
616
616
  return {
617
617
  topic,
618
618
  file: exactMatch,
619
- content: content.slice(0, 15000),
620
- truncated: content.length > 15000,
619
+ content: content.slice(0, 20000),
620
+ truncated: content.length > 20000,
621
621
  totalLength: content.length,
622
622
  source: 'built-in guidelines'
623
623
  };
@@ -630,8 +630,8 @@ async function getTopic(topic) {
630
630
  return {
631
631
  topic,
632
632
  file: partialMatches[0],
633
- content: content.slice(0, 15000),
634
- truncated: content.length > 15000,
633
+ content: content.slice(0, 20000),
634
+ truncated: content.length > 20000,
635
635
  totalLength: content.length,
636
636
  source: 'built-in guidelines'
637
637
  };
@@ -814,11 +814,10 @@ function displayTopic(result) {
814
814
  console.log(' ' + '─'.repeat(60));
815
815
  console.log('');
816
816
 
817
- // Display up to 300 lines (covers full guideline files without truncation)
818
- const lines = result.content.split('\n').slice(0, 300);
817
+ // Display full content (char limit already applied when reading)
818
+ const lines = result.content.split('\n');
819
819
  lines.forEach(line => {
820
- const trimmed = line.slice(0, 100);
821
- console.log(` ${trimmed}`);
820
+ console.log(` ${line}`);
822
821
  });
823
822
 
824
823
  if (result.truncated) {