sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: ollama
Issue: API way for Ollama to serve a UI
Labels: feature request,api

### What are you trying to do?

A huge problem with usability right now is that we can not let users enjoy browser based UIs from the box. There is the CORS protection that can not be removed and it blocks browser UIs opened from a local file. The CORS can not be removed (set to *), as then malicious websites could potentially exploit the local Ollama, as the opened page of a bad website could just access local Ollama service.

To work-around this, right now we have to recommend installing a reverse proxy which is an overkill for simple users, especially windows ones who just want to have fun and the term "web-server" is associated with something complicated, huge and providing everyone access to your computer.

We can recommend them to set Origin to a certain web-site where our UI is hosted, but then users do not feel safe as they *believe* or *feel* the web-page is remote and it can "eavesdrop" their chats. Also, it means they can't open UI locally, they need internet to chat, which goes against the whole idea of a local service.

### How should we solve this?

A very easy and logical solution would be to add to existing API a function to serve an "index.html" file. We can add a special optional env header with a path to that single file. Then Ollama could just send its content on the request of "http:/127.0.0.1:11434/index.html" 

And that's basically it. The CORS protection would be kept and it's very simple to implement. For default installations nothing would change at all but for people wanting to try some browser based UI it would be enough to set the env variable or some "--index=" option at start.

Serving folders could theoretically be better but it's already much harder in terms of various security issues and to be honest not really needed as the web page can load other resources it needs from remote web-sites, like github.io or whatever. 



### What is the impact of not solving this?

A lot of simple users are forced to either drop CORS protection or just drop the idea of trying Ollama. As most people are using windows, it's not hard to see how installation of reverse proxy prevents Ollama to gain much wider popularity.

### Anything else?

_No response_
Repository: rust
Issue: Strange error message when trying to call a function that takes a closure that returns a future
Labels: A-diagnostics,A-closures,T-compiler,A-async-await,AsyncAwait-Triaged,WG-async,fixed-by-async-closures

### Code

```Rust
use std::future::Future;

fn bar<Fn, Res>(x: &i32, function: Fn) -> Res
where
    Res: Future<Output = i32>,
    Fn: FnOnce(&i32) -> Res,
{
    function(x)
}

async fn foo(x: &i32) -> i32 {
    x + 1
}

fn main() {
    bar(&1, foo);
}
```


### Current output

```Shell
error[E0308]: mismatched types
  --> lifetime-error-minimal-example/src/main.rs:16:5
   |
16 |     bar(&1, foo);
   |     ^^^^^^^^^^^^ one type is more general than the other
   |
   = note: expected opaque type `impl for<'a> Future<Output = i32>`
              found opaque type `impl Future<Output = i32>`
   = help: consider `await`ing on both `Future`s
   = note: distinct uses of `impl Trait` result in different opaque types
note: the lifetime requirement is introduced here
  --> lifetime-error-minimal-example/src/main.rs:6:25
   |
6  |     Fn: FnOnce(&i32) -> Res,
   |                         ^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `lifetime-error-minimal-example` (bin "lifetime-error-minimal-example") due to 1 previous error
```


### Desired output

```Shell
The compiler should somehow warn me that I need to constrain the lifetime of `Res` to the lifetime of the `&i32`.
```


### Rationale and extra context

If the `main` function looks like this:

```rust
fn main() {
    bar(&1, |x| foo(x));
}
```

The error message becomes more clear and closer to what I'd expect:

```
error: lifetime may not live long enough
  --> lifetime-error-minimal-example/src/main.rs:16:17
   |
16 |     bar(&1, |x| foo(x));
   |              -- ^^^^^^ returning this value requires that `'1` must outlive `'2`
   |              ||
   |              |return type of closure `impl Future<Output = i32>` contains a lifetime `'2`
   |              has type `&'1 i32`
```

### Other cases

_No response_

### Rust Version

```Shell
rustc 1.77.2 (25ef9e3d8 2024-04-09)
binary: rustc
commit-hash: 25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04
commit-date: 2024-04-09
host: aarch64-apple-darwin
release: 1.77.2
LLVM version: 17.0.6
```


### Anything else?

_No response_
Repository: kubernetes
Issue: Unclear status of `kubernetes.io/change-cause` annotation
Labels: kind/bug,sig/cli,sig/docs,sig/architecture,triage/accepted

The annotation `kubernetes.io/change-cause` is documented as being set by `kubectl … --record` but the `--record` command line argument is deprecated.

What's our story about this annotation? Should people set it manually, or should we - Kubernetes - recommend that people stop using that annotation. The answer isn't clear.

I am not sure if we recommend that people stop using `kubernetes.io/change-cause`.
I expected to find that the annotation was deprecated.

We should also change https://kubernetes.io/docs/reference/labels-annotations-taints/#change-cause to explain its use. If the `kubernetes.io/change-cause` annotation is deprecated, we should say so.

/sig cli docs architecture

Also see https://github.com/kubernetes/kubernetes/issues/40422

At the time I filed this, the latest minor release was v1.29
Repository: flutter
Issue: ShaderMask is incompatible with --web-renderer html on Safari
Labels: engine,platform-web,e: web_html,has reproducible steps,browser: safari-macos,P3,team-web,triaged-web,found in release: 3.19,found in release: 3.22

### Steps to reproduce

**Use this code to create a Gradient Text:**

```dart
class GradientText extends StatelessWidget {
  const GradientText(
    this.text, {
    required this.gradient,
    this.style,
  });

  final String text;
  final TextStyle? style;
  final Gradient gradient;

  @override
  Widget build(BuildContext context) {
    return ShaderMask(
      shaderCallback: (bounds) => gradient.createShader(Offset.zero & bounds.size),
      blendMode: BlendMode.srcIn,
      child: Text(text, style: style),
    );
  }
}
```

**Use it like:**

```dart
GradientText(
                        "THE NEXT BIG GRADIENT TEXT REVOLUTION",
                        gradient: LinearGradient(colors: [
                          Colors.blue.shade400,
                          Colors.blue.shade900,
                        ]),
                        style: const TextStyle(
                            fontSize: 40,
                            fontWeight: FontWeight.w700
                        )
                    )
```

**Compile and run using**:
 flutter run -d chrome --web-renderer html --web-browser-flag "--disable-web-security" --web-port 5000
 
 If --web-renderer html is removed then it works fine on chrome as well as safari.

### Expected results

Results in Chrome

<img width="1068" alt="Screenshot 2024-04-10 at 17 43 25" src="https://github.com/flutter/flutter/assets/93240796/947b3f8b-7196-4111-9ea7-6f26f40704b8">


### Actual results

Results in Safari:

<img width="1017" alt="Screenshot 2024-04-10 at 17 44 34" src="https://github.com/flutter/flutter/assets/93240796/97f33679-cc53-4035-9c72-db8ed58978c5">


### Code sample

Already shared in steps to reproduce

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output


```
[!] Flutter (Channel stable, 3.19.1, on macOS 14.1.2 23B92 darwin-arm64 (Rosetta), locale en-IN)
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.19.6/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/nrajput/Paymentus/flutter. Consider adding /Users/nrajput/Paymentus/flutter/bin to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.87.2)
[✓] Connected device (4 available)
[✓] Network resources
```
Repository: vscode
Issue: Search occurrence containing block cursor is badly highlighted
Labels: bug,editor-rendering

Repro: 

0. Pick theme "Dark+" and have cursor style set to "block" (`"editor.cursorStyle": "block"`)
1. Open a text document with several occurrences of some string, e.g., "foo" 
2. Place cursor within the first occurrence of "foo" 
3. Search within documentfor "foo" (cmd+f) 
4. Jump to next - :bug:


https://github.com/microsoft/vscode/assets/16353531/df8ffeaa-fec1-4970-94ee-39aebce20c18
Repository: node
Issue: HTTP 449 error sending request from node version 17 and above
Labels: tls

### Version

20.12.1

### Platform

Darwin wkuc-na 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103 arm64

### Subsystem

_No response_

### What steps will reproduce the bug?

Just run code in node version >= 17:

```javascript
const https = require('https');

https.get('https://autokult.pl', (res) => {
      console.log(process.versions.node, res.statusCode);
    let rawData = '';
    res.on('data', (chunk) => {
        rawData += chunk;
    });
    res.on('end', () => {
        //console.log(rawData)
    });
}).on('error', (e) => {
    console.error(`Got error: ${e.message}`);
});
```

Response code is 449.

### How often does it reproduce? Is there a required condition?

Always in node environment >= 17

### What is the expected behavior? Why is that the expected behavior?

Response should return status 200

### What do you see instead?

Response code is 449.

### Additional information

_No response_
Repository: tauri
Issue: [bug] Memory is not released after window is closed
Labels: type: bug,status: needs triage

### Describe the bug

i've created a system tray app, and on clicking a menu, it opens a window. It increases memory consumption and shows graphics in use in macOS, but when the window is closed, it doesn't release the memory and graphics.
Same is the situation in Ubuntu.

### Reproduction

using this function to open window
```
pub fn open_window(app_handle: &AppHandle) {
    let creds_window = tauri::WindowBuilder::new(
        app_handle,
        "addcreds", /* the unique window label */
        tauri::WindowUrl::App("index.html".into()),
    )
    .title("fortinet-connect")
    .center()
    .content_protected(true)
    .build()
    .ok();

    if let Some(creds_window) = creds_window {
        creds_window.show().ok();
    }
}
```
using this to prevent whole app from closing when the window is closed
```
_app.run(|_app_handle, event| match event {
        tauri::RunEvent::ExitRequested { api, .. } => {
            api.prevent_exit();
        }
        _ => {}
    });
```


### Expected behavior

It should free the memory

### Full `tauri info` output

```text
[✔] Environment
    - OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.0: 2.42.5
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
    ✔ cargo: 1.77.1 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.10.0
    - pnpm: 8.12.0
    - yarn: 1.22.21
    - npm: 10.2.3
    - bun: 1.1.2

[-] Packages
    - tauri [RUST]: 1.6.1
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.5.11

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../src
    - devPath: ../src
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: excalidraw
Issue: Support for custom OpenAI endpoint and headers
Labels: ai

Letting the user enter the endpoint in addition to the API key will enable the usage of custom Azure deployments as well as other LLMs locally via [litellm](litellm.ai) or similar proxies.
I can personally make this contribution if well received :)
Repository: angular
Issue: Proper redirects with status codes (SEO reasons)
Labels: feature,area: router,area: server,feature: under consideration

* **I'm submitting a ...**
```
- [x] feature request
```

* **What modules are related to this Issue?**
```
- [x] aspnetcore-engine
- [x] express-engine
- [x] hapi-engine
```

* **Do you want to request a *feature* or report a *bug*?**
Request a **feature**


* **What is the current behavior?**
Currently, if we have a `redirectTo` in our route config or `router.navigate` or `router.navigateByUrl` in our code, Universal renders the appropriate component, but doesn't actually do a redirect.


* **What is the expected behavior?**
Given a `redirectTo` in our route config or `router.navigate/navigateByUrl` anywhere in our code, Universal should actually redirect to the appropriate route.


* **What is the motivation / use case for changing the behavior?**
For SEO reasons. We wouldn't want to render content on "wrong" route.
Ideally, the `@angular/router` should also facilitate a way to let Universal know what status code is needed (but that would be an issue for the router).



* **Please tell us about your environment:**

- Angular version: 4+
- Platform: [NodeJs]
Repository: godot
Issue: Path2D editor can't split segment when a point creates a closed loop
Labels: enhancement,topic:editor,topic:2d

### Tested versions

Reproducible in: 
* v3.2.2.stable.mono.official
* v3.5.3.stable.official [6c814135b]
* v3.5.3.stable.mono.official [6c814135b]

NOT Reproducible in:
* v4.2.1

### System information

Linux

### Issue description

I have a path that is in the shape of an "R". Start is at the bottom left and follows the shape to end at the bottom right. Now when I use the "Select Points" tool which allows me to "Left Click: Split Segment (in curve)", any time I click on the top lines it will instead add the new point to the bottom lines instead. Adding a point (by splitting the segments) works fine at the bottom lines. And the issue appears to be point where the path touches the initial straight line again to close the upper loop. When I move that point to no longer exactly touch the line and close the loop, everything works as expected.

### Steps to reproduce

1. Save the following as a ".tres" file. (it's a Curve in the shape of an "R")
```
[gd_resource type="Curve2D" format=2]

[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -105, 218, 0, 0, 0, 0, -102, -206, 0, 0, 0, 0, 144, -67, 0, 0, 0, 0, -105, 6, 0, 0, 0, 0, 140, 220 )
}
```
2. Create a new 2D Scene
3. Create a new Path2D node
4. Load the curve from step 1 as the Path2D's Curve
5. Select the "Select Points" tool (it's the first one in the list) (should be pre-selected by default usually)
6. Try to split on of the upper segments by clicking on them
7. See that it is impossible to split one of the upper segments until you move the point that closes the loop


### Minimal reproduction project (MRP)

MRP following the reproduction steps
[MRP_Path2DLoop.zip](https://github.com/godotengine/godot/files/14932947/MRP_Path2DLoop.zip)
Repository: vscode
Issue: #accessibility in Github Copilot chat: Screenreader announces all copilot's path references and links as URL encoded file paths
Labels: bug,accessibility

Type: <b>Bug</b>

Hello. When I receive a message from github copilot and there is a file path & location reference, NVDA screenreader announces the reference as a github copilot markdown command with URL encoded file path that is badly understandable with screenreader. Same occurres in accessible view. Here's an example of copilot's message. I copied it from accessible view, but exactly the same is pronounced by screenreader, including the github.copilot.open_relative_path and a very very long string of url encoded something.
```
From the provided excerpt of the [`todo.md`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FC%3A%2FUsers%2FUser%2Ffiles%2Fpythons%2Fmachine-building-knowledge-aggregator-bot%2Ftodo.md%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "c:\Users\User\files\pythons\machine-building-knowledge-aggregator-bot\todo.md") file, the only unchecked item in the first sublist is:

```
Expected behaviour: Screenreader only announces the file path without the copilot command.

Extension version: 0.14.0
VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z)
OS version: Windows_NT x64 10.0.19045
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 x 2112)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|15.84GB (10.32GB free)|
|Process Argv|. --crash-reporter-id 0a698ae6-0fbf-4229-88ef-ebaad99723ef|
|Screen Reader|yes|
|VM|40%|
</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
9b8hh234:30694863
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
dsvsc021:30996838
g1icg217:30999571
945dj816:31013170

```

</details>

<!-- generated by issue reporter -->
Repository: PowerToys
Issue: Add the original non-accented letter to Quick Accent selection
Labels: Idea-Enhancement,Needs-Triage,Product-Quick Accent

### Description of the new feature / enhancement

When Quick Accent is activated I would like for the native character to be the first selected choice rather than an accented letter in case of accidental activation.

### Scenario when this would be used?

Whenever the user activates Quick Accent.

### Supporting information

Issue #23767 asked for the same thing back in February 2023, but was closed due to not receiving author feedback. 

As far as my own setup: 

 - I use either the English (US) keyboard language, or the English (US) International keyboard language, 
 - My Quick Accent character set is "All Available".

For example, if I activate Quick Accent for `p`, I get the following suggestions, none of which is the original letter `p`.

![image](https://github.com/microsoft/PowerToys/assets/10686947/1ffd8c24-9deb-441a-830b-50558ad3e6e0)
Repository: electron
Issue: [Bug]: Maximizing a frameless window with background material (Mica) permanently breaks the window
Labels: platform/windows,bug :beetle:,status/confirmed,has-repro-gist,28-x-y,29-x-y,30-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

30.0.0-beta.7

### What operating system are you using?

Windows

### Operating System Version

Windows 11

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

A window with these properties:

```
frame: false,
backgroundMaterial: "mica",
// Setting WCO is optional but is the simplest way to access maximize and restore controls
titleBarStyle: "hidden",
titleBarOverlay: true
```

should be able to be maximized and restored/unmaximized with no detrimental effects.

### Actual Behavior

When you maximize a frameless window with background material (whether through WCO titlebar controls or programmatically) it causes the following irreversible damage to the window:

- The background material disappears and cannot be re-applied
- The background colour goes pitch black and cannot be changed
- The window's rounded frame, border, shadows, and resize handles are gone when the window is restored

Restoring/unmaximizing the window does not bring back the original styles.

![CleanShot 2024-04-10 at 11 17 34](https://github.com/electron/electron/assets/7342119/4fb273c7-3032-4e05-bae8-afbb67053bf3)


### Testcase Gist URL

https://gist.github.com/mitchchn/f38fcd4fdb20e4453c90638ecd5face2

### Additional Information

Frameless Mica windows use custom styles to achieve a "thin frame" appearance and I suspect these are being lost/mangled when the window is maximized, and are not being reset when the window is restored.

CC-ing @brhenrique who worked on some improvements to Mica windows without frames and may have some insight here.
Repository: godot
Issue: Engine crashes when playing a Particle effect set to queue_free when it ends.
Labels: needs testing,crash,topic:particles

### Tested versions

v4.3.dev5.official [89f70e98d]

### System information

Godot v4.3.dev5 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.3623) - 12th Gen Intel(R) Core(TM) i9-12900KF (24 Threads)

### Issue description

Steps to reproduce explain it.

### Steps to reproduce

Create a GPUParticles3D. Set One Shot to true. In Signals, set finished() to call queue_free() directly. Click on Emitting. Engine crashes once emitting finishes.

### Minimal reproduction project (MRP)

[crashmvp.zip](https://github.com/godotengine/godot/files/14943979/crashmvp.zip)
Repository: flutter
Issue: Failures to install Xcode
Labels: team-infra,P2,infra: device lab,triaged-infra

I'm seeing this failure:

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8751031782230600081/+/u/install_xcode/install_xcode_from_cipd/stdout

On mac-29 a lot this morning: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20large_image_changer_perf_ios/15637/infra