opencode-context 1.0.4 → 1.0.5

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.
package/dist/index.js CHANGED
@@ -7961,6 +7961,17 @@ var DOC_PATTERNS = [
7961
7961
 
7962
7962
  // src/search.ts
7963
7963
  function parseQuery(query) {
7964
+ if (!query || typeof query !== "string") {
7965
+ return {
7966
+ original: query || "",
7967
+ terms: [],
7968
+ exactTerms: [],
7969
+ fileTypes: [],
7970
+ wantTests: false,
7971
+ wantConfigs: false,
7972
+ wantDocs: false
7973
+ };
7974
+ }
7964
7975
  const lowerQuery = query.toLowerCase();
7965
7976
  const terms = [];
7966
7977
  const exactTerms = [];
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,qBAAqB,CAAC;AAaxD,QAAA,MAAM,iBAAiB,EAAE,MA0CxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,qBAAqB,CAAC;AAaxD,QAAA,MAAM,iBAAiB,EAAE,MA8CxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
package/dist/plugin.js CHANGED
@@ -17707,6 +17707,17 @@ var DOC_PATTERNS = [
17707
17707
 
17708
17708
  // src/search.ts
17709
17709
  function parseQuery(query) {
17710
+ if (!query || typeof query !== "string") {
17711
+ return {
17712
+ original: query || "",
17713
+ terms: [],
17714
+ exactTerms: [],
17715
+ fileTypes: [],
17716
+ wantTests: false,
17717
+ wantConfigs: false,
17718
+ wantDocs: false
17719
+ };
17720
+ }
17710
17721
  const lowerQuery = query.toLowerCase();
17711
17722
  const terms = [];
17712
17723
  const exactTerms = [];
@@ -18107,6 +18118,9 @@ var OpenContextPlugin = async () => {
18107
18118
  },
18108
18119
  async execute(args, context) {
18109
18120
  const { directory } = context;
18121
+ if (!args.query || typeof args.query !== "string") {
18122
+ return "Error: query parameter is required. Usage: find_files query='search term'";
18123
+ }
18110
18124
  const options = {
18111
18125
  query: args.query,
18112
18126
  maxFiles: args.maxFiles || 5,
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EAET,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EAOZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAmDrD;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMpD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMtD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMnD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQnE;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAiB7E;AAgQD,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,SAAS,CAAC,CAmCpB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAiE/E"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EAET,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EAOZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CA+DrD;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMpD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMtD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMnD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQnE;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAiB7E;AAgQD,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,SAAS,CAAC,CAmCpB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAiE/E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-context",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Smart file finder for codebases - semantic search with confidence scoring. Also available as an OpenCode plugin.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",