Skip to content

Commit efd23f0

Browse files
committed
ci: Add GitHub Actions build workflow and clean up unused imports and parameters across various modules.
1 parent ec16c00 commit efd23f0

File tree

6 files changed

+38
-8
lines changed

6 files changed

+38
-8
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [22, 24]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: TypeScript build
30+
run: npm run build

src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ ${c("bold", "Memory Location:")}
11671167
* Handle extensions commands
11681168
*/
11691169
async function handleExtensionsCommand(subcommand?: string) {
1170-
const { existsSync, readdirSync, readFileSync } = await import("node:fs");
1170+
const { existsSync, readdirSync } = await import("node:fs");
11711171
const { homedir } = await import("node:os");
11721172
const { join } = await import("node:path");
11731173
const extDir = join(homedir(), ".openwhale", "extensions");
@@ -1341,7 +1341,7 @@ ${c("bold", "How it works:")}
13411341
async function handleVoiceCommand(subcommand?: string) {
13421342
const { homedir } = await import("node:os");
13431343
const { join } = await import("node:path");
1344-
const { existsSync, readFileSync, writeFileSync, mkdirSync } = await import("node:fs");
1344+
const { readFileSync, writeFileSync, mkdirSync } = await import("node:fs");
13451345

13461346
const configPath = join(homedir(), ".openwhale", "settings", "voicewake.json");
13471347
const DEFAULT_TRIGGERS = ["openwhale", "claude", "computer"];

src/sessions/session-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function persistMessage(msg: ChatMessage): void {
151151

152152
// ============== INITIALIZATION ==============
153153

154-
export function initializeProvider(apiKey: string, model?: string): void {
154+
export function initializeProvider(_apiKey: string, model?: string): void {
155155
// Legacy function - provider initialization now handled by registry
156156
if (model) currentModel = model;
157157
ensureDbInit(); // Load history on init

src/skills/twitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function birdExec(command: string): Promise<string> {
3636
}
3737
}
3838

39-
async function checkBirdAvailable(): Promise<boolean> {
39+
export async function checkBirdAvailable(): Promise<boolean> {
4040
try {
4141
await execAsync("which bird");
4242
return true;

src/tools/browser-os.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ export class BrowserOSBackend {
641641
/**
642642
* Take a screenshot
643643
*/
644-
async screenshot(fullPage: boolean = false): Promise<ToolResult> {
644+
async screenshot(_fullPage: boolean = false): Promise<ToolResult> {
645645
// First get the active tab to get its ID
646646
const tabResult = await callBrowserOSTool(this.url, "browser_get_active_tab", {});
647647

@@ -795,7 +795,7 @@ export class BrowserOSBackend {
795795
/**
796796
* Scroll the page
797797
*/
798-
async scroll(direction: "up" | "down", amount?: number): Promise<ToolResult> {
798+
async scroll(direction: "up" | "down", _amount?: number): Promise<ToolResult> {
799799
const toolName = direction === "down" ? "browser_scroll_down" : "browser_scroll_up";
800800
const result = await callBrowserOSTool(this.url, toolName, {});
801801

src/tools/spreadsheet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { z } from "zod";
22
import type { AgentTool, ToolCallContext, ToolResult } from "./base.js";
33
import ExcelJS from "exceljs";
4-
import { readFile, writeFile, mkdir } from "node:fs/promises";
5-
import { dirname, extname } from "node:path";
4+
import { mkdir } from "node:fs/promises";
5+
import { dirname } from "node:path";
66

77
const SpreadsheetActionSchema = z.object({
88
action: z.enum(["create", "read", "add_sheet", "add_rows", "format"]).describe("Action to perform"),

0 commit comments

Comments
 (0)