@vanillaskyai/video 0.10.11 → 0.10.12

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ VanillaSky follows semantic versioning. This changelog begins with the 0.1 beta.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.10.12
8
+
9
+ - Use query context to choose between equally relevant Pexels subject matches in the starter, while preserving subject, activity and equipment priority.
10
+
7
11
  ## 0.10.11
8
12
 
9
13
  - Keep the opening chapter visible until the first body visual and narration are ready, without mounting a second player or replaying the opening.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanillaskyai/video",
3
- "version": "0.10.11",
3
+ "version": "0.10.12",
4
4
  "description": "Open-source voice-and-video chat SDK for AI applications.",
5
5
  "keywords": [
6
6
  "video-chat",
@@ -9,7 +9,7 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@vanillaskyai/video": "0.10.11",
12
+ "@vanillaskyai/video": "0.10.12",
13
13
  "react": "^19.2.8",
14
14
  "react-dom": "^19.2.8",
15
15
  "@ai-sdk/anthropic": "^3.0.0",
@@ -71,7 +71,9 @@ export async function findStockFootage(query: string, orientation: VideoOrientat
71
71
  if (selection && subject.length) {
72
72
  const covers = (phrase: string) => terms(phrase).every(word => subject.includes(word));
73
73
  if (!covers(selection.subject) || selection.exclude?.some(covers)) continue;
74
- matches = 2 + Number(Boolean(selection.activity && covers(selection.activity)))
74
+ // Query context breaks equal hint matches without outweighing a hint.
75
+ const contextScore = matches / (tokens.length + 1);
76
+ matches = 2 + contextScore + Number(Boolean(selection.activity && covers(selection.activity)))
75
77
  + Number(Boolean(selection.equipment && covers(selection.equipment)));
76
78
  }
77
79
  // The documented Video resource can have only a numeric page URL and no