helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: Adds olpaka flutter client


Changed files:
filename: README.md
patch: @@ -283,6 +283,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Ollama RAG Chatbot](https://github.com/datvodinh/rag-chatbot.git) (Local Chat with multiple PDFs using Ollama and RAG)
 - [BrainSoup](https://www.nurgo-software.com/products/brainsoup) (Flexible native client with RAG & multi-agent automation)
 - [macai](https://github.com/Renset/macai) (macOS client for Ollama, ChatGPT, and other compatible API back-ends)
+- [Olpaka](https://github.com/Otacon/olpaka) (User-friendly Flutter Web App for Ollama)
 
 ### Terminal
Repository: ollama/ollama
Pull request: Add OllamaSpring Project to Readme

Add OllamaSpring Project to Readme

Changed files:
filename: README.md
patch: @@ -284,6 +284,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [BrainSoup](https://www.nurgo-software.com/products/brainsoup) (Flexible native client with RAG & multi-agent automation)
 - [macai](https://github.com/Renset/macai) (macOS client for Ollama, ChatGPT, and other compatible API back-ends)
 - [Olpaka](https://github.com/Otacon/olpaka) (User-friendly Flutter Web App for Ollama)
+- [OllamaSpring](https://github.com/CrazyNeil/OllamaSpring) (Ollama Client for macOS)
 
 ### Terminal
Repository: electron/electron
Pull request: fix: `webContents.downloadURL()` did not support referer header

Backport of #47625

See that PR for details.


Notes: Fixed a bug where the `Referer` header was not being set correctly when using `webContents.downloadURL()`.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -2411,6 +2411,13 @@ void WebContents::DownloadURL(const GURL& url, gin::Arguments* args) {
       content::DownloadRequestUtils::CreateDownloadForWebContentsMainFrame(
           web_contents(), url, MISSING_TRAFFIC_ANNOTATION));
   for (const auto& [name, value] : headers) {
+    if (base::ToLowerASCII(name) ==
+        base::ToLowerASCII(net::HttpRequestHeaders::kReferer)) {
+      // Setting a Referer header with HTTPS scheme while the download URL's
+      // scheme is HTTP might lead to download failure.
+      download_params->set_referrer(GURL(value));
+      continue;
+    }
     download_params->add_request_header(name, value);
   }
 

filename: spec/api-session-spec.ts
patch: @@ -1289,6 +1289,53 @@ describe('session module', () => {
         expect(item.getContentDisposition()).to.equal(contentDisposition);
       });
 
+      it('can perform a download with referer header', async () => {
+        const server = http.createServer((req, res) => {
+          const { referer } = req.headers;
+          if (!referer || !referer.startsWith('http://www.electronjs.org')) {
+            res.statusCode = 403;
+            res.end();
+          } else {
+            res.writeHead(200, {
+              'Content-Length': mockPDF.length,
+              'Content-Type': 'application/pdf',
+              'Content-Disposition': req.url === '/?testFilename' ? 'inline' : contentDisposition
+            });
+            res.end(mockPDF);
+          }
+        });
+
+        const { port } = await listen(server);
+
+        const w = new BrowserWindow({ show: false });
+        const downloadDone: Promise<Electron.DownloadItem> = new Promise((resolve) => {
+          w.webContents.session.once('will-download', (e, item) => {
+            item.savePath = downloadFilePath;
+            item.on('done', () => {
+              try {
+                resolve(item);
+              } catch { }
+            });
+          });
+        });
+
+        w.webContents.downloadURL(`${url}:${port}`, {
+          headers: {
+            // Setting a Referer header with HTTPS scheme while the download URL's
+            // scheme is HTTP might lead to download failure.
+            referer: 'http://www.electronjs.org'
+          }
+        });
+
+        const item = await downloadDone;
+        expect(item.getState()).to.equal('completed');
+        expect(item.getFilename()).to.equal('mock.pdf');
+        expect(item.getMimeType()).to.equal('application/pdf');
+        expect(item.getReceivedBytes()).to.equal(mockPDF.length);
+        expect(item.getTotalBytes()).to.equal(mockPDF.length);
+        expect(item.getContentDisposition()).to.equal(contentDisposition);
+      });
+
       it('throws when called with invalid headers', () => {
         const w = new BrowserWindow({ show: false });
         expect(() => {
Repository: ollama/ollama
Pull request: llm/server.go: Fix 2 minor typos


Changed files:
filename: llm/server.go
patch: @@ -24,9 +24,9 @@ import (
 	"golang.org/x/sync/semaphore"
 
 	"github.com/ollama/ollama/api"
+	"github.com/ollama/ollama/envconfig"
 	"github.com/ollama/ollama/format"
 	"github.com/ollama/ollama/gpu"
-	"github.com/ollama/ollama/envconfig"
 )
 
 type LlamaServer interface {
@@ -243,7 +243,7 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 			gpuCount = 0
 		}
 
-		// Find an availableServers  port, retry on each iterration in case the failure was a port conflict race
+		// Find an availableServers  port, retry on each iteration in case the failure was a port conflict race
 		port := 0
 		if a, err := net.ResolveTCPAddr("tcp", "localhost:0"); err == nil {
 			var l *net.TCPListener
@@ -756,7 +756,7 @@ func (s *llmServer) Completion(ctx context.Context, req CompletionRequest, fn fu
 
 			var c completion
 			if err := json.Unmarshal(evt, &c); err != nil {
-				return fmt.Errorf("error unmarshaling llm prediction response: %v", err)
+				return fmt.Errorf("error unmarshalling llm prediction response: %v", err)
 			}
 
 			switch {
Repository: ggml-org/llama.cpp
Pull request: metal : adjust extra size for FA buffer to avoid reallocations

cont #17143
rel #17617

Pad using the worst case size between the vec and non-vec buffers. Prevents unwanted graph reallocations in some cases.

Changed files:
filename: ggml/src/ggml-metal/ggml-metal-ops.cpp
patch: @@ -2181,7 +2181,11 @@ size_t ggml_metal_op_flash_attn_ext_extra_pad(const ggml_tensor * op) {
 
     const bool has_mask = op->src[3] != nullptr;
 
-    if (ggml_metal_op_flash_attn_ext_use_vec(op)) {
+    // note: the non-vec kernel requires more extra memory, so always reserve for it
+    GGML_ASSERT(OP_FLASH_ATTN_EXT_NCPSG >= OP_FLASH_ATTN_EXT_VEC_NCPSG);
+
+    //if (ggml_metal_op_flash_attn_ext_use_vec(op)) {
+    if (false) {
         // note: always reserve the padding space to avoid graph reallocations
         //const bool has_kvpad = ne11 % OP_FLASH_ATTN_EXT_VEC_NCPSG != 0;
         const bool has_kvpad = true;
Repository: ollama/ollama
Pull request: small fix in chatbot example to get stream of tokens

It seems like without this line it is not getting the answer as a stream and we have to wait for the whole output to be generated before printing it.

Changed files:
filename: examples/python-simplechat/client.py
patch: @@ -9,6 +9,7 @@ def chat(messages):
     r = requests.post(
         "http://0.0.0.0:11434/api/chat",
         json={"model": model, "messages": messages, "stream": True},
+	stream=True
     )
     r.raise_for_status()
     output = ""
Repository: denoland/deno
Pull request: fix(cli): parse --frozen flag for deno update and deno outdated

## Summary

- `outdated_parse()` was missing a call to `lock_args_parse()`, so `--frozen`, `--lock`, and `--no-lock` flags were never parsed for `deno update` and `deno outdated`
- This caused `deno update --frozen=false` to fail with "The lockfile is out of date" because `frozen_lockfile` remained `None` (defaulting to true)
- Add unit tests for `--frozen=false` and `--frozen` on both commands

Fixes #32969

## Test plan

- [x] `cargo test update_subcommand_frozen_flag` passes
- [x] `cargo test outdated_subcommand_frozen_flag` passes
- [ ] CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Changed files:
filename: cli/args/flags.rs
patch: @@ -6064,6 +6064,7 @@ fn outdated_parse(
     recursive,
     kind,
   });
+  lock_args_parse(flags, matches);
   min_dep_age_arg_parse(flags, matches);
   Ok(())
 }
@@ -14668,6 +14669,22 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n"
     }
   }
 
+  #[test]
+  fn update_subcommand_frozen_flag() {
+    let r = flags_from_vec(svec!["deno", "update", "--frozen=false"]).unwrap();
+    assert_eq!(r.frozen_lockfile, Some(false));
+
+    let r = flags_from_vec(svec!["deno", "update", "--frozen"]).unwrap();
+    assert_eq!(r.frozen_lockfile, Some(true));
+  }
+
+  #[test]
+  fn outdated_subcommand_frozen_flag() {
+    let r =
+      flags_from_vec(svec!["deno", "outdated", "--frozen=false"]).unwrap();
+    assert_eq!(r.frozen_lockfile, Some(false));
+  }
+
   #[test]
   fn approve_scripts_subcommand() {
     let cases = [
Repository: vercel/next.js
Pull request: Add comment that we expect the function passed to bind to be anonymous

See https://github.com/facebook/react/pull/34911

This is a weird one but we need some consistent name to ignore these because otherwise they show up as I/O.

The simplest is to simply not assign a name to the function being passed. It also can't be auto-assigned by a compiler. Because whatever name the function is given is the name given to the AsyncResource.


Changed files:
filename: packages/next/src/server/after/after-context.ts
patch: @@ -84,15 +84,19 @@ export class AfterContext {
     //   after(() => x())
     //   after(x())
     //   await x()
-    const wrappedCallback = bindSnapshot(async () => {
-      try {
-        await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, () =>
-          callback()
-        )
-      } catch (error) {
-        this.reportTaskError('function', error)
+    const wrappedCallback = bindSnapshot(
+      // WARNING: Don't make this a named function. It must be anonymous.
+      // See: https://github.com/facebook/react/pull/34911
+      async () => {
+        try {
+          await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, () =>
+            callback()
+          )
+        } catch (error) {
+          this.reportTaskError('function', error)
+        }
       }
-    })
+    )
 
     this.callbackQueue.add(wrappedCallback)
   }

filename: packages/next/src/server/app-render/async-local-storage.ts
patch: @@ -45,7 +45,10 @@ export function createAsyncLocalStorage<
   return new FakeAsyncLocalStorage()
 }
 
-export function bindSnapshot<T>(fn: T): T {
+export function bindSnapshot<T>(
+  // WARNING: Don't pass a named function to this argument! See: https://github.com/facebook/react/pull/34911
+  fn: T
+): T {
   if (maybeGlobalAsyncLocalStorage) {
     return maybeGlobalAsyncLocalStorage.bind(fn)
   }
Repository: facebook/react
Pull request: [rcr][ez] Clean up unused $read from rcr


Changed files:
filename: compiler/packages/react-compiler-runtime/src/index.ts
patch: @@ -36,14 +36,6 @@ export function c(size: number) {
   })[0];
 }
 
-export function $read(memoCache: MemoCache, index: number) {
-  const value = memoCache[index];
-  if (value === $empty) {
-    throw new Error('useMemoCache: read before write');
-  }
-  return value;
-}
-
 const LazyGuardDispatcher: {[key: string]: (...args: Array<any>) => any} = {};
 [
   'readContext',
Repository: nodejs/node
Pull request: benchmark: reflect current OpenSSL in crypto key benchmarks

updates the crypto benchmarks so that they can be executed on OpenSSL < 3.5 and don't always run non 3.5 jobs in CI into flake status.

Changed files:
filename: benchmark/crypto/create-keyobject.js
patch: @@ -1,6 +1,7 @@
 'use strict';
 
 const common = require('../common.js');
+const { hasOpenSSL } = require('../../test/common/crypto.js');
 const crypto = require('crypto');
 const fs = require('fs');
 const path = require('path');
@@ -21,11 +22,14 @@ const keyFixtures = {
   'ec': readKeyPair('ec_p256_public', 'ec_p256_private'),
   'rsa': readKeyPair('rsa_public_2048', 'rsa_private_2048'),
   'ed25519': readKeyPair('ed25519_public', 'ed25519_private'),
-  'ml-dsa-44': readKeyPair('ml_dsa_44_public', 'ml_dsa_44_private'),
 };
 
+if (hasOpenSSL(3, 5)) {
+  keyFixtures['ml-dsa-44'] = readKeyPair('ml_dsa_44_public', 'ml_dsa_44_private');
+}
+
 const bench = common.createBenchmark(main, {
-  keyType: ['rsa', 'ec', 'ed25519', 'ml-dsa-44'],
+  keyType: Object.keys(keyFixtures),
   keyFormat: ['pkcs8', 'spki', 'der-pkcs8', 'der-spki', 'jwk-public', 'jwk-private'],
   n: [1e3],
 });

filename: benchmark/crypto/oneshot-sign.js
patch: @@ -1,6 +1,7 @@
 'use strict';
 
 const common = require('../common.js');
+const { hasOpenSSL } = require('../../test/common/crypto.js');
 const crypto = require('crypto');
 const fs = require('fs');
 const path = require('path');
@@ -14,16 +15,19 @@ const keyFixtures = {
   'ec': readKey('ec_p256_private'),
   'rsa': readKey('rsa_private_2048'),
   'ed25519': readKey('ed25519_private'),
-  'ml-dsa-44': readKey('ml_dsa_44_private'),
 };
 
+if (hasOpenSSL(3, 5)) {
+  keyFixtures['ml-dsa-44'] = readKey('ml_dsa_44_private');
+}
+
 const data = crypto.randomBytes(256);
 
 let pems;
 let keyObjects;
 
 const bench = common.createBenchmark(main, {
-  keyType: ['rsa', 'ec', 'ed25519', 'ml-dsa-44'],
+  keyType: Object.keys(keyFixtures),
   mode: ['sync', 'async', 'async-parallel'],
   keyFormat: ['pem', 'der', 'jwk', 'keyObject', 'keyObject.unique'],
   n: [1e3],

filename: benchmark/crypto/oneshot-verify.js
patch: @@ -1,6 +1,7 @@
 'use strict';
 
 const common = require('../common.js');
+const { hasOpenSSL } = require('../../test/common/crypto.js');
 const crypto = require('crypto');
 const fs = require('fs');
 const path = require('path');
@@ -21,16 +22,19 @@ const keyFixtures = {
   'ec': readKeyPair('ec_p256_public', 'ec_p256_private'),
   'rsa': readKeyPair('rsa_public_2048', 'rsa_private_2048'),
   'ed25519': readKeyPair('ed25519_public', 'ed25519_private'),
-  'ml-dsa-44': readKeyPair('ml_dsa_44_public', 'ml_dsa_44_private'),
 };
 
+if (hasOpenSSL(3, 5)) {
+  keyFixtures['ml-dsa-44'] = readKeyPair('ml_dsa_44_public', 'ml_dsa_44_private');
+}
+
 const data = crypto.randomBytes(256);
 
 let pems;
 let keyObjects;
 
 const bench = common.createBenchmark(main, {
-  keyType: ['rsa', 'ec', 'ed25519', 'ml-dsa-44'],
+  keyType: Object.keys(keyFixtures),
   mode: ['sync', 'async', 'async-parallel'],
   keyFormat: ['pem', 'der', 'jwk', 'keyObject', 'keyObject.unique'],
   n: [1e3],
Repository: huggingface/transformers
Pull request: revert changes in _is_package_available

# What does this PR do?

Reverts https://github.com/huggingface/transformers/pull/41411, because for some packages like `optimum` we don't have loaders as expected from most packages.

Changed files:
filename: src/transformers/utils/import_utils.py
patch: @@ -47,8 +47,7 @@
 def _is_package_available(pkg_name: str, return_version: bool = False) -> tuple[bool, str] | bool:
     """Check if `pkg_name` exist, and optionally try to get its version"""
     spec = importlib.util.find_spec(pkg_name)
-    # the spec might be not None but not importable
-    package_exists = spec is not None and spec.loader is not None
+    package_exists = spec is not None
     package_version = "N/A"
     if package_exists and return_version:
         try:
Repository: electron/electron
Pull request: fix: dark mode on Linux default themeing

#### Description of Change

Closes https://github.com/electron/electron/issues/47842
Refs CL:6469606

Fixes an issue where windows used dark theme on Linux all the time without reacting to system theme changes.

We need to take an approach similar to that in [`BrowserDesktopWindowTreeHostLinux`](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc;l=106-115;drc=4eaa7ecc4adc54dc936063562327f3d0c599f403;bpv=1;bpt=0) and override the `prefers_dark_theme` property based on our own `ui::LinuxUiGetter`.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed an issue where windows used dark theme on Linux all the time without reacting to system theme changes.


Changed files:
filename: shell/browser/ui/electron_desktop_window_tree_host_linux.cc
patch: @@ -26,6 +26,7 @@
 #include "ui/linux/linux_ui.h"
 #include "ui/ozone/public/ozone_platform.h"
 #include "ui/platform_window/platform_window.h"
+#include "ui/platform_window/platform_window_init_properties.h"
 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
 
@@ -293,4 +294,14 @@ void ElectronDesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) {
   views::DesktopWindowTreeHostLinux::DispatchEvent(event);
 }
 
+void ElectronDesktopWindowTreeHostLinux::AddAdditionalInitProperties(
+    const views::Widget::InitParams& params,
+    ui::PlatformWindowInitProperties* properties) {
+  views::DesktopWindowTreeHostLinux::AddAdditionalInitProperties(params,
+                                                                 properties);
+  const auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(nullptr);
+  properties->prefer_dark_theme =
+      linux_ui_theme && linux_ui_theme->PreferDarkTheme();
+}
+
 }  // namespace electron

filename: shell/browser/ui/electron_desktop_window_tree_host_linux.h
patch: @@ -62,6 +62,9 @@ class ElectronDesktopWindowTreeHostLinux
   // views::DesktopWindowTreeHostLinux:
   void UpdateFrameHints() override;
   void DispatchEvent(ui::Event* event) override;
+  void AddAdditionalInitProperties(
+      const views::Widget::InitParams& params,
+      ui::PlatformWindowInitProperties* properties) override;
 
  private:
   void UpdateWindowState(ui::PlatformWindowState new_state);
Repository: ollama/ollama
Pull request: Report better warning on client closed abort of load

If the client closes the connection before we finish loading the model we abort, so lets make the log message clearer why to help users understand this failure mode

Changed files:
filename: llm/server.go
patch: @@ -528,7 +528,7 @@ func (s *llmServer) WaitUntilRunning(ctx context.Context) error {
 	for {
 		select {
 		case <-ctx.Done():
-			slog.Info("context expired before server started")
+			slog.Warn("client connection closed before server finished loading, aborting load")
 			return fmt.Errorf("timed out waiting for llama runner to start: %w", ctx.Err())
 		case err := <-s.done:
 			msg := ""
Repository: denoland/deno
Pull request: fix(lockfile): truncate frozen lockfile error diff to 50 lines

## Summary

- The frozen lockfile error message includes a diff that can be 1000+ lines long, filling the entire console and making the actual error invisible
- Truncate the diff to 50 lines with a "... N more lines omitted ..." footer

Fixes #32970

## Test plan

- [x] `cargo check -p deno_resolver` passes
- [ ] CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Changed files:
filename: libs/resolver/lockfile.rs
patch: @@ -515,8 +515,19 @@ impl<TSys: LockfileSys> LockfileLock<TSys> {
       let diff = crate::display::diff(&contents, &new_contents);
       // has an extra newline at the end
       let diff = diff.trim_end();
+      const MAX_DIFF_LINES: usize = 50;
+      let truncated_diff = {
+        let lines: Vec<&str> = diff.lines().collect();
+        if lines.len() > MAX_DIFF_LINES {
+          let shown: String = lines[..MAX_DIFF_LINES].join("\n");
+          let remaining = lines.len() - MAX_DIFF_LINES;
+          format!("{shown}\n... {remaining} more lines omitted ...")
+        } else {
+          diff.to_string()
+        }
+      };
       Err(JsErrorBox::generic(format!(
-        "The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.\nchanges:\n{diff}"
+        "The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.\nchanges:\n{truncated_diff}"
       )))
     } else {
       Ok(())
Repository: huggingface/transformers
Pull request: Small Fix for imports 

# What does this PR do?

When using `importlib.util.find_spec(pkg_name)`, this might return some packages that are not importable but still exist. In this pr we simply check if they can be loaded

Changed files:
filename: src/transformers/utils/import_utils.py
patch: @@ -46,7 +46,9 @@
 
 def _is_package_available(pkg_name: str, return_version: bool = False) -> tuple[bool, str] | bool:
     """Check if `pkg_name` exist, and optionally try to get its version"""
-    package_exists = importlib.util.find_spec(pkg_name) is not None
+    spec = importlib.util.find_spec(pkg_name)
+    # the spec might be not None but not importable
+    package_exists = spec is not None and spec.loader is not None
     package_version = "N/A"
     if package_exists and return_version:
         try:
Repository: electron/electron
Pull request: fix: dark mode on Linux default themeing

Backport of #47869

See that PR for details.


Notes: Fixed an issue where windows used dark theme on Linux all the time without reacting to system theme changes.


Changed files:
filename: shell/browser/ui/electron_desktop_window_tree_host_linux.cc
patch: @@ -26,6 +26,7 @@
 #include "ui/linux/linux_ui.h"
 #include "ui/ozone/public/ozone_platform.h"
 #include "ui/platform_window/platform_window.h"
+#include "ui/platform_window/platform_window_init_properties.h"
 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
 
@@ -293,4 +294,14 @@ void ElectronDesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) {
   views::DesktopWindowTreeHostLinux::DispatchEvent(event);
 }
 
+void ElectronDesktopWindowTreeHostLinux::AddAdditionalInitProperties(
+    const views::Widget::InitParams& params,
+    ui::PlatformWindowInitProperties* properties) {
+  views::DesktopWindowTreeHostLinux::AddAdditionalInitProperties(params,
+                                                                 properties);
+  const auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(nullptr);
+  properties->prefer_dark_theme =
+      linux_ui_theme && linux_ui_theme->PreferDarkTheme();
+}
+
 }  // namespace electron

filename: shell/browser/ui/electron_desktop_window_tree_host_linux.h
patch: @@ -62,6 +62,9 @@ class ElectronDesktopWindowTreeHostLinux
   // views::DesktopWindowTreeHostLinux:
   void UpdateFrameHints() override;
   void DispatchEvent(ui::Event* event) override;
+  void AddAdditionalInitProperties(
+      const views::Widget::InitParams& params,
+      ui::PlatformWindowInitProperties* properties) override;
 
  private:
   void UpdateWindowState(ui::PlatformWindowState new_state);