cite-agent 1.2.12__py3-none-any.whl → 1.2.13__py3-none-any.whl

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.

Potentially problematic release.


This version of cite-agent might be problematic. Click here for more details.

cite_agent/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.2.12"
1
+ __version__ = "1.2.13"
@@ -2768,19 +2768,42 @@ class EnhancedNocturnalAgent:
2768
2768
 
2769
2769
  # Generic search if no pronoun or pronoun not resolved
2770
2770
  if not pronoun_resolved:
2771
- # Common words to ignore (add prepositions and articles)
2772
- ignore_words = {
2773
- 'looking', 'find', 'folder', 'directory', 'called', 'something',
2774
- 'forgot', 'name', 'think', 'can', 'you', 'look', 'for', 'somewhere',
2775
- 'computer', 'downloads', 'the', 'this', 'that', 'class', 'investment',
2776
- 'check', 'what', 'into', 'in', 'on', 'at', 'to', 'from', 'with',
2777
- 'and', 'or', 'is', 'it', 'my', 'me', 'there', 'here'
2778
- }
2771
+ # SMART EXTRACTION: Use pattern matching + common sense
2772
+ import re
2779
2773
 
2780
- # Extract potential target names
2781
- # Filter: must be 3+ chars (avoid "in", "to") AND not in ignore list
2782
- all_words = re.findall(r'\b([a-zA-Z0-9_-]+)\b', request.question)
2783
- potential_names = [w for w in all_words if len(w) >= 3 and w.lower() not in ignore_words]
2774
+ # Strategy: Look for quoted strings or alphanumeric codes
2775
+ # Priority 1: Quoted strings ("cm522", 'my_folder')
2776
+ quoted = re.findall(r'["\']([^"\']+)["\']', request.question)
2777
+
2778
+ if quoted:
2779
+ search_terms = quoted
2780
+ else:
2781
+ # Priority 2: Alphanumeric codes/IDs (cm522, hw03, proj_2024)
2782
+ # Pattern: letters + numbers mixed, or underscores/dashes
2783
+ codes = re.findall(r'\b([a-zA-Z]*\d+[a-zA-Z0-9_-]*|[a-zA-Z0-9]*[_-]+[a-zA-Z0-9]+)\b', request.question)
2784
+
2785
+ # Priority 3: Capitalize words (likely proper nouns: GitHub, MyProject)
2786
+ capitalized = re.findall(r'\b([A-Z][a-zA-Z0-9_-]+)\b', request.question)
2787
+
2788
+ # Priority 4: Long words (≥ 6 chars, likely meaningful)
2789
+ long_words = re.findall(r'\b([a-zA-Z]{6,})\b', request.question)
2790
+
2791
+ # Combine and dedupe
2792
+ search_terms = list(dict.fromkeys(codes + capitalized + long_words))
2793
+
2794
+ # Filter out common words
2795
+ common = {
2796
+ 'looking', 'folder', 'directory', 'called', 'something',
2797
+ 'downloads', 'documents', 'computer', 'somewhere'
2798
+ }
2799
+ search_terms = [t for t in search_terms if t.lower() not in common][:2]
2800
+
2801
+ debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
2802
+ if debug_mode:
2803
+ print(f"🔍 EXTRACTED SEARCH TERMS: {search_terms}")
2804
+
2805
+ if not search_terms:
2806
+ search_terms = [''] # Empty search to show "no target found"
2784
2807
 
2785
2808
  # Detect location hints
2786
2809
  search_path = "~" # Default to home
@@ -2790,30 +2813,27 @@ class EnhancedNocturnalAgent:
2790
2813
  search_path = "~/Documents"
2791
2814
 
2792
2815
  search_results = []
2793
- searched_terms = []
2794
2816
 
2795
- for name in potential_names[:2]: # Limit to 2 best candidates
2796
- if name in searched_terms:
2817
+ for name in search_terms:
2818
+ if not name:
2797
2819
  continue
2798
- searched_terms.append(name)
2820
+
2821
+ # Search with increasing depth
2822
+ find_cmd = f"find {search_path} -maxdepth 4 -type d -iname '*{name}*' 2>/dev/null | head -20"
2823
+ find_output = self.execute_command(find_cmd)
2799
2824
 
2800
- # Search with increasing depth if needed
2801
- find_cmd = f"find {search_path} -maxdepth 4 -type d -iname '*{name}*' 2>/dev/null | head -20"
2802
- find_output = self.execute_command(find_cmd)
2803
-
2804
- # DEBUG: Log exact output
2805
- debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
2806
- if debug_mode:
2807
- print(f"🔍 FIND EXECUTED: {find_cmd}")
2808
- print(f"🔍 FIND OUTPUT: {repr(find_output)}")
2809
-
2810
- if find_output.strip():
2811
- search_results.append(f"Searched for '*{name}*' in {search_path}:\n{find_output}")
2825
+ debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
2826
+ if debug_mode:
2827
+ print(f"🔍 FIND EXECUTED: {find_cmd}")
2828
+ print(f"🔍 FIND OUTPUT: {repr(find_output)}")
2829
+
2830
+ if find_output.strip():
2831
+ search_results.append(f"Searched for '*{name}*' in {search_path}:\n{find_output}")
2812
2832
 
2813
2833
  if search_results:
2814
2834
  api_results["shell_info"]["search_results"] = "\n\n".join(search_results)
2815
- elif potential_names:
2816
- api_results["shell_info"]["search_results"] = f"No directories matching '{', '.join(searched_terms)}' found in {search_path}"
2835
+ else:
2836
+ api_results["shell_info"]["search_results"] = f"No directories found matching query in {search_path}"
2817
2837
 
2818
2838
  tools_used.append("shell_execution")
2819
2839
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cite-agent
3
- Version: 1.2.12
3
+ Version: 1.2.13
4
4
  Summary: Terminal AI assistant for academic research with citation verification
5
5
  Home-page: https://github.com/Spectating101/cite-agent
6
6
  Author: Cite-Agent Team
@@ -1,6 +1,6 @@
1
1
  cite_agent/__init__.py,sha256=wAXV2v8nNOmIAd0rh8196ItBl9hHWBVOBl5Re4VB77I,1645
2
2
  cite_agent/__main__.py,sha256=6x3lltwG-iZHeQbN12rwvdkPDfd2Rmdk71tOOaC89Mw,179
3
- cite_agent/__version__.py,sha256=dbW85A2PinQCZabwD2DNDTfOE9315GDtQQKAsJP8IXk,23
3
+ cite_agent/__version__.py,sha256=rQSlPcfj4yT4krIq6epTVQyBzIX4etVOgfupVkM-RnU,23
4
4
  cite_agent/account_client.py,sha256=yLuzhIJoIZuXHXGbaVMzDxRATQwcy-wiaLnUrDuwUhI,5725
5
5
  cite_agent/agent_backend_only.py,sha256=H4DH4hmKhT0T3rQLAb2xnnJVjxl3pOZaljL9r6JndFY,6314
6
6
  cite_agent/ascii_plotting.py,sha256=lk8BaECs6fmjtp4iH12G09-frlRehAN7HLhHt2crers,8570
@@ -11,7 +11,7 @@ cite_agent/cli_conversational.py,sha256=RAmgRNRyB8gQ8QLvWU-Tt23j2lmA34rQNT5F3_7S
11
11
  cite_agent/cli_enhanced.py,sha256=EAaSw9qtiYRWUXF6_05T19GCXlz9cCSz6n41ASnXIPc,7407
12
12
  cite_agent/cli_workflow.py,sha256=4oS_jW9D8ylovXbEFdsyLQONt4o0xxR4Xatfcc4tnBs,11641
13
13
  cite_agent/dashboard.py,sha256=VGV5XQU1PnqvTsxfKMcue3j2ri_nvm9Be6O5aVays_w,10502
14
- cite_agent/enhanced_ai_agent.py,sha256=V0iJfsIBZd0o41xWFcA5EKX0ux1Jtba8iBQyxqxLegU,166340
14
+ cite_agent/enhanced_ai_agent.py,sha256=i7q4gWB3KsQSfOhNBZMJw9GRcK-_GQc4O56exumROiE,167565
15
15
  cite_agent/rate_limiter.py,sha256=-0fXx8Tl4zVB4O28n9ojU2weRo-FBF1cJo9Z5jC2LxQ,10908
16
16
  cite_agent/session_manager.py,sha256=B0MXSOsXdhO3DlvTG7S8x6pmGlYEDvIZ-o8TZM23niQ,9444
17
17
  cite_agent/setup_config.py,sha256=3m2e3gw0srEWA0OygdRo64r-8HK5ohyXfct0c__CF3s,16817
@@ -22,7 +22,7 @@ cite_agent/updater.py,sha256=udoAAN4gBKAvKDV7JTh2FJO_jIhNk9bby4x6n188MEY,8458
22
22
  cite_agent/web_search.py,sha256=FZCuNO7MAITiOIbpPbJyt2bzbXPzQla-9amJpnMpW_4,6520
23
23
  cite_agent/workflow.py,sha256=a0YC0Mzz4or1C5t2gZcuJBQ0uMOZrooaI8eLu2kkI0k,15086
24
24
  cite_agent/workflow_integration.py,sha256=A9ua0DN5pRtuU0cAwrUTGvqt2SXKhEHQbrHx16EGnDM,10910
25
- cite_agent-1.2.12.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
25
+ cite_agent-1.2.13.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
26
26
  src/__init__.py,sha256=0eEpjRfjRjOTilP66y-AbGNslBsVYr_clE-bZUzsX7s,40
27
27
  src/services/__init__.py,sha256=pTGLCH_84mz4nGtYMwQES5w-LzoSulUtx_uuNM6r-LA,4257
28
28
  src/services/simple_enhanced_main.py,sha256=IJoOplCqcVUg3GvN_BRyAhpGrLm_WEPy2jmHcNCY6R0,9257
@@ -49,8 +49,8 @@ src/services/research_service/synthesizer.py,sha256=lCcu37PWhWVNphHKaJJDIC-JQ5OI
49
49
  src/services/search_service/__init__.py,sha256=UZFXdd7r6wietQ2kESXEyGffdfBbpghquecQde7auF4,137
50
50
  src/services/search_service/indexer.py,sha256=u3-uwdAfmahWWsdebDF9i8XIyp7YtUMIHzlmBLBnPPM,7252
51
51
  src/services/search_service/search_engine.py,sha256=S9HqQ_mk-8W4d4MUOgBbEGQGV29-eSuceSFvVb4Xk-k,12500
52
- cite_agent-1.2.12.dist-info/METADATA,sha256=X53fF93c1oBock38Fg1mCIMXhUCyK3qUTq_L2nFZWKo,12232
53
- cite_agent-1.2.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
- cite_agent-1.2.12.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
55
- cite_agent-1.2.12.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
56
- cite_agent-1.2.12.dist-info/RECORD,,
52
+ cite_agent-1.2.13.dist-info/METADATA,sha256=D3xbwKTOyFfuX2P0ZgpaQtrbTqS8mDi8Jga1T9DNpQQ,12232
53
+ cite_agent-1.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
+ cite_agent-1.2.13.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
55
+ cite_agent-1.2.13.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
56
+ cite_agent-1.2.13.dist-info/RECORD,,