MCPcopy Index your code
hub / github.com/openai/plugins / recent_targets

Function recent_targets

plugins/codex-security/scripts/workbench_db.py:2970–2989  ·  view source on GitHub ↗
(connection: sqlite3.Connection)

Source from the content-addressed store, hash-verified

2968
2969
2970def recent_targets(connection: sqlite3.Connection) -> list[dict[str, Any]]:
2971 targets: list[dict[str, Any]] = []
2972 rows = connection.execute(
2973 """
2974 SELECT target_path, MAX(updated_at) AS last_used_at
2975 FROM workspaces
2976 WHERE submitted = 1 AND target_path IS NOT NULL
2977 GROUP BY target_path
2978 ORDER BY last_used_at DESC
2979 """
2980 )
2981 for row in rows:
2982 try:
2983 inspected = inspect_target(row["target_path"])
2984 except SystemExit:
2985 continue
2986 targets.append(inspected)
2987 if len(targets) == 5:
2988 break
2989 return targets
2990
2991
2992def scan_context(

Callers 1

workspace_stateFunction · 0.85

Calls 1

inspect_targetFunction · 0.85

Tested by

no test coverage detected